|
From: Leif M. <lei...@ta...> - 2009-08-07 06:20:23
|
Stas, I have been looking into this again the last couple days. While I can't say that I understand it fully, I am getting closer to doing so. If you run "ps -eo pid,ni,pri,comm" you will see the nice level along with the priority. The priority actually changes over time depending on the CPU usage. For an idle Java application, it is also different when running a Java application using Swing vs one that is not. If I run the Wrapper with a nice value of 10, then the Wrapper and Java are both shifted in priority by exactly 10 as expected. On my linux machine, running a headless Java application under the Wrapper, the wrapper process will have a priority of 24 and java will be 17. Another test had it at 19 however. If I use the generated command line to launch java directly it will have a priority of 19. This means that java gets a lower priority when running under the Wrapper as you reported. The thing that I am yet to understand is why the stand alone Java is not getting the same priority as the Wrapper, 24. I did some experiments with loading up Java etc and it appears to dynamically change the priority depending on other demands on the system. In one test, the Wrapper had priority 24, but the java process fluctuated between 20 and 22. If anyone could shed some light on how this is supposed to be working I would appreciate the input. Ideally it would be nice if Java always got the same default idle priority when running under the Wrapper as when running standalone. It does sometimes, but most of the time it is lower. A work around is to set the PRIORITY in the shell script to -2. That requires that the user be root to do so however. Cheers, Leif On Thu, Aug 6, 2009 at 6:47 AM, Stas Oskin<sta...@gm...> wrote: > Hi Leif. > > How are you? > >> Currently, the Wrapper is not doing anything special with the process >> priorities. It appears that the OS launches all "top-level" processes >> at the same level. Ie the Wrapper, or Java when run standalone. Then >> child processes are given a lower priority. When Java is run under >> the Wrapper, this means that it is getting a slightly lower priority >> than it would if it was run standalone. >> >> We are looking into options to work around this. > > I'm looking to give a 2nd try for Tanuki wrapper - any idea if this issue > was resolved on Linux? > > Thanks. -- Leif Mortenson Tanuki Software, Ltd. 6-16-7-1001 Nishi-Kasai, Edogawa-ku Tokyo 134-0088 Japan Tel/Fax: +81-3-3878-3211 http://www.tanukisoftware.com lei...@ta... |