table_open_cache and table_definition_cache testcases fail on systems with low ulimit -n

Bug #1188516 reported by Laurynas Biveinis
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
MySQL Server
Unknown
Unknown
Percona Server moved to https://jira.percona.com/projects/PS
Fix Released
Medium
Laurynas Biveinis
5.1
Invalid
Undecided
Unassigned
5.5
Invalid
Undecided
Unassigned
5.6
Fix Released
Medium
Laurynas Biveinis

Bug Description

[7 Jun 7:04] Laurynas Biveinis

Description:
5.6.12 appears to change table_open_cache default from 2000 to 431 and table_definition_cache from 1400 to 615.

This is not documented, makes 4 MTR tests fail consistently (don't you see it in your runs?), and probably was not intended.

Probably a side effect of the commit below, which says nothing about changing the defaults.

$ bzr log -r 4948
------------------------------------------------------------
revno: 4948
committer: Marc Alff <email address hidden>
branch nick: mysql-5.6-bug16430532
timestamp: Fri 2013-03-22 20:12:50 +0100
message:
  Bug#16430532 WRONG SIZING HINTS USED IN THE PERFORMANCE SCHEMA

  Before this fix, the server did perform the following actions during
  startup.

  1)
  Retrieve the value of
  - max_connections
  - table_definition_cache
  - table_open_cache
  - open_files_limit
  from the user configuration provided in my.cnf,
  and use this settings as a base to compute
  performance_schema auto sized variables.

  2)
  Then, later in the startup process:
  - max_connections could be trimmed down
  - table_definition_cache default value could be changed
  - open_files_limit could be either computed (replacing the 0 value) or
    adjusted.

  Because of the order used, the performance schema automated sizing
  was based on incorrect data.

  With this fix, the server startup code has been changed to perform part 2)
  first, and only when all the proper sizing parameters are finally computed
  and adjusted, then perform the performance schema initialization in part 1)

  Also, the code performing 2) has been cleaned up to be maintainable.
  Clarity in this complicated process (due to related dependencies between
  configuration settings) is critical here.

How to repeat:
./mysql-test-run table_definition_cache_basic table_open_cache_basic table_definition_cache_functionality table_open_cache_functionality

So the difference between 5.6.11 and 5.6.12 is that 5.6.11 adjusts max connections and table cache size only if open_files_limit == 0, and 5.6.12 does that unconditionally.

Tags: upstream

Related branches

tags: added: upstream
Revision history for this message
Laurynas Biveinis (laurynas-biveinis) wrote :

This bug was fixed not in changing the defaults (we are not sure at this moment what was the intention), but by fixing the testsuite failures. Edited the title and replaced the upstream bug link from http://bugs.mysql.com/bug.php?id=69419 to http://bugs.mysql.com/bug.php?id=69524.

summary: - Undocumented and untested table_open_cache table_definition_cache
- default change
+ table_open_cache and table_definition_cache testcases fail on systems
+ with low ulimit -n
no longer affects: mysql-server
Revision history for this message
Shahriyar Rzayev (rzayev-sehriyar) wrote :

Percona now uses JIRA for bug reports so this bug report is migrated to: https://jira.percona.com/browse/PS-1379

To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.