Tuesday, 20 August 2013

Are short-lived files flushed to disk? [migrated]

Are short-lived files flushed to disk? [migrated]

My program creates many small short-lived files. They are typically
deleted within a second after creation. The files are in an ext4 file
system backed by a real hard disk. I know that Linux periodically flushes
(pdflush) dirty pages to disk. Since my files are short-lived, most likely
they are not cached by pdflush. My question is, does my program cause a
lot of disk writes? My concern is my hard disk's life.
Since the files are small, let's assume the sum of their size is smaller
than dirty_bytes and dirty_background_bytes.
Ext4 has default journal turned on, i.e. metadata journal. I also want to
know whether the metadata or the data is written to disk.

No comments:

Post a Comment