JDownloader Community - Appwork GmbH
 

Reply
 
Thread Tools Display Modes
  #1  
Old 03.03.2010, 16:53
loopdemack
Guest
 
Posts: n/a
Default How to change permanetlly the jdownloader start parameter "java -jar -Xmx512m" ???

How to change permanently the jdownloader start parameter "java -jar -Xmx512m" ???

Java -jar -Xmx512m JDownloader.jar -rfu

because currently jdownloader with the default settings is getting to much virtual memory and I dont want to give so much virtual to jdownloader, also I dont know how to setup the "-Xmx256m" as a default. If you by any chance change something which will automaticlly restart the jdownloader session, jdownloader would use the default 512m.


Where to edit in config files or in the codes of jdownloader the startup line
Reply With Quote
  #2  
Old 03.03.2010, 16:54
loopdemack
Guest
 
Posts: n/a
Default

I forgot to wrote its a latest jdownloader on the Ubuntu Server
Reply With Quote
  #3  
Old 03.03.2010, 19:00
zitmar
Guest
 
Posts: n/a
Default

As far as I know, there is no config to do that, but you could do a bash file to do it.
JDownloader.sh
Code:
#!/bin/bash
cd "${0%/*}"
exec java -Xmx256m -jar JDownloader.jar "$@"
Don't use the -rfu switch, it is used to tell jdownloader it is returning from a update
Reply With Quote
  #4  
Old 03.03.2010, 19:21
loopdemack
Guest
 
Posts: n/a
Default

Yes I know about option to make bash file but the idea is that restart button or some of options which were triggering auto restart would not start jdownloader automatically with -Xmx512 which is crazy too much for the machine with just 2gb of ram, also whit standard java leaking on jdownload in a few days I would have 700mb of resident memory just for jdownloader.

This is crazy and unbearable.

Also as I understood the extra huge amount of allocated memory is just because of not-so-efficient capcha recognition inside jdownloader, which by the ways doesnt work for the most of supported sites, or its working just in some cases, than I dont need it at all, or 256M is enough even for capcha and for caching of downloading files.


In any ways I dont want to see over 256M in virtual or in resident memory.
Reply With Quote
  #5  
Old 03.03.2010, 23:16
drbits's Avatar
drbits drbits is offline
JD English Support (inactive)
 
Join Date: Sep 2009
Location: Physically in Los Angeles, CA, USA
Posts: 4,437
Default

The 512m is the size of the Heap, not including the memory used by the Java runtime itself and some other memory. Java under Linux takes as much as 150KB of virtual overhead space. With 2GB of memory, I would suggest you leave the -Xmx parameter alone (or do not reduce it below 384m). The "Working set" (the physical memory actually allocated to the program) is usually much smaller than the 700 MB you mention. After the program has finished its start-up, your workings set may be as little as 150MB according to Jiaz, our Linux expert.

The memory is not for Captcha, but for the Download page Grid/Tree. JDownloader's virtual memory needs increase as the number of links increase. If you keep the number of links low, JDownloader will not need as large a virtual memory allocation.

Java programs work best with around twice the heap allocation as the amount of data to be stored. That is because almost everything is on the heap and garbage collection takes time.

Your concept of a 256M virtual limit will work for most C programs, but GUI oriented programs written in modern programming languages take more. I am still shocked at how much more. I used to write extensive DOS programs that ran on computer with only 256KB of memory (and no swap file).

There is no option in JD to set the restart command line. I will file a new feature request for that. I want it as well. My Windows command line is more complex:
Code:
java -Dsun.java2d.ddscale=true -XX:+UseAdaptiveSizePolicy -verbose -Xmx384m -jar jdownloader.jar -H -debug  1>"logs\%version%_%sdate%_%stime%_javav-log.txt" 2>"logs\%version%_%sdate%_%stime%_javav-errlog.txt"
The first parameter tells Java that I am not using a modern graphics card. The second tells it to be more careful about memory usage (I only have 1GB of memory). Most of the rest is because I run with extra debugging set (I am a supporter, tester, moderator, and reporter).

You can save memory in JD by turning off logging, reducing the number of addons that you have installed, reducing the number of host plugins that you have "Approved", using the "Classic" or "Default" style (Java Swing chrome) instead of Synthetica, and keeping your list of links short.

By the way, the JAC (JDownloader AntiCaptcha) works quite well for many hosts. It is not implemented for all hosts, because each is a complex program. Hotfile and some other sites have gone to "ReCaptcha", a Captcha we cannot break (yet). Right now, the people who usually write new AntiCaptcha plugins are busy with other things.

Host plugin updates are available every week or two. New Major releases every about every six months. However, everybody on the JDownloader team is a volunteer with other responsibilities, so schedules cannot always be planned (besides, now that I have joined, we are finding more bugs I posted 9 issues yesterday).

I hope you enjoy JDownloader. It isn't perfect, but in many ways, we are fighting an uphill battle.

