| Poor performance on Intel Core 2 CPU [message #1045] |
Sun, 08 April 2007 09:56  |
lapa Messages: 3 Registered: April 2007 Location: Ukraine |
Junior Member |
|
|
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
[Updated on: Sun, 08 April 2007 10:01]
|
|
|
|
|
| Re: Poor performance on Intel Core 2 CPU [message #1055 is a reply to message #1047 ] |
Mon, 09 April 2007 10:10   |
lapa Messages: 3 Registered: April 2007 Location: Ukraine |
Junior Member |
|
|
| sterin wrote on Sun, 08 April 2007 18:11 | 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
[Updated on: Mon, 09 April 2007 10:16]
|
|
|
|
| Re: Poor performance on Intel Core 2 CPU [message #1059 is a reply to message #1045 ] |
Tue, 10 April 2007 06:28   |
sterin Messages: 324 Registered: March 2007 Location: Sweden |
Senior Member |
|
|
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:
| Quote: |
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:
| Quote: |
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:
http://dev.mysql.com/doc/refman/5.1/en/innodb-tuning.html
[Updated on: Tue, 10 April 2007 06:31]
|
|
|
|
|
|