Gentoo Forums
Gentoo Forums
Gentoo Forums
Quick Search: in
Configuring JavaVM max memory settings for tvbrowser
View unanswered posts
View posts from last 24 hours

 
Reply to topic    Gentoo Forums Forum Index Desktop Environments
View previous topic :: View next topic  
Author Message
Small_Penguin
Tux's lil' helper
Tux's lil' helper


Joined: 27 May 2005
Posts: 117

PostPosted: Tue Mar 12, 2013 7:23 pm    Post subject: Configuring JavaVM max memory settings for tvbrowser Reply with quote

I had problems with tvbrowser often causing high cpu load sporadically. It is caused by max memory not set high enough, so I opened /usr/share/java-config-2/launcher/launcher.bash in the editor and added the -Xmx8192M parameter to the last line:

Code:
exec java -Xmx8192M ${gjl_args} ${gjl_java_args} ${gjl_starte} ${gjl_pkg_args} "${@}"


Note that 8G RAM is a bit much and really not needed (1G or 2G should be plenty enough), but the default (what is the default?) is certainly too low and causes lots of garbage collection.

Obviously, that way is not the preferred method to do it. So, how are such things handled in gentoo? Where can I set this parameter? I couldn't find any docs about it.
Back to top
View user's profile Send private message
BradN
Advocate
Advocate


Joined: 19 Apr 2002
Posts: 2379
Location: Wisconsin (USA)

PostPosted: Wed Mar 13, 2013 5:47 am    Post subject: Reply with quote

I think most java apps use a shell script to launch - find the shell script (with "which" command or whatever) and you can probably edit it inside there.
Back to top
View user's profile Send private message
Small_Penguin
Tux's lil' helper
Tux's lil' helper


Joined: 27 May 2005
Posts: 117

PostPosted: Wed Mar 13, 2013 7:55 am    Post subject: Reply with quote

Not very helpful.

/usr/bin/tvbrowser:
Code:
#!/bin/bash
gjl_package=tvbrowser
gjl_main="tvbrowser.TVBrowser"
gjl_pwd="/usr/share/tvbrowser"
gjl_java_args=" -Dpropertiesfile=/usr/share/tvbrowser/linux.properties"
source /usr/share/java-config-2/launcher/launcher.bash
Back to top
View user's profile Send private message
BradN
Advocate
Advocate


Joined: 19 Apr 2002
Posts: 2379
Location: Wisconsin (USA)

PostPosted: Wed Mar 13, 2013 12:14 pm    Post subject: Reply with quote

Add it inside the java args variable?
Back to top
View user's profile Send private message
Small_Penguin
Tux's lil' helper
Tux's lil' helper


Joined: 27 May 2005
Posts: 117

PostPosted: Wed Mar 13, 2013 12:22 pm    Post subject: Reply with quote

That file is in /usr/bin too, so it will be overwritten on the next update. Editing /usr/bin/tvbrowser or /usr/share/java-config-2/launcher/launcher.bash won't make any difference. What I'd need is a configuration file in /etc to edit these settings, but AFAIK there is none. Sure, I can create my own launcher in /usr/local, but I suppose more users will be affected by this problem. I guess I'll have to file a bug for tvbrowser on the gentoo bug tracker.
Back to top
View user's profile Send private message
BradN
Advocate
Advocate


Joined: 19 Apr 2002
Posts: 2379
Location: Wisconsin (USA)

PostPosted: Wed Mar 13, 2013 1:05 pm    Post subject: Reply with quote

True, this is a good point. I don't think individual files can be added to config protection, just entire directories, and that's not what you want. Although depending on path order, copying the modified file to /usr/local/bin might work.
Back to top
View user's profile Send private message
Display posts from previous:   
Reply to topic    Gentoo Forums Forum Index Desktop Environments All times are GMT
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum