dev@glassfish.java.net

Re: Question about SJSAS number of processes

From: Scott Oaks <Scott.Oaks_at_Sun.COM>
Date: Fri, 03 Mar 2006 10:18:31 -0500

The boxes that are showing 90+ processes must be running an old version
of the Linux kernel; it's an artifact of older Linux kernels that
threads are displayed as processes. You should consider upgrading to a
newer Linux kernel. The 8.1 appserver is only two processes (the
appserver and the imqbroker), though it has many threads.

The number of threads the appserver uses is controlled by two things:
the HTTP thread pool and the ORB thread pool. In the adminstration GUI,
you can reduce the number of both of those if you like, though it won't
help the PermGen issue.

PermGen holds class objects (and hence is unrelated to the number of
threads you have), and it's a bug that it leaks memory (though I hadn't
heard of that on 8.1). It's an open bug still for 9.0. You can continue
to increase the size of the PermGen to mitigate it (though ultimately it
won't solve the problem).

-Scott

On Thu, 2006-03-02 at 19:37, Richard Robinson wrote:
> Hello,
>
> [Let me know if I should be posting this/sending this elsewhere.]
>
>
> I couldn't find anything on glassfish or google and thought you may
> have some experience with this.
>
> I'm running 8.1_02 SJSAS on several different Linux boxes: 3 debian,
> and one Centos (2 are dev, and 2 are production). On two of the debian
> boxes, the number of appserv processes is about 90 each (ps -ef | grep
> appserv). After a while (days, weeks), what will happen is I'll get a
> PermGen space error and have to reboot the server (or box). In both
> cases, there are just the default http-server listeners (8080 and
> 8081).
>
> In the past, I've adjusted the app server's JVM as
> follows: -XX:MaxPermSize=128m and -XX:PermSize=64m. Which helps, but
> ultimately doesn't solve the problem.
>
> Any ideas on how to reduce the number of processes from 90 to
> something reasonable (5 or 10 maybe? -- presumably there is a min and
> max setting somewhere?)
>
> -- Richard