java high CPU

Need help? Post your questions here.

Moderator: moderators

java high CPU

Postby nachos » Mon Jan 31, 2011 6:24 am

Greetings,

Recently, subsonic has started causing very high CPU load on my server. Here are some details:

Pentium4 CPU 2.53GHz
2GB RAM
CentOS 5.5 running kernel: 2.6.18-194.8.1.el5 #1 SMP
collection size ~770GB
running 4.3 subonic - fedora RPM.
my library is setup like so: music -> artist-> album -> tracks

Things I've tried:
- raising subsonic memory limit from 100 (default) to 512MB
- manually initiating a scan of the music folders
- removing the music folder from subsonic and re-adding/re-scanning manually.
- simply "waiting" for the issue to go away (over a week now)
- i've tried "nice" and "renice" as i am running a linux box, but this does not seem to help. I start "subonoic" using nice, but the process "java" is what's killing my machine. Re-nicing java does not seem to help.

I've put quite a bit of time into trying to figure this out, but I'm out of ideas. Does uninstalling subsonic and then re-installing it have any merit? I'm not certain which file contains my list of users, but I'd need to save that :D The only thing I can think of that has changed recently is I did a COMPLETE removal of the entire music folder (rm -rf) and uploaded a fresh copy to the server. Not sure if that matters, but again I tried everything above after the upload to sort it out, and no dice.
nachos
 
Posts: 8
Joined: Mon Jan 31, 2011 6:05 am

Postby nachos » Mon Jan 31, 2011 6:35 am

hmm... while checking the "about" tab in subsonic, I see the following:

jetty-6.1.x, java 1.6.0_17, Linux (99.1 MB / 99.2 MB)

This seems to indicate it's still using only 100MB ram, but I edited /usr/share/subsonic/subsonic.sh and ensured that SUBSONIC_MAX_MEMORY=512. Perhaps this is not the correct file to edit for a CentOS box. I know subsonic is installed in /var/subsonic, so I'm looking into this more.
nachos
 
Posts: 8
Joined: Mon Jan 31, 2011 6:05 am

Postby nachos » Mon Jan 31, 2011 8:16 am

Sorry about the spammy updates, but I am excited to be making headway as it's been stumping me for a week. I tried starting subsonic with increased memory limit via cli instead, as the config file I edited previously didn't seem to allow subsonic to use more than 99MB (even after running for several days).

I started subsonic like this:
[root@host /var/subsonic]# subsonic --max-memory=512

and now checking the "about" tab shows:
jetty-6.1.x, java 1.6.0_17, Linux (146.7 MB / 199.9 MB)

This seems to have resolved the high CPU load and things are swell again. I'll check back in after a few days testing and let you know how it turns out.
nachos
 
Posts: 8
Joined: Mon Jan 31, 2011 6:05 am

Postby Subsonic_User » Mon Jan 31, 2011 11:00 pm

nachos wrote:hmm... while checking the "about" tab in subsonic, I see the following:

jetty-6.1.x, java 1.6.0_17, Linux (99.1 MB / 99.2 MB)

This seems to indicate it's still using only 100MB ram, but I edited /usr/share/subsonic/subsonic.sh and ensured that SUBSONIC_MAX_MEMORY=512. Perhaps this is not the correct file to edit for a CentOS box. I know subsonic is installed in /var/subsonic, so I'm looking into this more.


I'm not sure if that is the right file. (Assuming it's not because it doesn't seem to have worked.) I do know if you modify /etc/sysconfig/subsonic and restart the server it will use the amount of memory specified. Hopefully that helps with that portion.
Subsonic_User
 
Posts: 8
Joined: Sun Dec 05, 2010 4:39 am

Postby nachos » Tue Feb 01, 2011 10:53 am

Looks like making sure subsonic was actually using the added memory (512MB) resolved the problem. This was simply a matter of editing the wrong config file in my case. Thanks Subsonic_User! When I went to edit /etc/sysconfig/subsonic, I could see that 100MB was still specified in this file. Here's the step-by-step in case this turns up on google one day.

To raise Subsonic's memory limit in CentOS, edit the following file:
/etc/sysconfig/subsonic

and change the following line:
SUBSONIC_ARGS="--max-memory=100"

to the following (for 512MB):
SUBSONIC_ARGS="--max-memory=512"

Remember to restart subsonic for changes to take effect. You will be able to check subsonic's "about" tab to monitor current memory usage. The setting of 512 seems to be sufficient for a ~770GB library and has resolved my issues ^_^
nachos
 
Posts: 8
Joined: Mon Jan 31, 2011 6:05 am

Postby stozher » Tue Feb 01, 2011 12:11 pm

http://music.stozher.com:8080/login.view?user=guest&password=
User avatar
stozher
 
Posts: 313
Joined: Tue Nov 16, 2010 10:56 am
Location: Sofia, Bulgaria


Return to Help

Who is online

Users browsing this forum: No registered users and 11 guests