Re: ps performance sucks (was Re: dcache_rcu [performance results])

Martin J. Bligh
2002-11-05T05:41:11Z

> Hehe. You just reinvented my old /dev/ps driver. :)

Indeed, sounds much more like a /dev thing than a /proc thing
at this point ;-)

> http://www.busybox.net/cgi-bin/cvsweb/busybox/examples/kernel-patches/devps.patch.9_25_2000?rev=1.2&content-type=text/vnd.viewcvs-markup
>
> This is what Linus has to say on the subject:
>
> ... If the problem is that /proc
> is too large, then the right solution is to just clean up
> /proc. Which is getting done. And yes, /proc will be larger
> than /dev/ps, but I still find that preferable to having two
> incompatible ways to do the same thing.

Ummm ... how do we make /proc smaller than 1 file to open per PID?
It's pretty easy to get it down that far. But it still sucks.

> I do dislike /dev/ps mightily.

Well it can't be any worse than the current crap. At least it'd
stand a chance in hell of scaling a little bit. So I took a very
quick look ... what syscalls are you reduced to per pid, one ioctl
and one read?

M.