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

Tobias Oetiker tobi at oetiker.ch
Wed May 30 13:22:48 CEST 2007


Hi Dave,

as fahr as I have seen, linux (at least) will keep newly written
blocks in cache anyway (since they are dirty) I have not seen
freshly ready blocks to be evicted yet, I guess the frequency of
use only plays a role as to which 'old' blocks to evict ... all
in all, the result is that

rrd_create (especailly) as well as the 'large read' commands will
evict the 'interesting' blocks paged in through rrd_update during
the last update cycle ...

I grant you that one may want to prevent DONTNT need to be set on
fetch if one knows that subsequent graph or fetch commands will use
the data ... so this should be available as a commandline option
...  --keep-cache

as for determining which rra block will be written next, this is
pretty simple from the header information ... due to rrds
write-forward nature, it is certain within a single rrd file which
blocks will be accessed next ... for bulk updates this does have
other implications I agree.

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 ...

> > ok convinced ... sunos3 (or whatever os changed the page size)
> > compatibility is probably not such an issue ...
>
> I would expect to see an 8KB page size on 64-bit archs.  (For instance
> Linux on alpha even has an 8KB block size for ext2.)

the problem just arises when page-size for a program can be
different from compile time to execution time ... are there any
oses that have this issue today ?

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