B
bugbear
I'm using tomcat on Solaris with around 100 threads.
This is perfectly normal and mundane, and works well.
However, I have now noticed that when the JSP's
call system() (either via runtime.exec or new processBuilder)
the whole thing slows down a lot, and the kernel
usage goes crazy. Idle time goes UP (which is odd).
JSP response tanks.
No, I can't stop shelling out from tomcat :-(
I have traced this problem to fork(), to whit:
The fork() and fork1() functions suspend
all threads in the process before proceeding.
(ref:
http://docs.sun.com/app/docs/doc/816-0212/6m6nd4n9e?a=view
)
They're all started up again after the fork(), of course, and
I have confirmed this diagnosis by crawling over an ENORMOUS
truss output log.
Now, with 100 tomcat threads, this is a bit of an overhead (*)
It appears that multithreaded Java and fork()
on Solaris have a rather deep incompatibility.
Has any body else seen/experienced this, and
has anybody found a solution/workround?
BugBear
(*) British understatement.
This is perfectly normal and mundane, and works well.
However, I have now noticed that when the JSP's
call system() (either via runtime.exec or new processBuilder)
the whole thing slows down a lot, and the kernel
usage goes crazy. Idle time goes UP (which is odd).
JSP response tanks.
No, I can't stop shelling out from tomcat :-(
I have traced this problem to fork(), to whit:
The fork() and fork1() functions suspend
all threads in the process before proceeding.
(ref:
http://docs.sun.com/app/docs/doc/816-0212/6m6nd4n9e?a=view
)
They're all started up again after the fork(), of course, and
I have confirmed this diagnosis by crawling over an ENORMOUS
truss output log.
Now, with 100 tomcat threads, this is a bit of an overhead (*)
It appears that multithreaded Java and fork()
on Solaris have a rather deep incompatibility.
Has any body else seen/experienced this, and
has anybody found a solution/workround?
BugBear
(*) British understatement.