xerces8

Slower with NCQ ?

Recommended Posts

Hi!

In theory NCQ should speed up things when multiple threads/taks/processes/programs are accessing the hard drive, right ?

But I see the opposite.

My mainboard (details below) can run its ICH9R SATA adapter in legacy or AHCI mode.

I noticed, that in AHCI mode (it allows NCQ, as opposed to legacy mode) I get huge (reproducible) slowdowns.

I did the following test procedure:

Preparations

- create a test directory , like : md C:\src

- put two large (gigabyte) files in it ([1])

- create a destination directory, like : md c:\dest

Test run:

- reboot (to make same conditions for each test run)

- open a command prompt (cmd.exe)

- run the command : copy c:\src c:\dest

- while the copy is running, open the start menu and start Wordpad

- after Wordpad starts, close it

- from the start menu start (and again immediately close) also: Notepad, Calculator, Paint

(They are all under "All Programs"/"Accessories")

(note: do this while the copy is running)

Measure the time it takes to start each program (no need for a clock, counting seconds in your head is more than enough).

What happens on my system is this :

- in legacy mode, each program starts in a seconds (Wordpad, being larger, takes 3-5 seconds)

- in AHCI mode, it sometimes it takes 2 seconds, sometimes it takes a minute ! Often, it takes 10 seconds just for the Start submenus to open.

I tried several operating systems: Windows 2003 Enterprise, Vista Enterprise, Windows XP Professional SP2, Windows 2008 x64

In all cases: legacy mode works smooth, AHCI mode have the "minute to start wordpad" problem.

Driver used:

- for legacy mode : Windows builtin Standard IDE driver

- for AHCI mode :

-- Windows XP and 2003 : Intel Matrix Storage Manager v7.8

-- Windows 2008 and Vista : msahci.sys (Windows builtin AHCI driver)

-- Vista : also tried Intel Matrix Storage Manager v7.8

There was only one exception to the "AHCI is much slower" result: Windows XP Pro SP2, updated to SP3, then cloned to another partition and finally changed from legacy mode to AHCI (by: force install the intel driver, reboot, change setting in BIOS, boot Windows)

In this case, I did not see the problem.

I contacted MS newsgroups, Asus support, Intel support. But no useful response. (Intel said : We have not replicated such issue nor have other customers reported it.) Talks with Asus are ongoing.

Did anyone experience this ?

Solution ? Just run in legacy mode ?

Regards,

David

[1] - I used the two freely downloadable iso images from this page : Windows Server 2008 Trial Software

My system details:

mainboard : Asus P3K-E WiFi AP , BIOS version 1013, Intel P35 & ICH9R chipset

CPU: Intel Q6600 (not overclocked)

RAM: 4x2GB DDR2-800 (Transcend JM800QLU-2G)

gfx: Gigabyte GV-NX88T512HP/typeA

HD: Western Digital WD7500AAKS - connected to one of the ICH9R SATA ports

optical: Samsung SH-S203P - connected to one of the ICH9R SATA ports

(problem same even if I disconnect the optical unit)

Share this post


Link to post
Share on other sites

Your I/O queue depths aren't enough for NCQ to do anything beneficial. Your tasks are far more likely to be bound by something else in your computer, including driver issues.

Share this post


Link to post
Share on other sites

Well NCQ has been a very mixed bag from the start. Back in the early days I think pretty much everyone was saying turn it off for desktop use, full stop - what we think of as multiple tasks (ie file copy and launch notepad) isn't the sort of multi-tasking servers with databases etc have to do. More recently I saw a thread here on the 7200.11 Seagate drive, where the poster used a little program that tested read speeds I believe it was at different segments of the drive, and the results looked like even when trying to access two places far apart (in the physical sense) on the drive the results were very promising. Personally I don't have the variety of drives to be able to comment much, however the conclusion I took away and am still sticking with is that when in doubt turn off NCQ, and that at the very best as the saying goes "YMMV". There are settings for the controllers and/or drives in Device Manager in XP, you can give toggling those a try (tagged command queuing, etc - I'm not sure but it's possible I think that the OS tried to optimise commands via it's command queuing system and then the drive does it's own as well and together they are destructive).

On a complete tangent, it seems support at even the largest "respectable" tech companies these days is a total waste of time and I find that ridiculous. Like for example when my LSI RAID card didn't work on my Gigabyte mobo, Gigabyte said oh well it's LSI's responsibility to take care of compatibility and LSI said it's Gigabyte's. Very helpful for the customer, and that's just one example of MANY.

Share this post


Link to post
Share on other sites
In theory NCQ should speed up things when multiple threads/taks/processes/programs are accessing the hard drive, right ?

