[rrd-developers] [PATCH,RFC] optional mmap based file I/O

Tobias Oetiker tobi at oetiker.ch
Wed May 30 23:37:02 CEST 2007


> > A further optimization for bulk updates would be to always write a
> > full block of data in one go, this would prevent the os from
> > reading the current block back in ...
>
> We don't really need to do anything to get this optimization since
> it is essentially what happens already with asynchronous writes by
> update/bdflush/pdflush, as long as you do a bunch of updates in a
> small number of seconds on a page that is in cache, the writes get
> coalesced (in each dirty page), and written out together.  This is
> what we've observed with Dale Carder's RRDCache application level
> cache strategy.  The CSV "journal" method that Kevin mentioned recently
> sounds essentially the same: i.e just save up the update arguments
> in a journal, then group them by RRD file and call update many times
> in quick succession, periodically.

yes, 'if the block is in cache' ... if the block is not in cache,
it will have to be read first ... where as if we write a whole block
in one go, there is no need to read the previous state back from
disk first, which should result in a 50% speedup ... (not tested)

> Oh, I misunderstood.  You're trying to decide whether to test page
> size at run-time (or compile-time)?  I'd do run-time: sysconf()
> or getpagesize() must be nominal operations.

yep it seems so ...

cheers
tobi


-- 
Tobi Oetiker, OETIKER+PARTNER AG, Aarweg 15 CH-4600 Olten
http://it.oetiker.ch tobi at oetiker.ch ++41 62 213 9902



More information about the rrd-developers mailing list