[MDEV-10286] Adjustment of table_open_cache according to system limits does not work when open-files-limit option is provided Created: 2016-06-25 Updated: 2018-04-09 Resolved: 2018-03-26 |
|
| Status: | Closed |
| Project: | MariaDB Server |
| Component/s: | Server |
| Affects Version/s: | 10.1 |
| Fix Version/s: | 10.1.32 |
| Type: | Bug | Priority: | Major |
| Reporter: | Elena Stepanova | Assignee: | Michael Widenius |
| Resolution: | Fixed | Votes: | 0 |
| Labels: | None | ||
| Issue Links: |
|
||||||||||||
| Sprint: | 10.1.17-1, 10.1.18, 10.1.30 | ||||||||||||
| Description |
|
table_open_cache is supposed to be adjusted (decreased) automatically if system limit on open files does not allow the desired value. It works all right until we also provide open-files-limit option. The option itself does not really do much (as explained here, for example: https://bugs.mysql.com/bug.php?id=34870), but it somehow affects the adjustment; so, table_open_cache can end up with a higher value than the system allows, which leads to obvious problems. MySQL 5.6 and 5.7 are not affected. Example:
Consequences of the problem are very easily reproducible on 10.1 with MTR, because MTR quite conveniently a) sets system limit to 1024 for any platform, and b) has open-files-limit=1024 in the default config template.
|
| Comments |
| Comment by Sergey Vojtovich [ 2017-12-12 ] |
|
These days it is rather hard to guess good enough table_open_cache value. Because file descriptor requirements vary from engine to engine, e.g.: MyISAM needs 2 per tables, InnoDB 1 (or 0), blackhole 0, etc. |
| Comment by Michael Widenius [ 2018-03-26 ] |
|
Fixed by adjusting tc_size downwards if there is not enough file descriptors to use. |