[MDEV-5541] every subsequent DROP TABLE is slower Created: 2014-01-18 Updated: 2014-02-27 Resolved: 2014-02-27 |
|
| Status: | Closed |
| Project: | MariaDB Server |
| Component/s: | None |
| Affects Version/s: | 10.0.7 |
| Fix Version/s: | 10.0.8 |
| Type: | Bug | Priority: | Major |
| Reporter: | Pawel Pabian (Inactive) | Assignee: | Unassigned |
| Resolution: | Fixed | Votes: | 1 |
| Labels: | upstream | ||
| Environment: |
Debian GNU/Linux 7: 3.2.38-vs2.3.2.16-beng #1 SMP Tue Feb 12 10:48:52 GMT 2013 x86_64 GNU/Linux Default config with increased innodb buffer size to 20GB and file per table turned on. |
||
| Description |
|
Each test CREATEs and DROPs 1024 tables. I've checked that CREATE time is constant, while DROP time increases every time it is invoked.
DROP time becomes stable when database instance is using maximum allowed amount of RAM. In my case test time can raise from 2.3 second to over 1 minute. I've checked MariaDB 5.5.34 and PerconaDB 5.6 and they are not affected by this issue - DROP time is constant despite of amount of used RAM. |
| Comments |
| Comment by Sergei Golubchik [ 2014-01-20 ] | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
elenst, could you please check whether it's because of the new InnoDB or, may be, because of the table cache changes? Like, try in 10.0 with InnoDB and with XtraDB. And try in older 10.0 before table cache optimizations. | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| Comment by Elena Stepanova [ 2014-01-31 ] | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
Hi Pawel, Do I interpret your output correctly, that it took between 2 seconds to create and drop 1024 tables at first, and then the value was growing gradually? Or did you change the number of tables created per test in the command line comparing to the one used to collect the results? I'm asking because it generally takes me many times longer to create InnoDB tables (even on SSD), so I have a difficulty reproducing, the dynamics is very different. | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| Comment by Pawel Pabian (Inactive) [ 2014-01-31 ] | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
> Do I interpret your output correctly, that it took between 2 seconds to create and drop 1024 tables at first, and then the value was growing gradually? Yes. Single test does DROP and CREATE the same table 1024 times. Amount of operations is the same for every test. Each test starts and ends with empty database. Time of every following test is longer. > Could you please attach your cnf file? We do not have it anymore. But we reproduced this issue with default config which had only innodb buffer size increased to 20GB and file per table turned on. Generally speaking - the bigger innodb buffer is the worse DROP time you will finally reach. > I'm asking because it generally takes me many times longer to create InnoDB tables (even on SSD). Test server has several SSDs in RAID, typical desktop won't even get close to this I/O performance. That's why each test packs 1024 CREATE-DROP actions to make time increase visible. Try to set innodb buffer to maximum amount of RAM you have and decrease amount of actions in each test. You should observe significant DROP time increase between cold database and the moment when it takes all available RAM. | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| Comment by Elena Stepanova [ 2014-02-27 ] | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
So far all my attempts to reproduce the problem failed.
The next thing to check is whether 20 Gb of buffer pool makes the critical difference. I'm going to acquire one of benchmarking machines with decent amount of memory to see if I can reproduce it there. | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| Comment by Elena Stepanova [ 2014-02-27 ] | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
I ran the test with 40 Gb of buffer pool with a single disk and could not get the described trend; but when I switched to a raid, I finally observed it. It's not as monotonic as in Pawel's description, but still undoubtedly growing:
Single disk (had to reduce the number of threads per step to 64 to make the duration acceptable:
With raid (returned to original 1024 tables per step):
Now when it became reproducible, I should be able to find out the source as serg requested. | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| Comment by Elena Stepanova [ 2014-02-27 ] | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
The bug existed in InnoDB of 5.6.10, reproducible on MySQL 5.6.10. It was fixed in 10.0.8 release by the merge of InnoDB 5.6.14, in the following revision:
|