Happy Downloading
Dr Bits
__________________
Please, in each Forum, Read the Rules!.Helpful Links. Read before posting.

Last edited by drbits; 03.03.2010 at 23:22.
Reply With Quote
  #6  
Old 04.03.2010, 02:36
loopdemack
Guest
 
Posts: n/a
Default

Quote:
Originally Posted by drbits View Post
The 512m is the size of the Heap, not including the memory used by the Java runtime itself and some other memory. Java under Linux takes as much as 150KB of virtual overhead space. With 2GB of memory, I would suggest you leave the -Xmx parameter alone (or do not reduce it below 384m). The "Working set" (the physical memory actually allocated to the program) is usually much smaller than the 700 MB you mention. After the program has finished its start-up, your workings set may be as little as 150MB according to Jiaz, our Linux expert.

The memory is not for Captcha, but for the Download page Grid/Tree. JDownloader's virtual memory needs increase as the number of links increase. If you keep the number of links low, JDownloader will not need as large a virtual memory allocation.

Java programs work best with around twice the heap allocation as the amount of data to be stored. That is because almost everything is on the heap and garbage collection takes time.

Your concept of a 256M virtual limit will work for most C programs, but GUI oriented programs written in modern programming languages take more. I am still shocked at how much more. I used to write extensive DOS programs that ran on computer with only 256KB of memory (and no swap file).

There is no option in JD to set the restart command line. I will file a new feature request for that. I want it as well. My Windows command line is more complex:
Code:
java -Dsun.java2d.ddscale=true -XX:+UseAdaptiveSizePolicy -verbose -Xmx384m -jar jdownloader.jar -H -debug  1>"logs\%version%_%sdate%_%stime%_javav-log.txt" 2>"logs\%version%_%sdate%_%stime%_javav-errlog.txt"
The first parameter tells Java that I am not using a modern graphics card. The second tells it to be more careful about memory usage (I only have 1GB of memory). Most of the rest is because I run with extra debugging set (I am a supporter, tester, moderator, and reporter).

You can save memory in JD by turning off logging, reducing the number of addons that you have installed, reducing the number of host plugins that you have "Approved", using the "Classic" or "Default" style (Java Swing chrome) instead of Synthetica, and keeping your list of links short.

By the way, the JAC (JDownloader AntiCaptcha) works quite well for many hosts. It is not implemented for all hosts, because each is a complex program. Hotfile and some other sites have gone to "ReCaptcha", a Captcha we cannot break (yet). Right now, the people who usually write new AntiCaptcha plugins are busy with other things.

Host plugin updates are available every week or two. New Major releases every about every six months. However, everybody on the JDownloader team is a volunteer with other responsibilities, so schedules cannot always be planned (besides, now that I have joined, we are finding more bugs I posted 9 issues yesterday).

I hope you enjoy JDownloader. It isn't perfect, but in many ways, we are fighting an uphill battle.

Happy Downloading
Dr Bits


Thanks on your response, as I told you jdownloader memory footprint is too big in my case on the Ubuntu, I dont know which is the reason for that, but currently its to big, its big even if I dont have anything in actual download neither in the add-links, just in the idle, but after some time.
Its not big on the start its just 150mb on the begining, but after few days it start raising.

Also the virtual memory size of the process is too big which means that jdownloader will use all free memory like 500-900mb depending on the moment to replace the virtual memory, because thats the way of linux and when there is no free memory it will start using the swap file.
And when I have in the same time active sabnzbd and some torrents trough torrentflux I get extra huge load because they are fighting for the free memory and for the access time on the hdd.
And if you have 100mbit or even 1Gbit thats the real killer.

I wouldnt mind if I was just using jdownloader, but because I'm not using just the jd, the jdownloader is starting to killing my box, and I'm trying to find the ways how to lower the res and virt memory footprint of JD also I would like to find a better memory caching values to prevent disk trashing when I have fast connection, I dont have problems that jdownloader would not get the speed, Its getting the speed, but its trashing my raid.


Also when we speak about making the jd even better, what do you think about adding the new feature, like for rapidshare premium we have happy hour which is from 2am to 9am.
For example I would like to set that from 10am to 1.56am jdownloader could download in premium mode just a 5gb from 25gb and if its needed more than 5GB I would like that jd swap from the premium mode to the free mode and when the time clock to a 2am that jdownloader switch back to the premium mode without any limitations.
I mean I would like that there would be no limitations between 2am and 9am. And I dont want that rest of the day is only in free mode.

Because in Happy hour rapidshare is counting only 10% which means that 20gb of premium traffic would get you 200gb in happy hour.

I was thinking about sophisticating the sheduler for rapidshare premium, that we could use non-happy-hours timing in a cleaver way.

Also it would be good that on the webgui we would have like a counter of how much premium traffic was left for the rapidshare premium.

I dont use gui at all, I'm only using the webgui.
Reply With Quote
  #7  
Old 04.03.2010, 04:40
drbits's Avatar
drbits drbits is offline
JD English Support (inactive)
 
