Bug #15378 | With many .ibd files, high CPU usage when opening a new .ibd file | ||
---|---|---|---|
Submitted: | 1 Dec 2005 9:12 | Modified: | 8 Dec 2005 17:38 |
Reporter: | Heikki Tuuri | Email Updates: | |
Status: | Not a Bug | Impact on me: | |
Category: | MySQL Server: InnoDB storage engine | Severity: | S2 (Serious) |
Version: | 4.1, 5.0 | OS: | Any (All) |
Assigned to: | Marko Mäkelä | CPU Architecture: | Any |
[1 Dec 2005 9:12]
Heikki Tuuri
[1 Dec 2005 9:14]
Heikki Tuuri
Workaround: increase innodb_open_files in my.cnf.
[2 Dec 2005 8:14]
James Day
Good catch. Interesting. Can this happen if there are 120,000 tables in 600 databases but the only SQL since server startup has been inserting one row at a start to one table using a script which loops through: myql -D test -e "insert into foo values (1)" where foo is CREATE TABLE foo (i int) engine=innodb. innodb_open_files is default when I've experimented with this.
[2 Dec 2005 8:19]
James Day
I suppose that the symptom of this on the stack would be lots of futex(whatever, FUTEX_WAIT, n) calls as the other threads wait for the mutex?
[2 Dec 2005 9:25]
Heikki Tuuri
James, this should not happen if you have only used 1 table after the mysqld startup. What does SHOW INNODB STATUS print during that peak of CPU usage? Does 'top' show the CPU being used in 'system' or 'user'? Regards, Heikki
[8 Dec 2005 17:38]
Heikki Tuuri
Oops, I misread the code. If there is success in closing files, it calls again fil_try_to_close_file_in_LRU()! If no success, it will go to sleep for 20 milliseconds. No bug here. I am closing this bug report.