MySQL Forums
Forum List  »  MySQL Administrator

How to prevent keep-growing index file (MYISAM engine) causing disk fragment on Windows NTFS partition?
Posted by: Liu 刘 Yan 研
Date: October 10, 2011 03:07AM

We have a keep-growing table which using MYISAM storage engine.

Almost every half year, this table will crash, and need to be repaired.

I checked the defragment result, the most fragmental files are:
--------------------------------------------------------------------------------
碎片 文件大小 最零碎的文件
3,812 213 MB \MySQLData\data\cmszivr\calllog.MYI
24 541 MB \Program Files\Microsoft SQL Server\MSSQL\Data\tempdb.mdf
...

you can see, the index file caused 3812 fragment when it's 213 MB size.

I don't know if the fragmental issue caused mysql-server/mysql-table crashed, but it's must not be good for storage, and could be a potential reason to make server unstable.

So, is there a way to prevent it?

--------------------------- The ERROR log of MySQL -------------------------
110914 14:53:39 [Note] Event Scheduler: Loaded 0 events
110914 14:53:39 [Note] C:\mysql\bin\mysqld: ready for connections.
Version: '5.1.55-community' socket: '' port: 3306 MySQL Community Server (GPL)
111008 17:00:50 [ERROR] C:\mysql\bin\mysqld: Incorrect key file for table '.\cmszivr\calllog.MYI'; try to repair it
111008 17:00:50 [ERROR] C:\mysql\bin\mysqld: Incorrect key file for table '.\cmszivr\calllog.MYI'; try to repair it
111008 17:00:51 [ERROR] C:\mysql\bin\mysqld: Incorrect key file for table '.\cmszivr\calllog.MYI'; try to repair it
111008 17:00:51 [ERROR] C:\mysql\bin\mysqld: Incorrect key file for table '.\cmszivr\calllog.MYI'; try to repair it
111008 17:00:52 [ERROR] C:\mysql\bin\mysqld: Incorrect key file for table '.\cmszivr\calllog.MYI'; try to repair it
111008 17:00:52 [ERROR] C:\mysql\bin\mysqld: Incorrect key file for table '.\cmszivr\calllog.MYI'; try to repair it
111008 17:00:52 [ERROR] C:\mysql\bin\mysqld: Incorrect key file for table '.\cmszivr\calllog.MYI'; try to repair it
111008 17:00:52 [ERROR] C:\mysql\bin\mysqld: Incorrect key file for table '.\cmszivr\calllog.MYI'; try to repair it
111008 17:00:52 [ERROR] C:\mysql\bin\mysqld: Incorrect key file for table '.\cmszivr\calllog.MYI'; try to repair it
111008 17:00:52 [ERROR] C:\mysql\bin\mysqld: Incorrect key file for table '.\cmszivr\calllog.MYI'; try to repair it
111008 17:00:52 [ERROR] C:\mysql\bin\mysqld: Incorrect key file for table '.\cmszivr\calllog.MYI'; try to repair it
111008 17:00:52 - mysqld got exception 0xc0000005 ;
This could be because you hit a bug. It is also possible that this binary
or one of the libraries it was linked against is corrupt, improperly built,
or misconfigured. This error can also be caused by malfunctioning hardware.
We will try our best to scrape up some info that will hopefully help diagnose
the problem, but since we have already crashed, something is definitely wrong
and this may fail.

key_buffer_size=402653184
read_buffer_size=2097152
max_used_connections=3
max_threads=151
threads_connected=3
It is possible that mysqld could use up to
key_buffer_size + (read_buffer_size + sort_buffer_size)*max_threads = 1012680 K
bytes of memory
Hope that's ok; if not, decrease some variables in the equation.

