Comment 11 for bug 1441908

Revision history for this message
Valerii Kravchuk (valerii-kravchuk) wrote :

Surely, memory allocated depends on instrumentation used. If we disable all instruments startup is instant:

[openxs@chief p5.6]$ bin/mysqld_safe --no-defaults --table_definition_cache=50000 --performance-schema-instrument='%=OFF' &
[1] 2849

...
2015-11-20 12:30:55 2945 [Note] InnoDB: Highest supported file format is Barracuda.
2015-11-20 12:30:55 2945 [Note] InnoDB: 128 rollback segment(s) are active.
2015-11-20 12:30:55 2945 [Note] InnoDB: Waiting for purge to start
2015-11-20 12:30:55 2945 [Note] InnoDB: Percona XtraDB (http://www.percona.com) 5.6.27-75.0 started; log sequence number 288279594
2015-11-20 12:30:55 2945 [Note] Server hostname (bind-address): '*'; port: 3306
2015-11-20 12:30:55 2945 [Note] IPv6 is available.
2015-11-20 12:30:55 2945 [Note] - '::' resolves to '::';
2015-11-20 12:30:55 2945 [Note] Server socket created on IP: '::'.
2015-11-20 12:30:55 2945 [Note] Event Scheduler: Loaded 0 events
2015-11-20 12:30:55 2945 [Note] /home/openxs/dbs/p5.6/bin/mysqld: ready for connections.
Version: '5.6.27-75.0' socket: '/tmp/mysql.sock' port: 3306 MySQL Community Server (GPL)

Even though memory use is reported the same:

| performance_schema | performance_schema.memory | 1794090344 |
+--------------------+--------------------------------------------------------------+------------+
167 rows in set (0.00 sec)

Enabling instruments after startup seems to work fastert, and may work well for those that can be re-enabled after startup:

mysql> update performance_schema.setup_instruments set enabled = 'YES', timed='YES';
Query OK, 582 rows affected (3.05 sec)
Rows matched: 582 Changed: 582 Warnings: 0

So, if total memory allocation is NOT too big (it does not depend on enabled status), it seems we can start with all/most dynamic instruments disabled by default, and then enable them when needed. This will give faster startup at a cost of some delays for enabling instruments later.