[rrd-developers] Use of madvise / msync kills performance for me

Marcus Reid marcus at blazingdot.com
Fri Jun 27 22:41:59 CEST 2008

On Fri, Jun 27, 2008 at 01:13:17PM +0200, Bernhard Fischer wrote:
> On Fri, Jun 27, 2008 at 02:58:15AM -0700, Marcus Reid wrote:
> >
> >Matt Dillon provided some good information on this subject that I would
> >like to pass on.  First, a little background..  I discovered that the
> >long slow msync() calls only happen on files over a certain size.  The
> >file that's slowing things down is 1161mB long, and msync() calls to a
> >file that's 940mB long are fast.  That's probably a kernel problem that
> >could be worth looking into.
> eh, that's quite big, an order of magnitudes bigger than my files, at
> least.
> >
> >This is probably an edge case -- I'm updating an rrd file that's over
> >a gig in size and I don't know how common that is.

Well, this is starting to feel like beating on a dead horse, but
I've been doing some more testing and msync() makes things really
slow for smaller files as well.

I think the main difference between the platforms is that under
FreeBSD, msync() even with MS_ASYNC doesn't return until the data
is on the physical disk, whereas with Linux it's just scheduled to
make it there at some point.  I'm not sure that this behavior will
change due to the OpenGroup spec that Matt mentioned, but I will
bring the issue up again.

I'm just going to file a PR and try and get the msync() call
patched out in the ports collection.

Thanks for your time,


More information about the rrd-developers mailing list