Koozali.org: home of the SME Server

Choosing IDE or AHCI for SME 8.0 for certain drives in raid or non raid.

Offline purvis

  • ****
  • 567
  • +0/-0
Testing and implementing new hardware with  Intel I5 3.0 processors with 8 gig of memory and seeing some unexpected results by using AHCI as compared to IDE hard drive setting in the bios.
I have come to some unexpected results.

FIRST, I have seen that running SME in 64 bit mode can be much slower than SME in 32 bit mode as some experienced suggested might occur.
If most  program's code is written in 32 bit code. 64 bit operating system does in fact slow things down from what I have seen.

Just the boot up time along is much slower on the machines I am upgrading too if booting to SME 64 bit operating system.
This post is not about 64 bit mode though. I just first saw the boot time greatly reduced when running in 64 bit mode using AHCI.

So I installed SME in 32 bit mode using AHCI mode for the hard drives.
I let many minutes pass after booting a new  SME 32 bit operating system.
The speed was still slower when testing my drives in AHCI mode than an older Intel Pentium-D 2.8 system with 4 gig memory.
I did many speed test on the hard drives jotting down timing numbers in AHCI and IDE mode.

I am NOT using any enterprise drives. I have a slough of Seagate drives of various sizes and firmware of the more consumer grade drives.
I also have tried some of the Samsung SSD drives 840 and 840 PRO.
What my results have pointed to is that all the Seagate drives that I tested ran much slower in booting, rebuilding a raid 1 set, and doing read and write test in ACHI mode.
The Samsung drives did better in AHCI mode.

I am not going to post any speed test because i did not do a quantitative test, but tested enough for the results I needed.
Now I will run all my servers with the Seagate drives that i use in IDE mode. The SAMSUNG drives will be run AHCI mode.

During and after long testing periods. I did do some searches on the internet.
What i did see was where it has been reported that many Seagate drives perform better in IDE mode.
Or you can say the Seagate drives i tested just did not perform well in AHCI mode.
Some searches showed where certain manufactures did better in AHCI mode than others.

I do not know how other RAiD setups would test out.

What seemed a good indicator to me if drives where better in IDE or AHCI mode, was while building a raid 1 system and after about 10 minutes into the rebuild on non SSD drives, look at the rebuild speed of a raid 1 set.
This can viewed easily while logging into the console as admin rather than root and look at disk management.

As a side note.
On the Seagate drives that i tested. If you test the drive using hdparm, such as hdparm -Tt /dev/sda, the drive will show poor performance for time after reboot. I found out that if i waited about 10 minutes. The hdparm test would show better results and more to the norm.
Later I found this site below and some notes on hdparm used with Seagate drives.
http://en.wikipedia.org/wiki/Seagate_Barracuda

Again, while doing testing of drive speed. I suggest letting at least 10 minutes pass before doing any speed test on drives.

I do not know if hot-swapping is supported by SME 8.0 using AHCI. I thought that I read that hot swapping was not supported.
If that is case, the benefit one might get from AHCI is NCQ. If that is case and manufacturer does not support NCQ as what i have read what it actual does.
I do not even know if having AHCI turned on is a benefit.
The only benefit that i have found, is that AHCI is set as the default mode in the bios and if the bios setting goes back to default for any reason, the computer will reboot possibly.
But from what i am seeing on the new motherboards is EFI is the default also. From my testing, EFI has to be turned off or legacy first, which is no longer the default. So problems booting for me still likely would exist.

What was a beautiful thing though in these testing. Is that the SME 32 bit operating system would boot up in the newer Intel machines as well as the older Intel machines that I have.
The new computers have similar ethernet devices as the older in my machines.

 






 


The rebuild of a raid 1 was much slower.

Offline stephdl

  • *
  • 1,519
  • +0/-0
    • Linux et Geekeries
Re: Choosing IDE or AHCI for SME 8.0 for certain drives in raid or non raid.
« Reply #1 on: October 13, 2013, 12:38:28 PM »
thank's for your sharing but i'm wondering if it is rather not a problem of platform not supported.
We can see a strange behaviour in this bug http://bugs.contribs.org/show_bug.cgi?id=7417 where the 64 bit version fail and not the 32 bit. However this architecture is not supported by redhat

you should take time to search if the processor you bought is supported by redhat https://hardware.redhat.com/RHEL5, and if you have a bit more of time, you should consider to install centos5 to see if the same behaviour is still present.