Thread pointer: 0x1b2a62f0
Attempting backtrace. You can use the following information to find out
where mysqld died. If you see no messages after this, something went
terribly wrong...
0067DBE5 mysqld.exe!unlink_block()[mf_keycache.c:1260]
0067DC1B mysqld.exe!reg_requests()[mf_keycache.c:1311]
0067EDB0 mysqld.exe!find_key_block()[mf_keycache.c:2368]
0067EEB3 mysqld.exe!key_cache_read()[mf_keycache.c:2609]
00654170 mysqld.exe!_mi_fetch_keypage()[mi_page.c:35]
00639DF2 mysqld.exe!w_search()[mi_write.c:359]
00639F69 mysqld.exe!w_search()[mi_write.c:425]
00639F69 mysqld.exe!w_search()[mi_write.c:425]
00639F69 mysqld.exe!w_search()[mi_write.c:425]
00639F69 mysqld.exe!w_search()[mi_write.c:425]
0063A120 mysqld.exe!_mi_ck_real_write_btree()[mi_write.c:304]
0063A1A5 mysqld.exe!_mi_ck_write_btree()[mi_write.c:283]
00639486 mysqld.exe!mi_write()[mi_write.c:126]
0062E07C mysqld.exe!ha_myisam::write_row()[ha_myisam.cc:788]
00482C98 mysqld.exe!handler::ha_write_row()[handler.cc:4673]
0052E12D mysqld.exe!write_record()[sql_insert.cc:1604]
00532D53 mysqld.exe!mysql_insert()[sql_insert.cc:835]
0045A362 mysqld.exe!mysql_execute_command()[sql_parse.cc:3254]
0045D5BF mysqld.exe!mysql_parse()[sql_parse.cc:6079]
0045E023 mysqld.exe!dispatch_command()[sql_parse.cc:1263]
0045EAB7 mysqld.exe!do_command()[sql_parse.cc:893]
0047F4D0 mysqld.exe!handle_one_conne111010 16:09:54 [Note] Plugin 'FEDERATED' is disabled.
111010 16:09:54 InnoDB: Initializing buffer pool, size = 8.0M
111010 16:09:54 InnoDB: Completed initialization of buffer pool
111010 16:09:54 InnoDB: Started; log sequence number 0 43665
111010 16:09:54 [Note] Event Scheduler: Loaded 0 events
111010 16:09:54 [Note] C:\mysql\bin\mysqld: ready for connections.
Version: '5.1.55-community' socket: '' port: 3306 MySQL Community Server (GPL)
111010 16:10:11 [ERROR] C:\mysql\bin\mysqld: Table '.\cmszivr\calllog' is marked as crashed and should be repaired
111010 16:10:11 [ERROR] C:\mysql\bin\mysqld: Table '.\cmszivr\calllog' is marked as crashed and should be repaired
111010 16:10:11 [ERROR] C:\mysql\bin\mysqld: Table '.\cmszivr\calllog' is marked as crashed and should be repaired
111010 16:10:11 [ERROR] C:\mysql\bin\mysqld: Table '.\cmszivr\calllog' is marked as crashed and should be repaired
111010 16:10:11 [ERROR] C:\mysql\bin\mysqld: Table '.\cmszivr\calllog' is marked as crashed and should be repaired
111010 16:10:11 [ERROR] C:\mysql\bin\mysqld: Table '.\cmszivr\calllog' is marked as crashed and should be repaired
111010 16:10:11 [ERROR] C:\mysql\bin\mysqld: Table '.\cmszivr\calllog' is marked as crashed and should be repaired
111010 16:10:11 [ERROR] C:\mysql\bin\mysqld: Table '.\cmszivr\calllog' is marked as crashed and should be repaired

Options: ReplyQuote


Subject
Written By
Posted
How to prevent keep-growing index file (MYISAM engine) causing disk fragment on Windows NTFS partition?
October 10, 2011 03:07AM


Sorry, you can't reply to this topic. It has been closed.

Content reproduced on this site is the property of the respective copyright holders. It is not reviewed in advance by Oracle and does not necessarily represent the opinion of Oracle or any other party.