Guide: Increasing Subsonic Memory Limit

Tutorials, tips and tricks.

Moderator: moderators

Guide: Increasing Subsonic Memory Limit

Postby Kirk » Wed Aug 11, 2010 9:53 pm

I've been watching the Help boards for awhile, and it seems to me that a lot of Subsonic issues are simply caused by the application running out of memory. On modern hardware, with plenty of RAM, this shouldn't be an issue. Increasing Subsonic's memory usage limit is very easy.

I had to fumble around on Google for a few minutes to figure out how to do it on Ubuntu... I decided I'd post this guide here, with a nice subject line for Googlers to stumble on so this process can be painless to someone less experienced than I myself.

For the convenience of the viewers, I am also including some image documentation on how to do this. Raising your memory limit is really easy... let's make it a no-brainer.

Increasing Subsonic Memory Limit on Windows
- Right click the Subsonic icon in the system tray. (The area on the bottom right, where the clock is).
Note: Your Subsonic icon may be hidden. Expand the system tray if you don't see it.
Image

- Click "Subsonic Control Panel" on the menu.
Image

- Go to the Settings tab.
Image

- Increase the memory limit to the desired amount. 512MB should be great for any typical setup.
Image Image

- You will need to restart Subsonic for the changes to take effect. Click OK on the dialog...
Image

- Then go back to the Status tab. Hit STOP, then hit START. Subsonic has now restarted, and is running with an increased memory limit.
Image Image



Increasing Subsonic Memory Limit on Ubuntu or Debian
- Open a terminal or an SSH session to your Subsonic server.
- Open the file "/etc/default/subsonic" in your favorite text editor. I like Pico.
Image
Image

- Change the max-memory directive from 100 to your new memory limit. (In Megabytes). 512 should be great for any typical usage scenario.
Image

- Restart Subsonic. Subsonic is now running with your new memory limit.
Image



If anyone wants to prepare a short how-to for Mac OS X, that'd be great... I only have Linux and Windows to play with.

Cheers,
Kirk
Image
User avatar
Kirk
 
Posts: 310
Joined: Tue Jun 08, 2010 5:45 pm
Location: Illinois, USA

Postby mgrant » Wed Aug 11, 2010 10:40 pm

Standalone linux:
edit subsonic.sh (in whatever path you extracted it)
then stop and restart subsonic

Tomcat linux:
edit /etc/default/tomcat6 (set JAVA_OPTS)
then restart tomcat

Tomcat windows:
run tomcat6w.exe and set JAVA_OPTS from there
then restart tomcat

Standalone windows:
edit subsonic.bat (in whatever path you extracted it)
then stop and restart subsonic

Others?

-mg
mgrant
 
Posts: 76
Joined: Mon Mar 03, 2008 1:15 am

Postby aktiveradio » Sat Aug 14, 2010 1:54 am

is there is baseline for this setting? 512 seems low if the system has 4 gb of ram right?
aktiveradio
 
Posts: 26
Joined: Tue Aug 10, 2010 5:14 pm

Postby Kirk » Sat Aug 14, 2010 11:17 pm

aktiveradio wrote:is there is baseline for this setting? 512 seems low if the system has 4 gb of ram right?


My 512 is merely for example purposes. Yes, it could be higher. I don't think there is an upward limit. However, allocating merry that isn't going to be used is pointless... I run my Subsonic server with 512MB and have no issues.

Naturally you are free to increase your memory limit as you please.

Cheers,
Kirk
Last edited by Kirk on Sat Aug 14, 2010 11:18 pm, edited 2 times in total.
Image
User avatar
Kirk
 
Posts: 310
Joined: Tue Jun 08, 2010 5:45 pm
Location: Illinois, USA

Postby donpearson » Tue Sep 21, 2010 3:39 pm

Moved to Tutorials :wink:
Facebook Group:
http://www.facebook.com/groups/subsonic.group/

Image
donpearson
 
Posts: 361
Joined: Wed Oct 15, 2008 3:53 pm
Location: UK

Postby Kirk » Tue Sep 28, 2010 9:01 pm

donpearson wrote:Moved to Tutorials :wink:


Good call. :mrgreen:
Image
User avatar
Kirk
 
Posts: 310
Joined: Tue Jun 08, 2010 5:45 pm
Location: Illinois, USA

Service wont start above 1630MB

Postby mgyellow » Thu Jan 13, 2011 10:39 pm