In theory, NCQ starts being relevant for queue depth >2 (intensive concurrent usage requires at least 32 queue depth)

In theory, NCQ has a very small execution cost, about 0.1 ms, that you may see on single access like benchmark.

==> You "may" explain a 1s delay with 1000 io which is really above your test usage so it looks more like a driver or OS parameter issue

Share this post


Link to post
Share on other sites

In device manager there are no options for the Intel AHCI driver.

The only choice I see is AHCI versus legacy mode.

So I should just switch over to legacy and forget about AHCI ?

Are there any important differences ?

(the only one I know is hot-plug support in AHCI)

David

PS: Yes, support sucks big time...

Share this post


Link to post
Share on other sites
Of course. So besides NCQ and hot-plug, is there anything else ?

I thought the other big aspect of ACPI was power management. So I don't know about you, but that doesn't seem too important to me as far as the drives are concerned.

I didn't mean options for the ACPI driver. I meant options for the harddrives themselves (always have at least a couple options) and/or the Intel storage controller.

In general it sounds like you should stick to legacy, unless you find some options you can play around that help.

Edited by Fedor

Share this post


Link to post
Share on other sites
Of course. So besides NCQ and hot-plug, is there anything else ?

I thought the other big aspect of ACPI was power management. So I don't know about you, but that doesn't seem too important to me as far as the drives are concerned.

I didn't mean options for the ACPI driver. I meant options for the harddrives themselves (always have at least a couple options) and/or the Intel storage controller.

In general it sounds like you should stick to legacy, unless you find some options you can play around that help.

Man I musta been tired or something, don't know how I went from AHCI to ACPI. I think long story short you should go with legacy mode if AHCI hinders performance, plain and simple.

Share this post


Link to post
Share on other sites

Given that nobody else has seen this in Windows on an ICH*R, consider other faults.

What hard drive do you have? It could have broken SATA2 firmware.

Share this post


Link to post
Share on other sites

Nope, not seeing this problem, and I've exclusively run my personal systems in AHCI mode since ICH7.

In addition the majority of Workstation we build are either run in AHCI or RAID mode on ICH7, ICH8 & ICH9, and have not seen this

We tend to exclusively use WD 10000rpm Raptors and Seagate 7200rpm Barracudas

I suspect the problem is really related to your system, most likely some software/driver/firmware is misbehaving or you a faulty component

Share this post


Link to post
Share on other sites
Nope, not seeing this problem, and I've exclusively run my personal systems in AHCI mode since ICH7.

In addition the majority of Workstation we build are either run in AHCI or RAID mode on ICH7, ICH8 & ICH9, and have not seen this

We tend to exclusively use WD 10000rpm Raptors and Seagate 7200rpm Barracudas

I suspect the problem is really related to your system, most likely some software/driver/firmware is misbehaving or you a faulty component

NCQ vs. NO NCQ benchmarks:

http://home.comcast.net/~jpiszcz/ncq_vs_noncq/index.html

Share this post


Link to post
Share on other sites

How do you turn NCQ on and off ?

I tried with a new HD (Samsung F1 640GB - HD642JJ). It seems a bit better (less slowdown in AHCI mode), but still noticeable difference compared to IDE mode. :(

I also saw Intel released a new version of their driver (Intel Matrix Storage ... v8.2), but it does not help.

Share this post


Link to post
Share on other sites

personally I think the intel ncq implementation isnt optimal, I have found jmicron to have better results on NCQ drives, in addition some drives have very bad NCQ implementation so its a shot in the dark how well it performs, my advice is only enable it for the os drive and all data storage drives and especially media drives use legacy ide mode.

Another problem is all ICH ide drivers earlier than 8.0 dont allow write cache in ahci mode which will have a significant impact on performance.

Share this post


Link to post
Share on other sites

That drive does not seem to support NCQ properly as one user posted on my thread. Put a Seagate 7200.11 and try with that.

Also... Windows AHCI driver does not work with NCQ properly. Use only Intel.

Edited by 6_6_6

Share this post


Link to post
Share on other sites
Nope, not seeing this problem, and I've exclusively run my personal systems in AHCI mode since ICH7.

In addition the majority of Workstation we build are either run in AHCI or RAID mode on ICH7, ICH8 & ICH9, and have not seen this

We tend to exclusively use WD 10000rpm Raptors and Seagate 7200rpm Barracudas

I suspect the problem is really related to your system, most likely some software/driver/firmware is misbehaving or you a faulty component

NCQ vs. NO NCQ benchmarks:

http://home.comcast.net/~jpiszcz/ncq_vs_noncq/index.html

I am sorry, this all is misleading. It all comes down to blocking. I don't really care if it takes 5 mins for a copy to finish on non-ICQ drive while I cannot use anything else until that copy finishes when i can have an NCQ drive that takes the same copy to finish in 10 mins but allows me instant access to anything else i might throw at it while doing that copy.

The results are very pronounced in real-world as opposed to minute percent performance differences in benchmarks. I also do have 15K U320 Cheetahs and i would take a SATA drive with properly working NCQ any time of the day.

Share this post


Link to post
Share on other sites
my advice is only enable it for the os drive and all data storage drives

I repeat my question : How ? ;)

