Re: Why are disk writes so slow?



-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1


As in his example (with a bufsize of 8192),

time ./a.out < 1.5M-testfile > /dev/null

runs five times faster than (clock time)

time ./a.out < 1.5M-testfile > /a.out.out

a) your 1.5M-testfile is most likely still in the cache from previous test runs or from when you created it.

b) reading and writing to the same disk, you're going to thrash the disk with seeks.

so, some other experiments to try might include:

a) create a whole bunch of test files, reboot, and then make sure you use a different test file for every run.

b) try variations where you use a ramdisk for the read and disk for the write, then a disk for the read and a ramdisk for the write, and then a ramdsik for both.

c) try reading from /dev/zero and writing to disk as the converse of reading from disk and writing to /dev/null, etc.


-Jason
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.0 (FreeBSD)
Comment: See https://private.idealab.com/public/jason/jason.gpg

iD8DBQFFGY6vswXMWWtptckRAu1QAKDg1M3AFoDyHX7Zh3pfMz5RO3zyrQCfcQor
z78KtLyYIOKzeaAzq5xYLPY=
=Xe8O
-----END PGP SIGNATURE-----
_______________________________________________
freebsd-performance@xxxxxxxxxxx mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-performance
To unsubscribe, send any mail to "freebsd-performance-unsubscribe@xxxxxxxxxxx"



Relevant Pages

  • Re: What tool to use for processing large documents
    ... cannot parse faster than the disk can read the XML data. ... Reading 10 GB off a disk will take around 3 to 5 minutes ... I forgot to mention that my logs are in zipped xml. ... Get the set of nodes matching an XPath expression. ...
    (comp.text.xml)
  • Re: *Fast* way to process large files line by line
    ... line and parse it. ... reading file loop> marshalling> parsing. ... the disk I am using is an LVM mapped ext3 local disk. ... Btw will using something like an mmap extension for ruby speed things ...
    (comp.lang.ruby)
  • Re: Poor performance from file system
    ... find a specific address on the disk. ... (I believe most hard drives now have multiple platters and multiple ... last reading ... disk temperature. ...
    (comp.os.linux.misc)
  • Re: Why does Linux slow down while accessing the disk?
    ... >> accessing the disk. ... >> I'm writing, or, to a lesser extent, reading a large ... after another delightful kernel rebuild I got: ...
    (comp.os.linux.questions)
  • Re: Scanf and number formats
    ... > before the decimal-point character (which is nonzero if the ... > largely dominated by the disk I/O rate... ... > reading the data from memory, as if it were using getcto fetch ...
    (comp.lang.c)