My question is, does the JVM support some kind of resource related to threading or processes that can lead to a fast increase in ProcessBuilder performance after a month or more of regular use? Using java 6 update 21 for all applications.
Over the past few months, we noticed that one server in our data center (Sparc M4000 running on Solaris 10) can run for about 6-8 weeks without any problems. However, fast performance in an application that uses the ProcessBuilder class to run scripts is a huge success - with ProcessBuilder.start it takes more than a minute to sometimes return. After a reboot and within a few weeks thereafter, the normal return time is in the range of 10 to 100 milliseconds.
I wrote a separate small application that creates 5 threads, and each thread runs the ls command using ProcessBuilder 10 times in a row, then I collect statistics to track the original problem. This application exits after each run and runs from cron only once per hour. It usually takes just a second or two.
Last night, ProcessBuilder again increased to a minute for each call to ProcessBuilder.start after 45 days of uptime and normal behavior.
top does not display memory or processors. I tried to make jstack in a test application, but got the error "Could not create thread_db agent".
Any ideas?
source share