JDownloader Community - Appwork GmbH
 

Reply
 
Thread Tools Display Modes
  #1  
Old 06.11.2016, 17:09
Enqueue90 Enqueue90 is offline
JD Alpha
 
Join Date: Apr 2014
Location: Austria
Posts: 21
Default [Synology] High CPU load and update problems due to hashing

Hi everybody.

[Edit#2]
Problem solved! The default Java Synology package has very poor performance. This can be solved by installing the Oracle Java SE Development Kit package.

Quote:
To increase compatibility and performance, Java8 also provides an interface to upload Oracle JDK.
(**External links are only visible to Support Staff****External links are only visible to Support Staff**)
[Original Post]

I lately updated Java on my Synology to Java8 and updated JD2 to the latest version. Previously I was using GhostAWT due to the fact that the old Java package did not have the neccessary libs in it.

Since then I experience serious performance issues with JD2 on my NAS. First I could not use My.JDownloader because the GUI simply was not responding. It took ages until the UI reacted but downloads were still very slow and problematic. My NAS was constantly at 100% CPU. After analyzing the issue with a Java profiler (YourKit) I found out that this was due to the file hashing that is done. After disabling the file hashing in the options, it became a bit better and I was able to use JD again.

Today I restarted JD due to an update and I could not see it after 15min in My.JDownloader. When I checked again it was still downloading updates and the CPU load was at 100%. So I fired up again the profiler and I could see that also the update package was being hashed. Here a screenshot of the profiling result:

As you see: very slow.

Does anybody else have the same issue? Is there a way of improving the hashing performance? Maybe the devs can look into the hashing performance.

[Edit#1]
I did some performance analysis on the SHA256 generation and saw that the MessageDigest is really that slow. Hashing the JDownloader.jar the way it is done in the org.appwork.updatesys.transport.exchange.JarSignature.getContentSHA256() takes 200'000ms!

Testwise I took over the Sha256 class from the **External links are only visible to Support Staff**GNU Classpath and it took only 36'908ms to hash the file. Of course this is still a lot, on my Windows Machine (of course more powerful) it takes 184ms to hash the same file with the original source.

Looks like there is something really wrong with the JRE package for Synology. This is really annoying. Can you maybe consider to disable hashing/signature check for the update process?

- Enqueue

Last edited by Jiaz; 07.11.2016 at 09:40.
Reply With Quote
  #2  
Old 07.11.2016, 09:40
Jiaz's Avatar
Jiaz Jiaz is offline
JD Manager
 
Join Date: Mar 2009
Location: Germany
Posts: 66,134
Default

Please upgrade to use Oracle JVM/install Oracle JVM. Synology installs by default the ZeroVM JVM which is 80-100 times slower because it does not bring any JIT-Compiler. It is a interpret only JVM.
__________________
JD-Dev & Server-Admin
Reply With Quote
  #3  
Old 07.11.2016, 09:41
Jiaz's Avatar
Jiaz Jiaz is offline
JD Manager
 
Join Date: Mar 2009
Location: Germany
Posts: 66,134
Default

Also just for your information. JDownloader does not require GhostAWT!
__________________
JD-Dev & Server-Admin
Reply With Quote
  #4  
Old 13.11.2016, 15:25
Enqueue90 Enqueue90 is offline
JD Alpha
 
Join Date: Apr 2014
Location: Austria
Posts: 21
Default

Quote:
Originally Posted by Jiaz View Post
Please upgrade to use Oracle JVM/install Oracle JVM. Synology installs by default the ZeroVM JVM which is 80-100 times slower because it does not bring any JIT-Compiler. It is a interpret only JVM.
Thanks for your confirmation and explaination. As I've written in my post already: The problem disappeared with the proper Oracle JDK.

Quote:
Originally Posted by Jiaz View Post
Also just for your information. JDownloader does not require GhostAWT!
With the Java7 package I had installed previously on my Synology GhostAWT was still required. JDownloader does graphical operations also in the headless mode (e.g. loading icons and sending them to the browser). In the old Java7 Synology/ARM package that was available for me, the libs for all graphical operations (even headless) were completely missing. This caused JD to crash since not even the awt-headless mode could be initialized.

Now with the new Java8 package I can run JD without GhostAWT.

Last edited by raztoki; 13.11.2016 at 23:09.
Reply With Quote
  #5  
Old 14.11.2016, 12:24
Jiaz's Avatar
Jiaz Jiaz is offline
JD Manager
 
Join Date: Mar 2009
Location: Germany
Posts: 66,134
Default

Thanks for the feedback!
JDownloader does not require a head(ghostawt) since more than 2-3 years
__________________
JD-Dev & Server-Admin
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 13:14.
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 - 2020, Jelsoft Enterprises Ltd.