Version 1.3.0 of rrdtool calls msync() for each update, which is necessary under Linux but severely impacts update performance under FreeBSD. Due to differences in the buffer caches of the different platforms, msync() is obsolete under FreeBSD but necessary under Linux (see the man page for each platform.) Fix: *** src/rrd_open.c.orig Fri Jun 27 20:55:00 2008 --- src/rrd_open.c Fri Jun 27 20:55:20 2008 *************** *** 388,396 **** int ret; #ifdef HAVE_MMAP - ret = msync(rrd_file->file_start, rrd_file->file_len, MS_ASYNC); - if (ret != 0) - rrd_set_error("msync rrd_file: %s", rrd_strerror(errno)); ret = munmap(rrd_file->file_start, rrd_file->file_len); if (ret != 0) rrd_set_error("munmap rrd_file: %s", rrd_strerror(errno)); --- 388,393 ---- Patch attached with submission follows: How-To-Repeat: Do back-to-back updates using some fast rrdtool language bindings and watch as it goes really slow.
Maintainer of databases/rrdtool, Please note that PR ports/125056 has just been submitted. If it contains a patch for an upgrade, an enhancement or a bug fix you agree on, reply to this email stating that you approve the patch and a committer will take care of it. The full text of the PR can be found at: http://www.freebsd.org/cgi/query-pr.cgi?pr=ports/125056 -- Edwin Groothuis via the GNATS Auto Assign Tool edwin@FreeBSD.org
State Changed From-To: open->feedback Awaiting maintainers feedback (via the GNATS Auto Assign Tool)
The patch has been approved. The msync is unnecessary for FreeBSD. But the madvise is useful for big files? Please place the patch-src__rrd_open.c to the rrdtool/files directory. On Mon, Jun 30, 2008 at 2:18 PM, Edwin Groothuis <edwin@freebsd.org> wrote: > Maintainer of databases/rrdtool, > > Please note that PR ports/125056 has just been submitted. > > If it contains a patch for an upgrade, an enhancement or a bug fix > you agree on, reply to this email stating that you approve the patch > and a committer will take care of it. > > The full text of the PR can be found at: > http://www.freebsd.org/cgi/query-pr.cgi?pr=ports/125056 > > -- > Edwin Groothuis via the GNATS Auto Assign Tool > edwin@FreeBSD.org >
Responsible Changed From-To: freebsd-ports-bugs->rafan I will take it.
State Changed From-To: feedback->closed Committed. Thanks!
rafan 2008-06-30 05:52:25 UTC FreeBSD ports repository Modified files: databases/rrdtool Makefile Added files: databases/rrdtool/files patch-src-rrd_open.c Log: - Remove unnecessary msync() which impact performance a lot - Bump PORTREVISION PR: ports/125056 Submitted by: Marcus Reid <marcus at blazingdot.com> Approved by: maintainer Revision Changes Path 1.77 +1 -0 ports/databases/rrdtool/Makefile 1.1 +12 -0 ports/databases/rrdtool/files/patch-src-rrd_open.c (new) _______________________________________________ cvs-all@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/cvs-all To unsubscribe, send any mail to "cvs-all-unsubscribe@freebsd.org"