Date: Mon, 23 Apr 2007 21:21:02 -0700 From: David G Lawrence <dg@dglawrence.com> To: Tim Kientzle <kientzle@freebsd.org> Cc: current@freebsd.org, "Jesper B. Rosenkilde" <jbr@humppa.dk> Subject: Re: Suggestions on Avoiding syscall Overhead Message-ID: <20070424042102.GI38475@tnn.dglawrence.com> In-Reply-To: <462D821F.6030707@freebsd.org> References: <f126fae00704221639l68095de1ye7ce9ba3d921bf20@mail.gmail.com> <20070423113400.GC28587@gw.humppa.dk> <462CD251.9060105@freebsd.org> <20070423161711.GV39474@elvis.mu.org> <462D821F.6030707@freebsd.org>
next in thread | previous in thread | raw e-mail | index | archive | help
> >>>>getuid, geteuid, getpid,getgid, getegid, getpgrp, > >> > >>I don't really understand this suggestion. > >>Do any real programs call these syscalls very often? > > > >There is indeed more and more programs calling some syscalls a > >*lot* .... MySQL calls gettimeofday() so much that changing > >the timer used on a system can lead to a very observable performance > >improvement. Similarly, PostgreSQL calls setproctitle() a lot ... > > Accelerating gettimeofday() makes a lot of sense; I've seen a > lot of programs that call it very often. gettimeofday(2) returns microsecond precision, so I don't see how this could be made accelerated via a mapped global page. time(3) [which is currently a wrapper for gettimeofday(2)], on the other had, could be put into such a page since it only updates once a second. Generally, I think that there are enough commonly used syscalls that would benefit from this that it is probably a good idea - at least a single system read-only page. I don't think it would be worth wasting a page for every process for process-specific data, however - the cost of allocating it, initializing it, etc, for every fork() would be a pessimization in most cases, I think. -DG David G. Lawrence President Download Technologies, Inc. - http://www.downloadtech.com - (866) 399 8500 The FreeBSD Project - http://www.freebsd.org Pave the road of life with opportunities.
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20070424042102.GI38475>