Re: [PATCH] improving O(1)-J9 in heavily threaded situations

Ingo Molnar
2002-02-04T10:40:27Z

On Sun, 3 Feb 2002, Ed Tomlinson wrote:

> One point that seems to get missed is that a group of java threads,
> posix threads or sometimes forked processes combine to make an
> application. [...]

yes - but what makes them an application is not really the fact that they
share the VM (i can very much imagine thread-based login servers where
different users use different threads - a single application as well?),
but the intention of the application designer, which is hard to guess.

if this becomes inevitable then perhaps a better line we can guess along
is the child-parent relationship. Looking at 'pstree' output shows some
clear application boundaries. I'd say an application are 'all children of
a parent'. Ie. if two threads (shared VM or not shared VM, does not
matter) have the same parent (which is not init) then they form an
'application'. This will cover FreeNet java threads just as well as
hundreds of Apache processes.

but this method is guesswork as well, so it could mishandle certain cases.
Eg. i'm quite certain that most people would notice the interactive
effects if we handled all processes forked by kdeinit as a single
application. So lets do it only if everything else fails to fix your
workload.

Ingo