# Poor performance on Intel Core 2 CPU

**URL:** <https://forums.percona.com/t/poor-performance-on-intel-core-2-cpu/275>\
**Category:** Other MySQL® Questions\
**Created:** [April 8, 2007, 8:26am UTC](https://forums.percona.com/t/poor-performance-on-intel-core-2-cpu/275 "2007-04-08T08:26:01Z")\
**Posts on this page:** 8\
**Page:** 1

<div class="post-metadata">

**Author:** ![lapa](https://avatars.discourse-cdn.com/v4/letter/l/f08c70/32.png) [@lapa](https://forums.percona.com/u/lapa)\
**Post date:** [April 8, 2007, 8:26am UTC](https://forums.percona.com/t/poor-performance-on-intel-core-2-cpu/275/1 "2007-04-08T08:26:01Z")

</div>

Hi everybody!

I have following MySQL environments:

1. Developer - AMD Sempron based PCs
2. Developer - Intel Core 2 Duo based PCs
3. Server - 4 x Xeon

The performance on Intel machines in comparison with AMD’s is poorer in times.

Restoration of 50 GB Database on AMD machine takes up to 30 seconds while on any Intel base PC it takes up to 15 minutes.

Xeon and Intel Core 2 Duo machines are highly loaded with IO (disk) operations while CPU remains almost untouched (3-4%, literally idle).

I’ve tried default configuration as well as custom tuning of my.ini - no luck.

Any ideas?

My current configuration (AS IS):

[client]  
port=3306

[mysql]  
default-character-set=utf8

[mysqld]  
port=3306

basedir=“C:/Program Files/MySQL/MySQL Server 5.1/”  
datadir=“C:/Program Files/MySQL/MySQL Server 5.1/Data/”

default-character-set=utf8

default-storage-engine=INNODB

sql-mode=" STRICT\_TRANS\_TABLES,NO\_AUTO\_CREATE\_USER,NO\_ENGINE\_SUBSTITUTI ON "

max\_connections=100

query\_cache\_size=50M

table\_cache=512

tmp\_table\_size=50M

thread\_cache\_size=8

#\*\*\* MyISAM Specific options  
myisam\_max\_sort\_file\_size=100G  
myisam\_max\_extra\_sort\_file\_size=100G  
myisam\_sort\_buffer\_size=16M  
key\_buffer\_size=9M  
read\_buffer\_size=64K  
read\_rnd\_buffer\_size=256K

sort\_buffer\_size=256K

#\*\*\* INNODB Specific options \*\*\*  
innodb\_additional\_mem\_pool\_size=200M  
innodb\_flush\_log\_at\_trx\_commit=1  
innodb\_log\_buffer\_size=10M  
innodb\_buffer\_pool\_size=512M  
innodb\_log\_file\_size=16M  
innodb\_thread\_concurrency=8

---

<div class="post-metadata">

**Author:** ![sterin](https://avatars.discourse-cdn.com/v4/letter/s/3ab097/32.png) [@sterin](https://forums.percona.com/u/sterin)\
**Post date:** [April 8, 2007, 9:41am UTC](https://forums.percona.com/t/poor-performance-on-intel-core-2-cpu/275/2 "2007-04-08T09:41:40Z")

</div>

It should be basically almost only IO that limits in that case.

First of all have you compared the ini files between the AMD and the other servers to see if there is any difference?

What kind of disk setup do you have in the different machines?

Do you read the 50Gb file that you are importing from the same disk as your databases are located on?

Are they all the same type of OS?

Because I can tell you that this has nothing to do with if it’s an AMD or an Intel CPU in the box.  
This is about what disks you have, how they are setup, what cache is activated, how much RAM you have available for OS cache etc.

---

<div class="post-metadata">

**Author:** ![seunosewa](https://avatars.discourse-cdn.com/v4/letter/s/eb9ed0/32.png) [@seunosewa](https://forums.percona.com/u/seunosewa)\
**Post date:** [April 8, 2007, 11:43pm UTC](https://forums.percona.com/t/poor-performance-on-intel-core-2-cpu/275/3 "2007-04-08T23:43:57Z")

</div>

| [B]Quote:[/B] |
| [B]Xeon and Intel Core 2 Duo machines are highly loaded with IO (disk) operations while CPU remains almost untouched (3-4%, literally idle).[/B] |

That says it all. The slow performance is a result of the IO operations. ;)

---

<div class="post-metadata">

**Author:** ![lapa](https://avatars.discourse-cdn.com/v4/letter/l/f08c70/32.png) [@lapa](https://forums.percona.com/u/lapa)\
**Post date:** [April 9, 2007, 8:40am UTC](https://forums.percona.com/t/poor-performance-on-intel-core-2-cpu/275/4 "2007-04-09T08:40:43Z")

</div>

| [B]sterin wrote on Sun, 08 April 2007 18:11[/B] |
| It should be basically almost only IO that limits in that case.

First of all have you compared the ini files between the AMD and the other servers to see if there is any difference?

What kind of disk setup do you have in the different machines?

Do you read the 50Gb file that you are importing from the same disk as your databases are located on?

Are they all the same type of OS?

Because I can tell you that this has nothing to do with if it’s an AMD or an Intel CPU in the box.  
This is about what disks you have, how they are setup, what cache is activated, how much RAM you have available for OS cache etc.

 |

It is clear that IO is the reason.

I am sorry about DB size - it’s 50MB not GB.

But the question is: why a performance degradation take place on Intel PC but not happens on AMD PC with the same MySQL settings.

AMD developer machine:  
OS: Windows XP 32 SP2  
MB: Epox NVidia NForce 3  
CPU: AMD Athlon 64 3000+  
Drive: Seagate Barracuda EIDE ATA-100, 7200 RPM, 8MB  
Single hard drive

Intel developer machine:  
OS: Windows XP 32 SP2  
MB: MSI P965 NEO, Intel P965  
CPU: Intel Core 2 6400 2.13 GHz  
Drive: WD Caviar SE16. SATA, 400 GB, 16 MB Cache, 7200 RPM, 300 MB/s  
Single hard drive connected through JMicron JMB36x RAID Controller as sole way of using hard drive with Intel P965 mother board logic.

HP Intel Xeon server:  
OS: Windows 2003 Standard Server R2  
CPU: 2 x Xeon 3.00 GHz  
Drive: HP Smart Array 6i (RAID 5)

I’ve tried same default my.ini on all machines as well as custom tuned my.ini’s - no diffrence.

MySQL: 5.1.12-beta  
Restoration methods:

1. With MySQL Administrator (from mysql-gui-tools-5.0-r9a-win32.msi)
2. By command: mysql -hlocalhost -u%dbuser% -p%passw% %dbname% backup\_file.sql

With the same MySQL configuration Intel machine 30 times slower as against AMD.

AMD machine: High IO load with 40-60% CPU utilization

Intel machines: High IO load with 2-4% CPU utilization

---

<div class="post-metadata">

**Author:** ![seunosewa](https://avatars.discourse-cdn.com/v4/letter/s/eb9ed0/32.png) [@seunosewa](https://forums.percona.com/u/seunosewa)\
**Post date:** [April 9, 2007, 2:10pm UTC](https://forums.percona.com/t/poor-performance-on-intel-core-2-cpu/275/5 "2007-04-09T14:10:23Z")

</div>

You can try disabling the IO operations on both PCs and then testing the performance again. You can also check the RAM. 😉

---

<div class="post-metadata">

**Author:** ![sterin](https://avatars.discourse-cdn.com/v4/letter/s/3ab097/32.png) [@sterin](https://forums.percona.com/u/sterin)\
**Post date:** [April 10, 2007, 4:58am UTC](https://forums.percona.com/t/poor-performance-on-intel-core-2-cpu/275/6 "2007-04-10T04:58:57Z")

</div>

Try setting:

innodb\_flush\_log\_at\_trx\_commit=0

and see if things speed up.

If that is set to default 1 it means that the transaction log needs to be flushed to disk after each transaction. And if you are running in autocommit mode then every statement is a transaction.

And basically a disk actually only supports about 167 flushes per second:

| [B]Quote:[/B] |
| 

Wrap several modifications into one transaction. InnoDB must flush the log to disk at each transaction commit if that transaction made modifications to the database. The rotation speed of a disk is typically at most 167 revolutions/second, which constrains the number of commits to the same 167th of a second if the disk does not “fool” the operating system.

 |

So if your disk on the AMD is reporting that it has written it to disk although it only has stored it in cache.  
While your Intel machines is waiting for the writing to actually occure it would give two very different figures for speed.

BTW do you have a write cache on the HP RAID installed?

Also:

| [B]Quote:[/B] |
| 

When importing data into InnoDB, make sure that MySQL does not have autocommit mode enabled because that requires a log flush to disk for every insert. To disable autocommit during your import operation, surround it with SET AUTOCOMMIT and COMMIT statements:

SET AUTOCOMMIT=0;  
… SQL import statements …  
COMMIT;

If you use the mysqldump option --opt, you get dump files that are fast to import into an InnoDB table, even without wrapping them with the SET AUTOCOMMIT and COMMIT statements.

 |

See here:  
[URL=“http&#58;&#47;&#47;[dev.mysql.com/doc/refman/5.1/en/innodb-tuning.html](http://dev.mysql.com/doc/refman/5.1/en/innodb-tuning.html)”][http://dev.mysql.com/doc/refman/5.1/en/innodb-tuning.html[/URL]](http://dev.mysql.com/doc/refman/5.1/en/innodb-tuning.html%5B/URL%5D)

---

<div class="post-metadata">

**Author:** ![lapa](https://avatars.discourse-cdn.com/v4/letter/l/f08c70/32.png) [@lapa](https://forums.percona.com/u/lapa)\
**Post date:** [April 21, 2007, 3:06am UTC](https://forums.percona.com/t/poor-performance-on-intel-core-2-cpu/275/7 "2007-04-21T03:06:24Z")

</div>

| [B]sterin wrote on Tue, 10 April 2007 13:28[/B] |
| Try setting:

innodb\_flush\_log\_at\_trx\_commit=0

 |

Your prompt advice had helped me a lot.

Sterin, great thanks!

To Swedish developers  
 ![](https://us1.discourse-cdn.com/flex019/uploads/percona1/original/2X/2/289fb033e12bd672070b820134b3846a1a93f1ea.png)

From Ukrainian developers  
 ![](https://us1.discourse-cdn.com/flex019/uploads/percona1/original/2X/f/f3c6b1812ff7a6d69c2fea5ca0b4f53728c2b04a.png)

---

<div class="post-metadata">

**Author:** ![kintlawy](https://avatars.discourse-cdn.com/v4/letter/k/3ab097/32.png) [@kintlawy](https://forums.percona.com/u/kintlawy)\
**Post date:** [January 25, 2008, 5:30am UTC](https://forums.percona.com/t/poor-performance-on-intel-core-2-cpu/275/8 "2008-01-25T05:30:07Z")

</div>

Hi,

I just wanted to let you know that aside from being a MySQL demi-God, you are a gentleman and a scholar. Your suggestion here has fixed a slow update problem that has been driving me bananas for two years now (the performance issue was only showing up on _some_ of my servers).

Thanks a million from a programmer in France. D 😃
