From: Joseph McDonald Date: 2002-03-08T00:58:56+09:00 Subject: Re: file reading impossibly slow? >>>In 1.7, IO#read is much faster than IO#gets. Your example run >>>in 101sec, 49sec with read(65), and 19sec with read(65000). RJ>> On over 300 megs of file? It takes Windows six minutes to copy it. What are you RJ>> using for hardware / software? JM> But you're only reading, not writing. 19 seconds is in the realm of JM> possibility. Here is an example: JM> ~$ ls -l 300megs.txt JM> -rw-r--r-- 1 joe joe 300000000 Mar 7 07:38 300megs.txt JM> ~$ time cat 300megs.txt > /dev/null JM> real 0m3.733s JM> user 0m0.211s JM> sys 0m2.931s JM> 3.7 seconds to read the file. This is on a pentium 500 running JM> FreeBSD with 2 scsi disks striped. The system is fairly busy serving JM> up web and crunching data. Oh I forgot to time a copy: ~$ time cp 300megs.txt 300megs.txt.copy real 0m34.761s user 0m0.015s sys 0m5.588s so it's about 9 times faster than your 6 minutes, so perhaps you could multiply my 3.7 seconds read time by 9 to get 33 seconds "theoretical max" read time for your setup? Or just take it as another datapoint... :-) -joe