JDownloader Community - Appwork GmbH
 

Closed Thread
 
Thread Tools Display Modes
  #1  
Old 19.07.2019, 22:36
djmakinera djmakinera is offline
JD Legend
 
Join Date: May 2010
Location: Poland
Posts: 8,223
Default How to set Heap correctly?

When update, for example, "Event Scripter" or "Core Update" or plug-ins, some error during the restart, but during the second attempt always starts correctly.

Code:
------------------------Thread: 365:org.jdownloader.updatev2.restart.WindowsRestarter.log-----------------------
--ID:365TS:1563567340243-19.07.19 22:15:40 -  [org.appwork.utils.logging2.InputStreamLogger(readInputStreamToString)] -> Error occurred during initialization of VM
--ID:365TS:1563567340244-19.07.19 22:15:40 -  [org.appwork.utils.logging2.InputStreamLogger(readInputStreamToString)] -> Unable to allocate 163840KB bitmaps for parallel garbage collection for the requested 5242880KB heap.
5242880KB = 5GB ???


My Parameters to run:
"C:\Program Files\Java\jre1.8.0_191\bin\javaw.exe" -Xms2G -Xmx5G -jar C:\JD\JDownloader.jar

Physical memory still available, so I do not know what the problem is?
screen: **External links are only visible to Support Staff****External links are only visible to Support Staff**

Still need to increase -Xmx?

Download List: 70K
LinkGrabber List: 63K

19.07.19 22.17.14 <--> 19.07.19 22.32.09 jdlog://0992186935451/
  #2  
Old 24.07.2019, 14:59
djmakinera djmakinera is offline
JD Legend
 
Join Date: May 2010
Location: Poland
Posts: 8,223
Default

I had a similar problem with some recent updates.
If the problem persists, I will publish the logs.


**External links are only visible to Support Staff****External links are only visible to Support Staff**
  #3  
Old 24.07.2019, 15:23
Jiaz's Avatar
Jiaz Jiaz is offline
JD Manager
 
Join Date: Mar 2009
Location: Germany
Posts: 64,732
Default

That error is not caused by JDownloader. Java fails to start. Most likely because your system is out of memory
__________________
JD-Dev & Server-Admin
  #4  
Old 24.07.2019, 16:05
djmakinera djmakinera is offline
JD Legend
 
Join Date: May 2010
Location: Poland
Posts: 8,223
Default

This is not an error of out of memory, because the last pid with this type of error is from July 19.

JVM initialization fails with parallel GC

probably should use parameter start???

-XX:-UseParallelGC

https://board.jdownloader.org/showthread.php?t=81097
  #5  
Old 24.07.2019, 16:55
djmakinera djmakinera is offline
JD Legend
 
Join Date: May 2010
Location: Poland
Posts: 8,223
Default

Expected results: The JVM should not attempt to allocate memory beyond that required to accommodate the specified maximum heap size when using the parallel garbage collector.
  #6  
Old 24.07.2019, 18:36
Jiaz's Avatar
Jiaz Jiaz is offline
JD Manager
 
Join Date: Mar 2009
Location: Germany
Posts: 64,732
Default

something made your JVM fail to start and it's not JDownloader. It's up to you what parameters/JVM settings you set.
__________________
JD-Dev & Server-Admin
  #7  
Old 24.07.2019, 18:39
Jiaz's Avatar
Jiaz Jiaz is offline
JD Manager
 
Join Date: Mar 2009
Location: Germany
Posts: 64,732
Default

Quote:
Originally Posted by djmakinera View Post
This is not an error of out of memory, because the last pid with this type of error is from July 19.
JVM does NOT create hs_err files when not started Invalid combination of parameters or failing to start does NOT create hs_err files
__________________
JD-Dev & Server-Admin
  #8  
Old 24.07.2019, 20:11
djmakinera djmakinera is offline
JD Legend
 
Join Date: May 2010
Location: Poland
Posts: 8,223
Default

