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