Re: Re: InnoDB: Looong pause when log file is full?
Hi Heikki, Thank you for responding. (http://www.innodb.com/ibman.html#InnoDB_tuning), but am getting bit when the log files are full and the buffer pool is checkpointed. InnoDB does 'fuzzy checkpoints'. That means modified database pages in the buffer pool are flushed to disk in small batches. The time when a physical log file becomes full does not affect this continuous background checkpointing activity, since InnoDB sees all the log files as one catenated log file. That's good to know---so that isn't it. The pauses you experience are probably caused by high load in general, probably too much disk i/o. You should study your queries, use the InnoDB Monitor, watch 'top', adjust buffer pool size, spread disk i/o. Respectfully, I don't think that's it. Both times I've seen the database do this it's been in periods of relatively low traffic. Until we switched to InnoDB tables, the only times the database was frozen up like this was when someone did an ill-advised select that took forever and gummed everything up. That's the main reason we switched to InnoDB tables---so a long select wouldn't hold up the db (by an update blocking, which would block subsequent selects). In this case, when the (inno-)db was 'pausing', all of the queries in the (growing) queue looked normal. And there was a lot of free ram. I didn't see anything useful in the InnoDB monitor, but then I'm new to reading it. Then all of a sudden all queries finished and there were no more in the queue and the problem didn't recur for five days. I thought it must be related to the log files, because when I looked at them it looked like one was just finished being written to. (Because its modification time was the previous minute, while the next (zeroth) log file was now the active one.) I know without a repeatable test case, there's not much you can do. If I get more information I'll let you know. It helps to hear that this behavior isn't normal, though. --Pete sql - Before posting, please check: http://www.mysql.com/manual.php (the manual) http://lists.mysql.com/ (the list archive) To request this thread, e-mail [EMAIL PROTECTED] To unsubscribe, e-mail [EMAIL PROTECTED] Trouble unsubscribing? Try: http://lists.mysql.com/php/unsubscribe.php
Re: InnoDB: Looong pause when log file is full?
Pete, - Original Message - From: Jeremy Zawodny [EMAIL PROTECTED] Newsgroups: mailing.database.mysql Sent: Friday, August 02, 2002 2:40 AM Subject: Re: InnoDB: Looong pause when log file is full? On Thu, Aug 01, 2002 at 04:37:05PM -0500, Pete Harlan wrote: Hi, I've read the performance tuning tips for InnoDB (http://www.innodb.com/ibman.html#InnoDB_tuning), but am getting bit when the log files are full and the buffer pool is checkpointed. InnoDB does 'fuzzy checkpoints'. That means modified database pages in the buffer pool are flushed to disk in small batches. The time when a physical log file becomes full does not affect this continuous background checkpointing activity, since InnoDB sees all the log files as one catenated log file. The pauses you experience are probably caused by high load in general, probably too much disk i/o. You should study your queries, use the InnoDB Monitor, watch 'top', adjust buffer pool size, spread disk i/o. If the load is CPU-bound and you have many queries running simultaneously, you may experience 'thread thrashing'. Then you can try to set innodb_thread_concurrency lower than the default 8, even to 1. By 'geting bit', I mean for several minutes the db server basically stops, and our website stops serving pages. Does anyone have advice about what we can do to alleviate this? Instead of having three 150mb log files, would we be better off with 30 15mb log files? It shouldn't matter how many files you have. InnoDB sees them as one striped file anyway. Our log files are on the same raid array as the data, but would it really make that much difference to move them to a separate disk? It can if things are I/O bound, and they likely are. Alternately, is there a way to trigger this action at night, so we can avoid it happening during the day? It shut us down for about five minutes today. You could increase the size of your logs. That'll increase recovery time if there's ever a crash, but it should give InnoDB more breathing room. Jeremy -- Jeremy D. Zawodny | Perl, Web, MySQL, Linux Magazine, Yahoo! [EMAIL PROTECTED] | http://jeremy.zawodny.com/ MySQL 3.23.51: up 63 days, processed 1,335,360,828 queries (241/sec. avg) Best regards, Heikki Tuuri Innobase Oy --- Order technical MySQL/InnoDB support at https://order.mysql.com/ See http://www.innodb.com for the online manual and latest news on InnoDB - Before posting, please check: http://www.mysql.com/manual.php (the manual) http://lists.mysql.com/ (the list archive) To request this thread, e-mail [EMAIL PROTECTED] To unsubscribe, e-mail [EMAIL PROTECTED] Trouble unsubscribing? Try: http://lists.mysql.com/php/unsubscribe.php
InnoDB: Looong pause when log file is full?
Hi, I've read the performance tuning tips for InnoDB (http://www.innodb.com/ibman.html#InnoDB_tuning), but am getting bit when the log files are full and the buffer pool is checkpointed. By 'geting bit', I mean for several minutes the db server basically stops, and our website stops serving pages. Does anyone have advice about what we can do to alleviate this? Instead of having three 150mb log files, would we be better off with 30 15mb log files? Our log files are on the same raid array as the data, but would it really make that much difference to move them to a separate disk? Alternately, is there a way to trigger this action at night, so we can avoid it happening during the day? It shut us down for about five minutes today. Details follow. Many thanks, --Pete Harlan [EMAIL PROTECTED] Possibly relevant details: 1. Binary mysql-max-3.23.51-pc-linux-gnu-i686.tar.gz. 2. Linux 2.4.19-rc3, though has happened with other kernels. Debian woody. 3. Dual Intel 933mhz, 2gb ram, 15krpm scsi raid. Here's the /etc/my.cnf file we use. Except for this pausing, performance is generally great, and we're not disk bound or running out of ram (500mb free (used for caching) while machine is pausing): /etc/my.cnf: [mysqld] log-slow-queries skip-locking innodb_data_home_dir = /usr/local/mysql/data/innodb/data innodb_data_file_path = ibdata1:2000M;ibdata2:2000M;ibdata3:50M:autoextend set-variable = innodb_buffer_pool_size = 1200M set-variable = innodb_additional_mem_pool_size = 20M innodb_log_group_home_dir = /usr/local/mysql/data/innodb/logs innodb_log_arch_dir = /usr/local/mysql/data/innodb/logs innodb_log_archive = 0 set-variable = innodb_log_files_in_group = 3 set-variable = innodb_log_file_size = 150M set-variable = innodb_log_buffer_size = 4M innodb_flush_log_at_trx_commit = 0 set-variable = innodb_file_io_threads = 4 set-variable = innodb_lock_wait_timeout = 50 set-variable = record_buffer = 1M set-variable = sort_buffer = 2M set-variable = key_buffer=150M set-variable = tmp_table_size=4M set-variable = table_cache=500 set-variable = myisam_sort_buffer_size=64M set-variable = thread_cache=8 set-variable = thread_concurrency=4 default-table-type=InnoDB set-variable = long_query_time=5 log-bin server-id=1 - Before posting, please check: http://www.mysql.com/manual.php (the manual) http://lists.mysql.com/ (the list archive) To request this thread, e-mail [EMAIL PROTECTED] To unsubscribe, e-mail [EMAIL PROTECTED] Trouble unsubscribing? Try: http://lists.mysql.com/php/unsubscribe.php
Re: InnoDB: Looong pause when log file is full?
On Thu, Aug 01, 2002 at 04:37:05PM -0500, Pete Harlan wrote: Hi, I've read the performance tuning tips for InnoDB (http://www.innodb.com/ibman.html#InnoDB_tuning), but am getting bit when the log files are full and the buffer pool is checkpointed. By 'geting bit', I mean for several minutes the db server basically stops, and our website stops serving pages. Does anyone have advice about what we can do to alleviate this? Instead of having three 150mb log files, would we be better off with 30 15mb log files? It shouldn't matter how many files you have. InnoDB sees them as one striped file anyway. Our log files are on the same raid array as the data, but would it really make that much difference to move them to a separate disk? It can if things are I/O bound, and they likely are. Alternately, is there a way to trigger this action at night, so we can avoid it happening during the day? It shut us down for about five minutes today. You could increase the size of your logs. That'll increase recovery time if there's ever a crash, but it should give InnoDB more breathing room. Jeremy -- Jeremy D. Zawodny | Perl, Web, MySQL, Linux Magazine, Yahoo! [EMAIL PROTECTED] | http://jeremy.zawodny.com/ MySQL 3.23.51: up 63 days, processed 1,335,360,828 queries (241/sec. avg) - Before posting, please check: http://www.mysql.com/manual.php (the manual) http://lists.mysql.com/ (the list archive) To request this thread, e-mail [EMAIL PROTECTED] To unsubscribe, e-mail [EMAIL PROTECTED] Trouble unsubscribing? Try: http://lists.mysql.com/php/unsubscribe.php
Re: Re: InnoDB: Looong pause when log file is full?
Thanks for your feedback (and your general untiring devotion to the cause...) On Thu, Aug 01, 2002 at 04:30:10PM -0700, Jeremy Zawodny wrote: about what we can do to alleviate this? Instead of having three 150mb log files, would we be better off with 30 15mb log files? It shouldn't matter how many files you have. InnoDB sees them as one striped file anyway. That's good to know. You could increase the size of your logs. That'll increase recovery time if there's ever a crash, but it should give InnoDB more breathing room. Won't that only make for fewer long pauses, rather than schedule or shorten them? It won't fly with the powers that be if our system shuts down in the middle of the day and my response is Oh yeah, our server does that every three weeks and there's nothing we can do about it. Someone else suggested setting innodb_flush_log_at_trx_commit to 1, which should make for many frequent flushes rather than one monster occasional flush. Would that not take care of it? (I set it to 0 because the manual suggested that as a big performance improvement at the expense of a small measure of recoverability in the unlikely event of a crash.) [Is there a way to set that variable with 3.23.51 without shutting down the server? I couldn't find a way.] Thanks, --Pete sql,query - Before posting, please check: http://www.mysql.com/manual.php (the manual) http://lists.mysql.com/ (the list archive) To request this thread, e-mail [EMAIL PROTECTED] To unsubscribe, e-mail [EMAIL PROTECTED] Trouble unsubscribing? Try: http://lists.mysql.com/php/unsubscribe.php