Closing or running the application works correctly. Only in some specific conditions during the upgrade with the required restart it encounters an error.
It's just that the error does not appear during the second attempt - running with still the same parameters.

The process may also be busy or working in the background, which may prevent a proper restart when trying to update. The first attempt may fail, but the second may not.
  #9  
Old 25.07.2019, 09:42
Jiaz's Avatar
Jiaz Jiaz is offline
JD Manager
 
Join Date: Mar 2009
Location: Germany
Posts: 64,732
Default

Quote:
Originally Posted by djmakinera View Post
The process may also be busy or working in the background, which may prevent a proper restart when trying to update. The first attempt may fail, but the second may not.
That's not the case.

Quote:
Originally Posted by djmakinera View Post
The first attempt may fail, but the second may not.
Because your system runs out of memory and JVM fails to start


Quote:
Originally Posted by djmakinera View Post
Closing or running the application works correctly. Only in some specific conditions during the upgrade with the required restart it encounters an error.
It's just that the error does not appear during the second attempt - running with still the same parameters.
Because your system runs out of memory and JVM fails to start


The answer is very simply. You specify the parameter -Xms2g which makes JVM allocate minimum 2Gbyte of Memory.
During update JD starts another instance and then you have up to 3 instances running, 3*2Gbyte Memory -> the new processes
fail to start because out of memory.
Removing this parameter or reduce it should solve it for your setup
__________________
JD-Dev & Server-Admin
  #10  
Old 25.07.2019, 12:16
thecoder2012's Avatar
thecoder2012 thecoder2012 is offline
Official 9kw.eu Support
 
Join Date: Feb 2013
Location: Internet
Posts: 916
Default

Quote:
Originally Posted by Jiaz View Post
fail to start because out of memory.
Removing this parameter or reduce it should solve it for your setup
Or buy more memory for your computer. I have 64 GB.
__________________
Join 9kw.eu Captcha Service now and let your JD continue downloads while you sleep.
  #11  
Old 25.07.2019, 12:53
djmakinera djmakinera is offline
JD Legend
 
Join Date: May 2010
Location: Poland
Posts: 8,223
Default

Quote:
Originally Posted by thecoder2012 View Post
Or buy more memory for your computer. I have 64 GB.

Really, do not need a lot of physical memory, my 12GB, it seems to be optimal. Many people have even less physical memory, 32-64GB is for advanced and hardcore people who will not actually use that much physical memory. Who is it for?
Physical memory can be replaced with virtual memory, and this does not slow down the operation of the computer and programs when you have a very fast SOLID STATE DRIVE (Tested!)
Is something changed in the long run? I've been using JD2 for a long time and I have not had any problems for a long time, now it seems that JD2 needs more and more memory to run JD2, but it does not need a lot RAM while downloading.
  #12  
Old 25.07.2019, 13:14
Jiaz's Avatar
Jiaz Jiaz is offline
JD Manager
 
Join Date: Mar 2009
Location: Germany
Posts: 64,732
Default

Quote:
Originally Posted by djmakinera View Post
Download List: 70K
LinkGrabber List: 63K
The more links you've got in list, the more memory is required.
It highly depends on link/host type if a link requires less/more memory.
__________________
JD-Dev & Server-Admin
  #13  
Old 25.07.2019, 13:15
Jiaz's Avatar
Jiaz Jiaz is offline
JD Manager
 
Join Date: Mar 2009
Location: Germany
Posts: 64,732
Default

Quote:
Originally Posted by djmakinera View Post
Physical memory can be replaced with virtual memory, and this does not slow down the operation of the computer and programs when you have a very fast SOLID STATE DRIVE (Tested!)
I'm sorry but NO it can not! But I already gave up about this
__________________
JD-Dev & Server-Admin
  #14  
Old 25.07.2019, 13:29
raztoki's Avatar
raztoki raztoki is offline
English Supporter
 
Join Date: Apr 2010
Location: Australia
Posts: 16,159
Default