Join Date: Sep 2009
Location: Physically in Los Angeles, CA, USA
Posts: 4,437
Default

I will have to refer this to Jiaz, but I do not know how long he will take to get back to you. Therefore, I will collect the information he needs:
1) You said you have 2GB of memory. What is your processor configuration?
2) Are all of your disks on the RAID? How much space on the RAID and How much off?
3) Which version of Java are you using? 1.6.0.17 32 bit should be the last version installed, even if you have a 64 bit processor. 1.6.0.18 tried to fix this, but has many bugs, especially in Linux. Please make sure you have installed this version.
4) How big is your OS disk cache (in memory)? I think you can control this in Ubuntu. This is how you can adjust the system to avoid thrashing.
5) Please upload a log of your session. We need to see if there are problems causing your memory increases.
6) What version of JDownloader are you running? There are two kinds of "Latest version".
7) What are you using for Antivirus and Firewall. We have found a lot of memory problems due to these.
7a) Usually, there is a good firewall in the internet router. In fact, if you are running a torrent client, you may need to turn off some of the security features in the firewall (strict session control or strict packet interchange and excessive session detection [maximum number of packets per second, maximum number of connections]).
7b) If you have a router firewall, then a software firewall is mostly to protect the rest of the internet from you. You can set it to minimum outbound protection, but control the listening (incoming) ports explicitly).
7c) An antivirus is absolutely necessary, even on Ubuntu. However, it should only scan files when they are opened for read or execute (or when you ask it to). It should never scan web sites or scan files while they are downloading. Web site evaluation should be done within the browser. Download evaluation is a big waste, especially with torrents.
8) How much memory is unused when the only user program is the program that reports memory usage?
8a) Make sure you aren't investing a huge amount of memory in your display system.
------------

a) I have submitted a feature request to use _JDrestart.bash (or .bat, .com, or .tsh) to restart JDownloader.
b) I suggest you untick Settings - Basics - Downloads & Connections - General - "Start Downloads on Startup". Then, before you allow JD to upgrade or restart, you click on the Stop icon. When it restarts, let it finish startup, then select Exit (or Ctrl+Q). This way, you will never be starting JD with the nasty default command line.
c) While JD is running, there is an in-memory database that contains all of your links and the Log file. This means that you should normally delete the links for packages as soon as you are ready. This also means that you should change Settings - Basics - General - "Logging Level" to OFF most of the time (turn it to ALL to collect a Log for uploading).
d) To view the Log (which is part of uploading it), you click on the "?" menu and then on "Show Log". The rest of the log uploading instructions can be found by following the link in my signature.
e) To save memory and speed up LinkGrabber, turn off any Hosts (plugins) you don't ever think you will ever use (untick Use Plugin). There are over 300 of them. They are under Settings - Plugins & Addons - Host.
f) Under Settings - Plugins & Addons - Extensions you will find the addons. Turn off any of these that you do not need. However, I suggest you keep JDinfo File Writer, as it will write a file with the password for each archive you download. Currently, JDunrar does not expand Zip files, gz, tgz, bz2, and many other archive formats.
g) I do not know about the memory use of the Web Interface addon, but I expect it to be high. I also think it has memory leaks (ask Jiaz).
g1) It is best to use the direct GUI if you can. Set it to Linux Style (if that is available) avoid Synthetica or Substance, they use memory. I would use even try VNC instead of the Web Interface addon.
g2) If you are using the web interface, minimize the GUI window.
h) Also turn off the Splash screen and Window Decorations. Under Settings - User Interface - General - Feel. Also, do not show Balloon Infos.
i) If you are using the Web Interface, use the -H option for jdownloader.jar. This prevents the program from popping up every time you add a new link.
-----------------
A) To set up for Rapidshare Happy Hour, enable the Scheduler addon.
Aa) Scheduler will appear in the list of addons in the Addons menu.
Ab) Add a Scheduler entry for the start of Happy hour and select the action "Enable Premium for specific host" and fill in Rapidshare.
Ac) Add a similar Scheduler entry for Disabling Premium for specific host. After 3 or 4 days, you will figure out how long to let it run Premium after the end of Happy Hour to use your quota.
Ad) If you have other Premium accounts, you probably want to turn them off during Rapidshare Happy hour. You can do this for each host or turn them all off and then turn on Rapidshare. You would turn them all on after Rapidshare Happy Hour.
----------------------
Happy Downloading,
DrBits
__________________
Please, in each Forum, Read the Rules!.Helpful Links. Read before posting.

Last edited by drbits; 04.03.2010 at 04:43.
Reply With Quote
Reply

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump

All times are GMT +2. The time now is 03:15.
Provided By AppWork GmbH | Privacy | Imprint
Parts of the Design are used from Kirsch designed by Andrew & Austin
Powered by vBulletin® Version 3.8.10 Beta 1
Copyright ©2000 - 2019, Jelsoft Enterprises Ltd.