I've been fiddling with the memory settings because of video playback pausing (still working on that) and noticed that setting this memory limit above 1630MB will cause the service to fail starting.

I do the following:
- Stop service (using status tab or using services.msc)
- Set memory limit to 1631MB
- Start service (user either tab or msc)
- Look at service log last line: Shutting down database

Anything below 1631 works fine.

Changing this limit didn't help with my problem though, just thought i'de mention it here

Windows Server 2008 R2, 8GB memory
mgyellow
 
Posts: 7
Joined: Mon Jul 12, 2010 11:14 pm

OS X User here

Postby bam0027 » Mon Feb 21, 2011 1:44 pm

I'd be happy to post a tutorial, but I haven't been able to find where to adjust this memory declaration. I'm currently running out of memory, using 94+ of the 97 MB default. This error ("java.lang.OutOfMemoryError") in my library listing prompted me to hunt for solutions, thus I ended up here.

I can't find a subsonic.sh, nor can I find the "SUBSONIC_MAX_MEMORY" string anywhere.
bam0027
 
Posts: 4
Joined: Mon Feb 21, 2011 1:33 pm

Solutions has been posted...

Postby bam0027 » Wed Feb 23, 2011 10:57 am

... by jrh.koenig here: http://forum.subsonic.org/forum/viewtopic.php?t=5776

In short, modify line 37 of info.plist file, found within the Package Contents of the Subsonic application (Control-Click the application, select "Show Package Contents" form the contextual menu). Change the three digit number value within the string argument to be the size of the memory for Java to use.

jrh.koenig (Johannes) says:
you have to edit following file to increase the memory settings:
/Applications/Subsonic.app/Contents/Info.plist
at line 37 -Xmx100m to -Xmx256m or whatever your installation needs.

you will find that information in the installation dokumentation on www.subsonic.org for MacOSX.
bam0027
 
Posts: 4
Joined: Mon Feb 21, 2011 1:33 pm

One last note

Postby bam0027 » Wed Feb 23, 2011 11:00 am

As far as I can tell, this modification to the memory on OS X will overwritten when a program update is installed. Hopefully, in the future, the application will be modified to store this setting in the /Library folder outside of the application itself.
bam0027
 
Posts: 4
Joined: Mon Feb 21, 2011 1:33 pm

Postby nachos » Wed Mar 02, 2011 5:36 pm

Great post!

Here's the instructions for CentOS / Fedora / Red Hat Enterprise Linux (REHL)

open subsonic's config file:
/etc/sysconfig/subsonic

and edit as needed:
SUBSONIC_ARGS="--max-memory=512"
nachos
 
Posts: 8
Joined: Mon Jan 31, 2011 6:05 am

Postby ggibby » Sun Mar 13, 2011 9:54 pm

I can't get it to restart with any setting over about 1000MB...
Find power in peace,

-G

x64W7 Ult
Intel i3-2100 3.1GHz - 8GB RAM
120GB Corsair SSD system
2TB WD Caviar HDD storage

2TB SmartStor NS4300N NAS
Gig Ethernet - SOHO cable internet

14,936 artists
6,196 albums
77,900 songs
634.03 GB
User avatar
ggibby
 
Posts: 39
Joined: Sun Jun 20, 2010 11:23 pm

Postby OlYeller21 » Mon Mar 14, 2011 8:55 pm

I had a problem that was solved by increasing the memory limit. I've also seen many with problems that are solved by increasing the memory limit.

I suggest a sticky on this post.
OlYeller21
 
Posts: 86
Joined: Fri Aug 27, 2010 8:09 pm

Postby Numanoid » Wed Mar 30, 2011 8:51 pm

A small problem I had that I thought I'd share in case anyone else encounters a similar problem:

In Windows Vista, I got an error about not being able to write to the exe when clicking "Save Settings". I solved it by checking "Run As Administrator" in the Compatibility properties for the Subsonic Tray Icon.
Numanoid
 
Posts: 7
Joined: Tue Aug 03, 2010 6:23 pm

Postby Kirk » Sat Apr 16, 2011 6:58 pm

Whoops, I totally forgot I was hosting the images for this on one of my domains when I took some of my hosted content down for server overhauls back in February.

My bad! The tutorial images have been restored.

Cheers,
Kirk
Image
User avatar
Kirk
 
Posts: 310
Joined: Tue Jun 08, 2010 5:45 pm
Location: Illinois, USA

Next

Return to Tutorials

Who is online

Users browsing this forum: No registered users and 2 guests