How to read fastly files ( I/O operation)

FG home at fgda.pl
Thu Feb 7 03:11:40 PST 2013


On 2013-02-07 08:26, monarch_dodra wrote:
>> You have timed the same file SRR077487_1.filt.fastq at 67s?
>
> Yes, that file exactly. That said, I'm working on an SSD, so maybe I'm less IO
> bound than you are?

Ah, now that you mention SSD, I moved the file onto one and it's even more
clear that I am CPU-bound here on the Intel E6600 system. Compare:

     7200rpm: MS 4m30s / FG 1m55s
     SSD:     MS 4m14s / FG 1m44s

Almost the same, but running the utility "wc -l" on the file renders:

     7200rpm: 1m45s
     SSD:     0m33s

In my case threads would be beneficial but only when using the SSD.
Reading the file by chunk in D takes 33s on SSD and 1m44s on HDD.
Slicing the file in half and reading from both threads would also
be fine only on the SSD, because on a HDD I'd lose sequential disk
reads jumping between threads (expecting lower performance).

Therefore - threads: yes, but gotta use an SSD. :)
Also, threads: yes, if there's gonna be more processing than just
counting letters.


More information about the Digitalmars-d-learn mailing list