i fear that SME Server 8.0 becomes incompatible with newer platform one day....i hope that it will not be too soon  :(
« Last Edit: October 13, 2013, 12:40:36 PM by stephdl »
See http://wiki.contribs.org/Koozali_Foundation
irc : Freenode #sme_server #sme-fr

!!! Please write your knowledge to the Wiki !!!

Offline purvis

  • ****
  • 567
  • +0/-0
Re: Choosing IDE or AHCI for SME 8.0 for certain drives in raid or non raid.
« Reply #2 on: October 14, 2013, 07:46:52 AM »
No, i cannot speed more time on testing. I have spent many many hours already and it actually played me out.
Changes in equipment will always be an ongoing thing.
Sadly, the manufactures are not going to disclose information that may be negative to sells.
I was just sort of took off guard by some of the results I had seen.

I did do test on reading and writing of sequential and random records in the 32 bit mode. 64 bit mode just seemed too slow on what was being processed, so I did most of my testing in 32 bit mode.
I do not have any information on whether certain program where running in 64 bit mode, but my gut feelings is most code being run likely was in 32 bit.

I just wanted to make notice to those that needed absolute performance of their equipment should maybe look into running their hard drives in IDE mode as apposed to ACHI.
Only those testing their equipment can make that decision on whatever operating system and equipment they use.

I can only point out that I was very dissatisfied with my results of using ACHI mode on the Seagate drives I use.
Personally, i think this all comes down to equipment being priced cheap and research and development taking a hit because of low pricing.

If you care, i did find articles on the internet that related slow performance of some drives in AHCI mode but i did not save those to be shared.
Seems I remember Western Digital, Seagate, Hitachi, and Samsung being mentioned in a few single articles together.

Offline purvis

  • ****
  • 567
  • +0/-0
Re: Choosing IDE or AHCI for SME 8.0 for certain drives in raid or non raid.
« Reply #3 on: October 14, 2013, 10:04:05 AM »
Because I pointed to time in rebuilding a raid 1 set.
I am going to say to build a raid 1 set took about 640 minutes in AHCI mode and about 340 minutes in IDE mode for the new 2TB Seagate drives I had.
I am not where the drives are now. I had two types of the 2TB Seagate drives. I also used the same exact drives with the same firmware for building the raid 1 sets.
There was not much difference to speak of. I also had some 1TB Seagate drives that showed the same effects in timing.
All rebuilds where done after about  15 minutes of idle computer time and no other server activity. Many raid 1 rebuilds where done to confirm consistency.

With the 1TB and 2TB Seagate 7200.14 7200 rpm drives i was using.
On boot ups.
In  IDE mode it would take about 1 minute 15 seconds to 1 minute 18 seconds.
In AHCI mode, boot up would take usually about 1 minute 50 seconds to over 2 minutes.

The other testing of sequential and random reading and writing of the drives did not have such a profound difference, but it was significant differences.
I through at the disk all kinds of general test and made many self notes.
I timed software we use but i could not really get enough information and i had already over a week of testing. So i stopped.
I eventual got irritated and then tried some SSD drives. I decided on some SAMSUNG 840 PRO 128 gig SSD drives to offset my disappointment in ACHI mode that ran much better for some poorly written processes that have to be run daily.  I preferred the Samsung 840 PRO 256 gig SSD drives for longer life but i could not get my hands on them fast enough. I think drives are to be replaced in most servers after about 3 to 4 years anyways.
The Samsung SSD drives are just now going in and they are running in ACHI mode much better than IDE mode.
I am adding noatime and nodiratime lines  into the fstab file for SSD and non SSD drives these days.
« Last Edit: October 14, 2013, 10:07:57 AM by purvis »

Offline purvis

  • ****
  • 567
  • +0/-0
Re: Choosing IDE or AHCI for SME 8.0 for certain drives in raid or non raid.
« Reply #4 on: October 15, 2013, 12:18:58 PM »
These words are not for a less experienced linux user.
Those less experienced linux users need to follow basic instructions for building raid 1.

I might have found some answers.
Still doing some testing.

What I have found to be adding to a slow RAID 1 rebuild is the NCQ setting.
From what i have seen is that when the bios is set in IDE mode. NCQ  from /sys/block/sdx/device/queue_depth will be set to 1.
On my systems when the bios is set to AHCI. NCQ from /sys/block/sda/device/queue_depth is set to 31. Likely from either my drives or a default in SME.

From an internet article(below). A suggestion is to set the NCQ to 1
http://www.cyberciti.biz/tips/linux-raid-increase-resync-rebuild-speed.html
here is another article from the internet.
http://www.overclockers.com/forums/showthread.php?t=689275

I found that setting the NCQ to 1 while the BIOS is set to ACHI reduces the rebuild in half the time.

The article and other articles from the internet even suggest setting NCQ to 1 in many circumstances.
One might be if there is a raid hardware controller card.
Some suggest that setting of NCQ might conflict with some linux kernels.

I usually build all raid 1 drives while there is nobody on the server and that is also about the only way i can test anyways. I am not going to test on active server in production.
After a rebuild of raid 1. I always reboot the server.

From articles i have read on the internet and some hours testing, I have come to apply these following settings on raid 1 rebuild.
This is for a raid 1 rebuild.
I do not use spare drives in the server.

Code: [Select]
echo 1 > /sys/block/sda/device/queue_depth
echo 1 > /sys/block/sdb/device/queue_depth

echo 1024 > /sys/block/sda/queue/read_ahead_kb
echo 256 > /sys/block/sda/queue/nr_requests
echo 1024 > /sys/block/sdb/queue/read_ahead_kb
echo 256 > /sys/block/sdb/queue/nr_requests

blockdev --setra 4096 /dev/md1
blockdev --setra 4096 /dev/md2
Then from the admin console. I rebuild the raid 1 array.
After 10 minutes of the raid 1 being rebuilt. I reboot my server.

I am doing some testing using NCQ set to 1 on both drives in some production servers to see some results on normal operation.
So far, on the systems i am testing. It appears that setting  NCQ to 1 does not give a better performance.
I am using Clamscan as the testing tool simply because it times itself.

Offline purvis

  • ****
  • 567
  • +0/-0
Re: Choosing IDE or AHCI for SME 8.0 for certain drives in raid or non raid.
« Reply #5 on: October 16, 2013, 04:17:16 PM »
After doing some testing with NCQ set to 1 while the drives are in AHCI mode.
I have not seen any speed up differences from how i have used for testing.
From what I have read off the internet.

There is a lot of variables with implementing NCQ.
Drive implementation by a manufacturer.
Drive type(SSD and HDD)
Motherboard design.
Operating system setting.
How a server is being used and the software being used on it.
Different Kernels.

Just too many variables.
Many reports say that NCQ creates problems for them.
Like somebody wrote. "You just have to go by the seat of your pants."
I did read where many say that if you are using a SSD to disable NCQ.
Linux also has other setting, such as "IO scheduler" that can be changed. I have not played with that.

"You just have to go by the seat of your pants!"

Offline janet

  • ****
  • 4,812
  • +0/-0
Re: Choosing IDE or AHCI for SME 8.0 for certain drives in raid or non raid.
« Reply #6 on: October 16, 2013, 04:55:33 PM »
purvis

Did you ever think that maybe the devs have done all this work for you & made the best "all round" choice of settings.
It could just be that the slowness you refer to, is actually stability under all scenarios likely to be encountered by users installing/using SME server.

I doubt that your comments here will have any effect.
If you feel it is important to tweak these settings, then you really need to lodge a bug report.
Please search before asking, an answer may already exist.
The Search & other links to useful information are at top of Forum.

Offline purvis

  • ****
  • 567
  • +0/-0
Re: Choosing IDE or AHCI for SME 8.0 for certain drives in raid or non raid.
« Reply #7 on: October 16, 2013, 09:08:32 PM »
I don't see a bug.
I think the server runs great for the majority of peoples needs.
I dont think others know my full needs.
I am willing to share my discoveries without being asked.

Offline Stefano

  • *
  • 10,839
  • +2/-0
Re: Choosing IDE or AHCI for SME 8.0 for certain drives in raid or non raid.
« Reply #8 on: October 17, 2013, 09:49:54 AM »
purvis, thank you for sharing

about bug report: you should post your results/suggestion/ideas to bugzilla too even if it's not a bug..
this is the only way things can be changed by devs

thank you in advance, good job

Offline stephdl

  • *
  • 1,519
  • +0/-0
    • Linux et Geekeries
Re: Choosing IDE or AHCI for SME 8.0 for certain drives in raid or non raid.
« Reply #9 on: October 17, 2013, 02:37:19 PM »
Yeah stefano....you are right

Please purvis, take a walk to the wild side :p
See http://wiki.contribs.org/Koozali_Foundation
irc : Freenode #sme_server #sme-fr

!!! Please write your knowledge to the Wiki !!!