<?xml version="1.0" encoding="UTF-8"?><rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	>
<channel>
	<title>Comments on: MySQL File System Fragmentation Benchmarks</title>
	<atom:link href="http://www.mysqlperformanceblog.com/2008/03/21/mysql-file-system-fragmentation-benchmarks/feed/" rel="self" type="application/rss+xml" />
	<link>http://www.mysqlperformanceblog.com/2008/03/21/mysql-file-system-fragmentation-benchmarks/</link>
	<description>Everything about MySQL Performance</description>
	<pubDate>Thu, 28 Aug 2008 00:30:20 +0000</pubDate>
	<generator>http://wordpress.org/?v=2.5.1</generator>
		<item>
		<title>By: Nate</title>
		<link>http://www.mysqlperformanceblog.com/2008/03/21/mysql-file-system-fragmentation-benchmarks/#comment-325211</link>
		<dc:creator>Nate</dc:creator>
		<pubDate>Wed, 09 Jul 2008 18:08:13 +0000</pubDate>
		<guid isPermaLink="false">http://www.mysqlperformanceblog.com/2008/03/21/mysql-file-system-fragmentation-benchmarks/#comment-325211</guid>
		<description>I am a newbie to MySQL and am not getting the high insert throughput as in this benchmark.  Could you post the my.cnf file used and the computer hardware specs that produced this benchmark.  I am interested in general, innodb, and myisam settings and installation configuration of the machine.  I am interested in how many processors and processor type, processor cache, RAM size, front side bus speed, harddrive rpms, harddrive max write speed, and operating system.   Also are you doing multiple inserts per transaction.

here is data from my tests:
computer 1:

My.ini
[client]
port=3306
[mysql]
default-character-set=latin1
[mysqld]
port=3306
basedir="C:/Program Files/MySQL/MySQL Server 5.0/"
datadir="C:/Program Files/MySQL/MySQL Server 5.0/Data/"
default-character-set=latin1
default-storage-engine=INNODB
#default-storage-engine=MyISAM
sql-mode="STRICT_TRANS_TABLES,NO_AUTO_CREATE_USER,NO_ENGINE_SUBSTITUTION"
max_connections=100
query_cache_size=0
table_cache=256
tmp_table_size=93M
thread_cache_size=8
#*** MyISAM Specific options
myisam_max_sort_file_size=100G
myisam_max_extra_sort_file_size=100G
myisam_sort_buffer_size=185M
key_buffer_size=157M
read_buffer_size=64K
read_rnd_buffer_size=256K
sort_buffer_size=256K
#*** INNODB Specific options ***
innodb_additional_mem_pool_size=20M
innodb_flush_log_at_trx_commit=0
innodb_log_buffer_size=4M
innodb_buffer_pool_size=304M
innodb_log_file_size=152M
innodb_thread_concurrency=8

RAM: 1GB
Processor: Intel P4 2.253GHz
Cache size: 512KB
Front side bus: 530 MHz
Harddrive: WDC WD400BB-75DEA0
Max Burn Rate: 100MB/s  tested 8MB/s
RPMs: 7200

using multiple inserts per transaction for 1 innodb table (25 inserts or .2 seconds of data to be inserted) I got 1121, 1133, and 1166 inserts per second into that one table.
using autocommit for innodb inserts I got 1125, and 1158 inserts per second into the table
using myisam I got 1186 and 1177 inserts per second into the table
the average data length was 231B.  It seemed the writing of the insert is what was taking all the time.  Data was coming in much faster than it was able to insert.  The data queue was getting quite long.  I ran the test for 5 minutes.  The inserts per second was pretty constant the little variation arrose in how fast the data was coming in which was no more than 3000 packets of data per second.  The processor would go up to about 80% during tests.

please give me feed back.  I am trying to get the data to be inserted faster than it is coming in.  Please post the my.cnf file that you were able to get 9000 inserts per second and the computer specs for that test.

