is there a user mode way to flush disk cache

From: Eric Taylor (et2_at_rocketship1.com)
Date: 10/20/05


Date: Wed, 19 Oct 2005 20:03:38 -0700

I'm using 2.6 from rhel4 and I need to write 2 gig files quickly.

I don't care if the 2 gigs is all in the cache and nothing has
written to disk yet. I've got plenty of memory.

I need the 2 gig writes to "complete" in less than 30 seconds.
Sometimes when it gets stuck, it can take over 5 mintues and
the disk led is on solid. This seems slow to me.

I find that I can get the writes to complete the fastest if the
disk cache is nearly empty before I start. Otherwise, even
though one would think there was plenty of room left, something
hangs my program while doing writes.

My klutzy way to flush the caches is to write 8 two-gig files in
sucessesion and them rm them all.

There's gotta be a better way than this.

thanks
eric



Relevant Pages

  • Re: is there a user mode way to flush disk cache
    ... I've got plenty of memory. ... > the disk led is on solid. ... > disk cache is nearly empty before I start. ... copies the file from tmpfs to a harddrive. ...
    (comp.os.linux.development.system)
  • Re: is there a user mode way to flush disk cache
    ... I've got plenty of memory. ... > If you have plenty of RAM, then why write to disk at all? ... These are full memory checkpoints for a large simluation. ... In 2.4 this works because all the writes go into the file cache. ...
    (comp.os.linux.development.system)
  • Re: is there a user mode way to flush disk cache
    ... I've got plenty of memory. ... > the disk led is on solid. ... > disk cache is nearly empty before I start. ... I'm not sure whether you mean the system cache or the drive's on-board ...
    (comp.os.linux.development.system)
  • Re: Caching control
    ... |> | invalidate/unmap them in order to discard the data from memory. ... |> writing out to disk. ... | easy to discard as clean disk cache. ... stating that a specific amount of RAM can be used only for I/O ...
    (comp.os.linux.development.system)
  • PROBLEM: sata_sil24 lockups under heavy i/o
    ... a total of 4) and started heavy i/o (extending a software raid5 device) ... system recovers the disk transfer speed is reduced from UDMA/100 to ... Cache Line Size: 32 bytes ... parport_pc: Current parallel port base: 0x378 ...
    (Linux-Kernel)