High cpu usage when uploading file in GCS with Java API
Can anyone suggest what could be the reason for com.sun.crypto.provider.GHASH#update(byte[], int, int)
taking a lot of CPU when loading a file in GCS in Java?
Here is the code.
It looks like some internal SSL operation, however, SSL shouldn't incur much processor burns.
Env:
java version "1.8.0_45"
Java HotSpot (TM) 64-bit Server VM (build 25.45-b02, mixed mode)
Ubuntu exact (12.04.3 LTS)
Fixed google api versions:
com.google.apis: Google-storage-services-API: v1-rev26-1.19.1
com.google.apis: Google-storage-services API: v1-rev33-1.20.0
source to share
Indeed, switching to has Java 1.7.0_80-b15
solved the problem. Despite the fact that solar crypt methods such as
com.sun.crypto.provider.ARCFOURCipher.engineUpdate(byte[], int, int, byte[], int) ARCFOURCipher.java 12104 12104
are still at the top of CPU consumers, they are much more moderate with this version.
source to share