I recently bought HP ProLiant ML310e Gen8 v2 server with 8G's RAM and 4 HP 1TB 6G 7.2k rpm SATA (3.5in) Non-Hot Plug MDL HDD disks.
It was surprise to me that HP didn't provide debian drivers for raid controller and I had to go with software raid. I installed Debian with it's own software raid and raid level 10.
After installation I am experiencing huge performance loss and it looks like I managed to track it to MySQL operations.
Server is used mainly as Apache2 server with MySQL database.
Here is simple script that I ran to measure SQL operation times with server and my desktop PC.
$sql = "SELECT id FROM c_event";
$events = $db->getall($sql);
foreach($events as $item)
$db->query("INSERT table1 set id = {$item['id']}");
foreach($events as $item)
$db->query("DELETE FROM table1 WHERE id = {$item['id']}");
I compared results with my desktop PC with Intel Q6600, 4GB of ram and 120G SSD disk.
- desktop completed in 45 secs
- server in 2 hours, 46 mins and 18 secs.
Difference is totally insane. Any advise?
Server raid performance seems ok to me, as disks ain't top quality ones.
hdparm -t /dev/md1
/dev/md1:
Timing buffered disk reads: 1024 MB in 3.00 seconds = 341.04 MB/sec
EDIT:
IOSTAT: on problem server during test:
Device: tps kB_read/s kB_wrtn/s kB_read kB_wrtn
sda 43.00 0.00 256.00 0 512
sdb 43.00 0.00 256.00 0 512
sdc 54.00 0.00 262.00 0 524
sdd 54.50 0.00 266.00 0 532
md0 0.00 0.00 0.00 0 0
md1 129.00 0.00 520.00 0 1040
And on server with 15k SAS disks
Device: tps kB_read/s kB_wrtn/s kB_read kB_wrtn
sda 4819.50 0.00 24240.00 0 48480