Is catalog running on modern operating systems slower when it is multithreaded?

As soon as I got the theory that on modern operating systems, multithreading read access on the hard drive should work better.

I thought that: the
operating system queues all read requests, and rebuilds them so that it can read from the HDD more sequentially. The more requests he receives, the better he will be able to reorder them to optimize the reading sequence.
I was very sure that I read it somewhere several times.

But I did some benchmarking and had to find out that multithreading read access is generally much worse and never works better.

I had experience working under Windows and Linux. I compared pure file searches using operating system tools, and also wrote my own small landmarks.

Am I missing something?
Can someone explain to me the secrets of this topic?
Thank!

+1
source share
6 answers

Well, apparently, you are forcing the reader to slip through the whole place. Your bottleneck is the disk, not the processor.

For a repeated phrase, the CPU may be parrallel, but not on disk.

+2
source

: NCQ . SATA AHCI.

:

. :

  • 1 ​​:
  • 4 : ! .

, . (, , ) .

, , NCQ ( ), , .

SCSI . SATA . , AHCI - NCQ!

, BIOS. SATA :

  • / IDE
  • AHCI

i , :

  • 4 , IDE:
  • 4 , AHCI/NCQ: . 6 !

-

:

  • AHCI ( NCQ)
  • AHCI, . . : Windows 7 AHCI, . Intel , " " Intel (, Intel RST 11.7). , , .

, . , .

-

: , : NCQ "" ( , ). : "" . .

:

  • / SATA HDD AHCI. .
  • "" AHCI IDE AHCI. .
+2

, , , , . .

, - - , .

, , ? .

, () Windows, , ? .

, .

-Rick

+1

, . , , / - , . . ( , .) , , . .

+1

, , . :

, Linux AHCI . Windows XP , , AHCI . Windows Vista AHCI, NCQ. FreeBSD AHCI NCQ 8.0.

, , NCQ , / . , , , .

+1
source

It is probably important here that you separate the reading of the directory or file information from the processing of this information. In other words, an IO drive in one thread, processing and searching in another. Pass the completed IO information to the queued queue. By doing this, you will ensure that the IO thread never waits for the results to be processed before reading the next data block for processing.

+1
source

Source: https://habr.com/ru/post/1735013/


All Articles