my thoughts, under Jiaz explanation.
why does the update module need to start with the same vm parameters as main program? Surely it should not not have the same memory requirements. You would only have 2*3GB and say 64MB for the update requirements.

and if the original instance is still running at end of updating, maybe it should wait until the original pid is cleared? or at least an option to do so. Doing so would only ever mean one instance of the higher memory allocation running at any time.

raztoki
__________________
raztoki @ jDownloader reporter/developer
http://svn.jdownloader.org/users/170

Don't fight the system, use it to your advantage. :]
  #15  
Old 25.07.2019, 13:35
Jiaz's Avatar
Jiaz Jiaz is offline
JD Manager
 
Join Date: Mar 2009
Location: Germany
Posts: 64,732
Default

@raztoki: for sure we could *filter out* some parameters but in that case the parameters are lost for the *after update* process.
and the first process will shutdown once the 2nd proccess has validated the pending update.
__________________
JD-Dev & Server-Admin
  #16  
Old 25.07.2019, 13:36
djmakinera djmakinera is offline
JD Legend
 
Join Date: May 2010
Location: Poland
Posts: 8,223
Default

Quote:
Originally Posted by Jiaz View Post
I'm sorry but NO it can not! But I already gave up about this
Yes and no.

It depends on the type of program / application you use.
WEB browsers, movie and music players, text editor, simple programs do not require the need of having large physical memory. Maybe for professionals who render the film or nobody knows what else.
There is an editor that can open 248 GB of text data, but still uses a small amount of RAM, and uses disk storage, if a very large amount of memory is required.

I have the most soundcloud.com host links
I do not know if it matters.
It's not much, anyway ... especially when in the distant past I had 10 times more links, and it was very good (And the usage was in a similar range of RAM)

Decrease the value of -Xms0,5G to see the effects.
  #17  
Old 25.07.2019, 13:41
Jiaz's Avatar
Jiaz Jiaz is offline
JD Manager
 
Join Date: Mar 2009
Location: Germany
Posts: 64,732
Default

Quote:
Originally Posted by djmakinera View Post
Decrease the value of -Xms0,5G to see the effects.
You can leave out the -Xms parameter
__________________
JD-Dev & Server-Admin
  #18  
Old 25.07.2019, 13:42
Jiaz's Avatar
Jiaz Jiaz is offline
JD Manager
 
Join Date: Mar 2009
Location: Germany
Posts: 64,732
Default

Quote:
Originally Posted by djmakinera View Post
There is an editor that can open 248 GB of text data, but still uses a small amount of RAM, and uses disk storage, if a very large amount of memory is required.
I don't know why a filesize should be connected to application? video player also playback gbyte of video without using that much memory.
__________________
JD-Dev & Server-Admin
  #19  
Old 25.07.2019, 13:43
Jiaz's Avatar
Jiaz Jiaz is offline
JD Manager
 
Join Date: Mar 2009
Location: Germany
Posts: 64,732
Default

Quote:
Originally Posted by djmakinera View Post
Yes and no.

It depends on the type of program / application you use.
correct, and when you tell Java to start with 2 Gbyte of memory (-Xms2g) then it will allocate 2gbyte of memory and either the os is able to provide that much memory or not. In your case, it doesn't have enough memory left.
__________________
JD-Dev & Server-Admin
  #20  
Old 25.07.2019, 13:45
Jiaz's Avatar
Jiaz Jiaz is offline
JD Manager
 
Join Date: Mar 2009
Location: Germany
Posts: 64,732
Default

Quote:
Originally Posted by djmakinera View Post
I have the most soundcloud.com host links
I do not know if it matters.
It's not much, anyway ... especially when in the distant past I had 10 times more links, and it was very good (And the usage was in a similar range of RAM)
Yes, this matters as different links require different amount of memory.
and of course we add more features to plugins and that will increase memory usage. For example plugins with customizable filename pattern do require more memory because the link needs to hold all possible meta information.
__________________
JD-Dev & Server-Admin
Closed Thread

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 02:59.
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.