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.

Full stack with timings

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

+3


source to share


2 answers


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.

Link to related bug in JDK

+2


source


A similar issue occurs with the Amazon SDK .

Upgrading jdk8 to u115 (older than 60) increased AWS SDK ~ 4-5x performance .

So I would like to emphasize that this is a general performance issue and not the GCP sdk specification (or AWS for that matter).



99 percentile

75 percentile

+1


source







All Articles