Make process title - % complete
Roman Divacky
rdivacky at freebsd.org
Tue Oct 20 17:33:21 UTC 2009
On Tue, Oct 20, 2009 at 02:42:17PM +0200, Ivan Voras wrote:
> Alex Kozlov wrote:
>
> >Of course ps or top output much more convenient, but if setproctitle so
> >expencive and will be called so often, then SIGINFO may be good
> >compromise.
>
> Regarding speed of setproctitle(), here are some microbenchmark results
> from the attached test source:
>
> getpid: 3661124.75 iterations/s
> setproctitle: 591357.56 iterations/s
>
> Meaning, setprocitle() is around 6 times more expensive than getpid(),
> meaning it can only be pulled off nearly 600,000 calls/s on a 2.3 GHz
> Core 2 CPU.
what about contention? setproctitle() is an sysctl so it will prevent
other sysctl's from working when being executed..
More information about the freebsd-hackers
mailing list