Thanks.</description>
		<content:encoded><![CDATA[<p>I am a newbie to MySQL and am not getting the high insert throughput as in this benchmark.  Could you post the my.cnf file used and the computer hardware specs that produced this benchmark.  I am interested in general, innodb, and myisam settings and installation configuration of the machine.  I am interested in how many processors and processor type, processor cache, RAM size, front side bus speed, harddrive rpms, harddrive max write speed, and operating system.   Also are you doing multiple inserts per transaction.</p>
<p>here is data from my tests:<br />
computer 1:</p>
<p>My.ini<br />
[client]<br />
port=3306<br />
[mysql]<br />
default-character-set=latin1<br />
[mysqld]<br />
port=3306<br />
basedir=&#8221;C:/Program Files/MySQL/MySQL Server 5.0/&#8221;<br />
datadir=&#8221;C:/Program Files/MySQL/MySQL Server 5.0/Data/&#8221;<br />
default-character-set=latin1<br />
default-storage-engine=INNODB<br />
#default-storage-engine=MyISAM<br />
sql-mode=&#8221;STRICT_TRANS_TABLES,NO_AUTO_CREATE_USER,NO_ENGINE_SUBSTITUTION&#8221;<br />
max_connections=100<br />
query_cache_size=0<br />
table_cache=256<br />
tmp_table_size=93M<br />
thread_cache_size=8<br />
#*** MyISAM Specific options<br />
myisam_max_sort_file_size=100G<br />
myisam_max_extra_sort_file_size=100G<br />
myisam_sort_buffer_size=185M<br />
key_buffer_size=157M<br />
read_buffer_size=64K<br />
read_rnd_buffer_size=256K<br />
sort_buffer_size=256K<br />
#*** INNODB Specific options ***<br />
innodb_additional_mem_pool_size=20M<br />
innodb_flush_log_at_trx_commit=0<br />
innodb_log_buffer_size=4M<br />
innodb_buffer_pool_size=304M<br />
innodb_log_file_size=152M<br />
innodb_thread_concurrency=8</p>
<p>RAM: 1GB<br />
Processor: Intel P4 2.253GHz<br />
Cache size: 512KB<br />
Front side bus: 530 MHz<br />
Harddrive: WDC WD400BB-75DEA0<br />
Max Burn Rate: 100MB/s  tested 8MB/s<br />
RPMs: 7200</p>
<p>using multiple inserts per transaction for 1 innodb table (25 inserts or .2 seconds of data to be inserted) I got 1121, 1133, and 1166 inserts per second into that one table.<br />
using autocommit for innodb inserts I got 1125, and 1158 inserts per second into the table<br />
using myisam I got 1186 and 1177 inserts per second into the table<br />
the average data length was 231B.  It seemed the writing of the insert is what was taking all the time.  Data was coming in much faster than it was able to insert.  The data queue was getting quite long.  I ran the test for 5 minutes.  The inserts per second was pretty constant the little variation arrose in how fast the data was coming in which was no more than 3000 packets of data per second.  The processor would go up to about 80% during tests.</p>
<p>please give me feed back.  I am trying to get the data to be inserted faster than it is coming in.  Please post the my.cnf file that you were able to get 9000 inserts per second and the computer specs for that test.</p>
<p>Thanks.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: paul</title>
		<link>http://www.mysqlperformanceblog.com/2008/03/21/mysql-file-system-fragmentation-benchmarks/#comment-259255</link>
		<dc:creator>paul</dc:creator>
		<pubDate>Sat, 29 Mar 2008 08:54:56 +0000</pubDate>
		<guid isPermaLink="false">http://www.mysqlperformanceblog.com/2008/03/21/mysql-file-system-fragmentation-benchmarks/#comment-259255</guid>
		<description>We use it in production, as XFS slowed up on us and mysql became just slow because we had a lot of users on it. The speed difference was like the difference in O(e^n) vs O(n), but as we have a quite uncommon workload it is somewhat our own problem. We have a lot of Databases which are quite tiny.
You might still be interessted in testing it, as my experience shows that a query on an idle server with xfs and 100K Databases takes way longer than a query on the same server with reiserfs.</description>
		<content:encoded><![CDATA[<p>We use it in production, as XFS slowed up on us and mysql became just slow because we had a lot of users on it. The speed difference was like the difference in O(e^n) vs O(n), but as we have a quite uncommon workload it is somewhat our own problem. We have a lot of Databases which are quite tiny.<br />
You might still be interessted in testing it, as my experience shows that a query on an idle server with xfs and 100K Databases takes way longer than a query on the same server with reiserfs.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: peter</title>
		<link>http://www.mysqlperformanceblog.com/2008/03/21/mysql-file-system-fragmentation-benchmarks/#comment-259130</link>
		<dc:creator>peter</dc:creator>
		<pubDate>Fri, 28 Mar 2008 21:46:53 +0000</pubDate>
		<guid isPermaLink="false">http://www.mysqlperformanceblog.com/2008/03/21/mysql-file-system-fragmentation-benchmarks/#comment-259130</guid>
		<description>Thank Paul,

I may run it on XFS when I have a chance.  ReiserFS future is kind of uncertain now and as it is dropped as default filesystem by SuSE and not supported by RedHat  I do not see customers eager to use it in production. 

Also note just many files and support of many growing files is different things.   ReiserFS indeed works well with small files I remember creating 10.000.000 of 100 byte files in the directory and it still was working fine.</description>
		<content:encoded><![CDATA[<p>Thank Paul,</p>
<p>I may run it on XFS when I have a chance.  ReiserFS future is kind of uncertain now and as it is dropped as default filesystem by SuSE and not supported by RedHat  I do not see customers eager to use it in production. </p>
<p>Also note just many files and support of many growing files is different things.   ReiserFS indeed works well with small files I remember creating 10.000.000 of 100 byte files in the directory and it still was working fine.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Log Buffer #90: a Carnival of the Vanities for DBAs</title>
		<link>http://www.mysqlperformanceblog.com/2008/03/21/mysql-file-system-fragmentation-benchmarks/#comment-258993</link>
		<dc:creator>Log Buffer #90: a Carnival of the Vanities for DBAs</dc:creator>
		<pubDate>Fri, 28 Mar 2008 17:03:03 +0000</pubDate>
		<guid isPermaLink="false">http://www.mysqlperformanceblog.com/2008/03/21/mysql-file-system-fragmentation-benchmarks/#comment-258993</guid>
		<description>[...] on the MySQL Performance Blog, Peter Zaitsev offers MySQL file system fragmentation benchmarks. Peter ran tests on several engines, and the comments shed a little more light on the [...]</description>
		<content:encoded><![CDATA[<p>[...] on the MySQL Performance Blog, Peter Zaitsev offers MySQL file system fragmentation benchmarks. Peter ran tests on several engines, and the comments shed a little more light on the [...]</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: paul</title>
		<link>http://www.mysqlperformanceblog.com/2008/03/21/mysql-file-system-fragmentation-benchmarks/#comment-258847</link>
		<dc:creator>paul</dc:creator>
		<pubDate>Fri, 28 Mar 2008 11:59:25 +0000</pubDate>
		<guid isPermaLink="false">http://www.mysqlperformanceblog.com/2008/03/21/mysql-file-system-fragmentation-benchmarks/#comment-258847</guid>
		<description>Hi,
you should retroy this benchmark with XFS (noatime) and ReiserFS (noatime, notail).
My findings when I tried it with our workload was that XFS gets really slow as soon as you have a very many files, and ReiserFS works great for such a workload.
Well I didn't check MySQL Performance at all, just creating folders with empty files in it to see how much the filesystem affected the performance with a lot of folders and a fixed file count in them.

It would be nice to see if the difference is seen as clearly with actual data in the files ;)</description>
		<content:encoded><![CDATA[<p>Hi,<br />
you should retroy this benchmark with XFS (noatime) and ReiserFS (noatime, notail).<br />
My findings when I tried it with our workload was that XFS gets really slow as soon as you have a very many files, and ReiserFS works great for such a workload.<br />
Well I didn&#8217;t check MySQL Performance at all, just creating folders with empty files in it to see how much the filesystem affected the performance with a lot of folders and a fixed file count in them.</p>
<p>It would be nice to see if the difference is seen as clearly with actual data in the files <img src='http://www.mysqlperformanceblog.com/wp-includes/images/smilies/icon_wink.gif' alt=';)' class='wp-smiley' /></p>
]]></content:encoded>
	</item>
	<item>
		<title>By: peter</title>
		<link>http://www.mysqlperformanceblog.com/2008/03/21/mysql-file-system-fragmentation-benchmarks/#comment-257047</link>
		<dc:creator>peter</dc:creator>
		<pubDate>Mon, 24 Mar 2008 19:37:16 +0000</pubDate>
		<guid isPermaLink="false">http://www.mysqlperformanceblog.com/2008/03/21/mysql-file-system-fragmentation-benchmarks/#comment-257047</guid>
		<description>Apachez,

Absolutely.  I specially published the benchmark script so everyone could easily repeat the run with options they like :) 

There are a lot of variables you can play with :)</description>
		<content:encoded><![CDATA[<p>Apachez,</p>
<p>Absolutely.  I specially published the benchmark script so everyone could easily repeat the run with options they like <img src='http://www.mysqlperformanceblog.com/wp-includes/images/smilies/icon_smile.gif' alt=':)' class='wp-smiley' /> </p>
<p>There are a lot of variables you can play with <img src='http://www.mysqlperformanceblog.com/wp-includes/images/smilies/icon_smile.gif' alt=':)' class='wp-smiley' /></p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Apachez</title>
		<link>http://www.mysqlperformanceblog.com/2008/03/21/mysql-file-system-fragmentation-benchmarks/#comment-256840</link>
		<dc:creator>Apachez</dc:creator>
		<pubDate>Mon, 24 Mar 2008 08:55:52 +0000</pubDate>
		<guid isPermaLink="false">http://www.mysqlperformanceblog.com/2008/03/21/mysql-file-system-fragmentation-benchmarks/#comment-256840</guid>
		<description>How was the partition created and which flags were used for mounting it?

Things like dir_index etc but also things like noatime.

Could a new test be performed on the same box using for example noatime on the mount and see how it (if any) changes?</description>
		<content:encoded><![CDATA[<p>How was the partition created and which flags were used for mounting it?</p>
<p>Things like dir_index etc but also things like noatime.</p>
<p>Could a new test be performed on the same box using for example noatime on the mount and see how it (if any) changes?</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: peter</title>
		<link>http://www.mysqlperformanceblog.com/2008/03/21/mysql-file-system-fragmentation-benchmarks/#comment-256436</link>
		<dc:creator>peter</dc:creator>
		<pubDate>Sun, 23 Mar 2008 21:03:27 +0000</pubDate>
		<guid isPermaLink="false">http://www.mysqlperformanceblog.com/2008/03/21/mysql-file-system-fragmentation-benchmarks/#comment-256436</guid>
		<description>Kevin,

There ARE things filesystem can do.  For example you could externally allocate space in extents, related to file size and filesystem size.  For example if you have 50MB file allocating in 1MB blocks would still cause no more than 2% space waste.     For  10K image of course you do not want. 

Another optimization which can be done is called delayed allocation.  When you perform writes you can actually allocate space only when you flush data to disk, this way you can accumulate larger fragments. 

It is not Innodb single tablespace allocation important here  as it is single growing file anyway but how innodb allocates data intermally - which is done in 1M extents after first few pages.  

I'm not sure what is default grow increment for innodb_file_per_table tablespace - this one is important as many files grow at the same time.</description>
		<content:encoded><![CDATA[<p>Kevin,</p>
<p>There ARE things filesystem can do.  For example you could externally allocate space in extents, related to file size and filesystem size.  For example if you have 50MB file allocating in 1MB blocks would still cause no more than 2% space waste.     For  10K image of course you do not want. </p>
<p>Another optimization which can be done is called delayed allocation.  When you perform writes you can actually allocate space only when you flush data to disk, this way you can accumulate larger fragments. </p>
<p>It is not Innodb single tablespace allocation important here  as it is single growing file anyway but how innodb allocates data intermally - which is done in 1M extents after first few pages.  </p>
<p>I&#8217;m not sure what is default grow increment for innodb_file_per_table tablespace - this one is important as many files grow at the same time.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Kevin Burton</title>
		<link>http://www.mysqlperformanceblog.com/2008/03/21/mysql-file-system-fragmentation-benchmarks/#comment-256431</link>
		<dc:creator>Kevin Burton</dc:creator>
		<pubDate>Sun, 23 Mar 2008 20:52:12 +0000</pubDate>
		<guid isPermaLink="false">http://www.mysqlperformanceblog.com/2008/03/21/mysql-file-system-fragmentation-benchmarks/#comment-256431</guid>
		<description>Peter. 

I agree with your worst case scenario.  This is what I tried to point out in my previous comment.  Though maybe I didn't do a good job expressing myself :)

The point I was trying to make is that in that situation there's not much the filesystem CAN do.

It could TRY to pre-allocate both files in larger chunks but then you'd have angular velocity kick in on the HDDs.

InnoDB's grow factor (which by default is 8M I believe) is a good balance.</description>
		<content:encoded><![CDATA[<p>Peter. </p>
<p>I agree with your worst case scenario.  This is what I tried to point out in my previous comment.  Though maybe I didn&#8217;t do a good job expressing myself <img src='http://www.mysqlperformanceblog.com/wp-includes/images/smilies/icon_smile.gif' alt=':)' class='wp-smiley' /> </p>
<p>The point I was trying to make is that in that situation there&#8217;s not much the filesystem CAN do.</p>
<p>It could TRY to pre-allocate both files in larger chunks but then you&#8217;d have angular velocity kick in on the HDDs.</p>
<p>InnoDB&#8217;s grow factor (which by default is 8M I believe) is a good balance.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: peter</title>
		<link>http://www.mysqlperformanceblog.com/2008/03/21/mysql-file-system-fragmentation-benchmarks/#comment-256428</link>
		<dc:creator>peter</dc:creator>
		<pubDate>Sun, 23 Mar 2008 20:49:03 +0000</pubDate>
		<guid isPermaLink="false">http://www.mysqlperformanceblog.com/2008/03/21/mysql-file-system-fragmentation-benchmarks/#comment-256428</guid>
		<description>Kevin,

Of course in pure science you could spend a lot of time on this and test different things... Though I mainly tested what had practical interest for me at that point.

Regarding fragmentation - you can't really assume 2 tables are enough without knowing about internal implementation of OS and tables.     First it is quite possible to design filesystem which would be able to handle small amount of growing files well  but not large number of files.

But what is even more important is not all fragmentations are same. 

Consider the worst case with 2 files  with blocks going as 12121212121212   drive/raid/os or  storge engine itself will do read-ahead  which will fetch few blocks with single read.     1MB read will have only 512K of data for the given table but it is still much better than getting single row with random read :)</description>
		<content:encoded><![CDATA[<p>Kevin,</p>
<p>Of course in pure science you could spend a lot of time on this and test different things&#8230; Though I mainly tested what had practical interest for me at that point.</p>
<p>Regarding fragmentation - you can&#8217;t really assume 2 tables are enough without knowing about internal implementation of OS and tables.     First it is quite possible to design filesystem which would be able to handle small amount of growing files well  but not large number of files.</p>
<p>But what is even more important is not all fragmentations are same. </p>
<p>Consider the worst case with 2 files  with blocks going as 12121212121212   drive/raid/os or  storge engine itself will do read-ahead  which will fetch few blocks with single read.     1MB read will have only 512K of data for the given table but it is still much better than getting single row with random read <img src='http://www.mysqlperformanceblog.com/wp-includes/images/smilies/icon_smile.gif' alt=':)' class='wp-smiley' /></p>
]]></content:encoded>
	</item>
</channel>
</rss>