(... to turn on and off NCQ)

cant turn it on and off per drive on ICH chipsets, if bios is in RAID or AHCI mode NCQ will be used, if in IDE mode it wont be used.

I moved my samsung f1 to my jmicron 2 days ago, the jmicron is in ide mode and the ICH is in RAID mode.

On the ICH7 port playing videos had stutters and the drive seemed to generally struggle to play the file, delays on seeking etc. waiting for drive.

On the jmicron the hd light is on way less and seeking is instant, not a single stutter even when machine is under heavy load.

So the results are clear on this drive.

Nope, not seeing this problem, and I've exclusively run my personal systems in AHCI mode since ICH7.

In addition the majority of Workstation we build are either run in AHCI or RAID mode on ICH7, ICH8 & ICH9, and have not seen this

We tend to exclusively use WD 10000rpm Raptors and Seagate 7200rpm Barracudas

I suspect the problem is really related to your system, most likely some software/driver/firmware is misbehaving or you a faulty component

NCQ vs. NO NCQ benchmarks:

http://home.comcast.net/~jpiszcz/ncq_vs_noncq/index.html

I am sorry, this all is misleading. It all comes down to blocking. I don't really care if it takes 5 mins for a copy to finish on non-ICQ drive while I cannot use anything else until that copy finishes when i can have an NCQ drive that takes the same copy to finish in 10 mins but allows me instant access to anything else i might throw at it while doing that copy.

The results are very pronounced in real-world as opposed to minute percent performance differences in benchmarks. I also do have 15K U320 Cheetahs and i would take a SATA drive with properly working NCQ any time of the day.

yeah depends on the drive, on the samsung f1 in NCQ mode the entire system pretty much freezes when copying large files. The iastor process locks up which is part of the ICH drivers.

I now plan to do large file copying tests on all the other drives on the ICH controller to see if they are actually compatible.

Share this post


Link to post
Share on other sites
my advice is only enable it for the os drive and all data storage drives

I repeat my question : How ? ;)

(... to turn on and off NCQ)

In Windows or Linux?

Not sure in Windows.

Share this post


Link to post
Share on other sites

Why don't you just run hd_speed for 1, 2 and 9 instances and post the results? If NCQ is working properly, your throughput will remain the same. If it is not, there will be a large drop in throughput for anything more than a single instance. I wrote a whole thread on NCQ based on czr's initial post. Why to waste all this time if you can just run a bench for 5 mins and find out for sure if it is working or not?

I spent months on my config with Samsung 500GB... Apparently, the drive did not implement NCQ properly even though NCQ was advertised all over. Save yourself the hassle.

Edited by 6_6_6

Share this post


Link to post
Share on other sites
Why don't you just run hd_speed for 1, 2 and 9 instances and post the results?

OK, I started HD_Speed v1.5.4.72, selected the F: drive (a 300 GB partition in the test disk) and Block Size 64KB.

A single instance shows 110 MBytes/s. If I start another one, both show around 33 MB/S.

If I start a third one, all 3 show 16 MB/s.

This is a Samsung HD642JJ (F1 640GB) disk.

Controller is in IDE legacy mode.

I get similar results if I select PHYSICALDRIVE1 instead of F:.

The results for the WD7500AAKS (PHYSICALDRIVE0 , 64KB block size):

- 1 instance : 95 MB/s

- 2 instances : each 34 MB/s

- 3 instances : each 19 MB/s

I will now switch to AHCI mode and post results in a few minutes (hopefully).

Share this post


Link to post
Share on other sites

I now did the AHCI mode.

On the WD7500AAKS it behaves very strange. I again started 3 instances with 64KB block size.

One instance runs at full speed (about 90 MB/s) for several seconds (like 10), during which the other two are at 0.00 KB/s), then another instance gets the full speed and the other two again have zero.

See picture.

The HD642JJ on the other hand run at 110 MB/s in one instance. When 2 are running, both measure 3.6 MB/S (10 times less than in IDE mode) and 3 instances each measure 2.5 MB/s.

In each case AHCI sucks compared to IDE mode.

This was again on Windows 2008, with MS AHCI drivers ("Standard AHCI 1.0 Serial ATA Controller" msahci.sys , version 6.0.6001.18000)

I will try Intel drivers next.

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now