From mboxrd@z Thu Jan 1 00:00:00 1970 From: danielhilst@gmail.com (Daniel Hilst Selli) Date: Tue, 23 Apr 2013 12:53:13 -0300 Subject: [rrd-users] Can small writes generate a lot of faults? In-Reply-To: <9358EF77-C6D9-495B-93DE-89994A121517@oetiker.ch> References: <5171BA2D.1040305@gmail.com> <9358EF77-C6D9-495B-93DE-89994A121517@oetiker.ch> Message-ID: <5176AE69.10006@gmail.com> To: kernelnewbies@lists.kernelnewbies.org List-Id: kernelnewbies.lists.kernelnewbies.org Em 20/04/2013 09:09, Tobi Oetiker escreveu: > hi daniel > > On 19.04.2013, at 16:42, Daniel Hilst Selli wrote: > >> AFAIK, major page faults are generated when data that is not yet present >> on RAM is loaded from disk, but in this case data is being write do >> disk, I can't >> see how writes can generate faults, but still, it seems that is >> happening, ... !? >> > rrdtool changes just few bytes in the rrf file with each update > > the OS though can only write a complete block of data to disk. > > so when you write a byte to a file, the OS has to first fetch the block, modify the byte and write the block back > > that is why rrdtool benefits greatly from more RAM as it can hold mor blocks in RAM and does not have to read them first. > > cheers tobi > Thanks Tobi, I had no idea about this read/update/write process, Now I know how to improve the performance of my collectd+rrdtool stuff, Cheers