OpenJDK-8: Crypto performance is very slow on ARMv7
Srinivasa Rao Ragolu
sragolu at mvista.com
Mon Jan 30 07:26:00 UTC 2017
Hi Xerxes,
I have used haveged daemon to improve entroy but now luck . Still
performance is very slow.
Any inputs on this?
Thanks,
Srinivas.
On Fri, Jan 27, 2017 at 5:03 PM, Srinivasa Rao Ragolu <sragolu at mvista.com>
wrote:
> Hi Xerxes,
>
> root at marvell-a385-cham:~# cat /proc/sys/kernel/random/entropy_avail
>
>
> 130
>
> I am planning to port below recipe to integrate entropy acceleration deamon
> http://cgit.openembedded.org/meta-openembedded/tree/meta-
> oe/recipes-extended/haveged?h=jethro
>
> What is your thought about it?
>
> Thanks,
> Srinivas.
>
>
>
>
>
> On Fri, Jan 27, 2017 at 4:17 PM, Xerxes Rånby <xerxes at zafena.se> wrote:
>
>> Crypographic performance rely on available of random numbers with high
>> entropy.
>>
>> It is likely that the available entropy in /dev/random is depleted and
>> will block until the level of entropy in the system is high enough.
>>
>> The linux kernel drivers gradually fills up /dev/random however on
>> embedded arm systems without many mechanical parts the amount of added
>> randomness with high entropy sources are low in these SOC devices.
>>
>>
>> You can check the amount of available entropy (and consume some) by
>> running
>>
>> cat /proc/sys/kernel/random/entropy_avail
>>
>> A healthy Linux system with a lot of entropy available will have return
>> close to the full 4,096 bits of entropy.
>>
>> If the value returned is less than 200, the system is running low on
>> entropy.
>>
>>
>> If the system is running low on entropy then you can add extra user-space
>> daemons that provide extra entropy
>>
>> audio entropy daemon - https://www.vanheusden.com/aed/
>>
>> video entropy daemon - https://www.vanheusden.com/ved/
>>
>> timer entropy daemon - https://www.vanheusden.com/te/
>>
>> cpu based timer entropy daemon using the havege algoritm -
>> http://www.irisa.fr/caps/projects/hipsor/
>>
>> There exist many usb based hardware entropy sources as well.
>>
>>
>> Cheers
>>
>> Xerxes
>>
>>
>>
>> Den 2017-01-27 kl. 11:18, skrev Srinivasa Rao Ragolu:
>>
>>> Hi All,
>>>
>>> I have ported openjdk-8-72b05(from Yocto) for armv7 . I am sharing sample
>>> code via link, which I have run to see the crypto performance and found
>>> it
>>> is very slow.
>>>
>>> Code Location:
>>> https://drive.google.com/open?id=0BxeL64n1TNdJMlItSWpld1lIdjg
>>>
>>> See the output below:
>>>
>>>
>>> root at Spider:~/Certificates# uname -a
>>> Linux Spider 4.4.32-rt41-yocto-standard #1 SMP PREEMPT Mon Jan 9 00:24:23
>>> PST 2017 aarch64 GNU/Linux
>>> root at Spider:~/Certificates# time java -cp common-0.0.1-SNAPSHOT.jar:jars
>>> /*
>>> com.ericsson.athena.common.certificate.Main
>>> ERROR StatusLogger No log4j2 configuration file found. Using default
>>> configuration: logging only errors to the console.
>>> Generating KeyPair (Size 2048)...
>>> PrivateKey: RSA Private CRT Key
>>> modulus: cbd10bbf831335e4b9d0942ed4da06
>>> 2763caf63c3230f509ee7ce8c234bb6e6e6c1bf75c8e3a46f955227e7edc
>>> ce1de0f6691320b1f5fa300f9f8819d0507243c264ca77cf3eac67450dd2
>>> 08b30f2e34cebc2bec1fc1aed6d2f389d5843492c19297038019c4302259
>>> 763aec26e302362ade9b7a190f1606cc0355c698f32e206c4af84032539c
>>> 3519b72feb1886ad5366a35e233942a38a32b25b25d418c0f4d452a491e1
>>> 64046b638d4b2777d743cdbb6b3a166fa413e0595414e3dd326468dad084
>>> 65fdbbb1551915645ea9d1c4783903b08327fd003590f85446315f6df73e
>>> e64e26deac07e4fddd2e991869aac660dc489c68b989544788aeb91474258b
>>> public exponent: 10001
>>> private exponent: e210696a1a05b76e8d75d41112f5b5
>>> d8557a4bc8fe1809dce231442f6433208c49a270a8b04de365af657b2355
>>> e07dde2fc6e14dba6b37a7bc81c3811e3ff1a7f12314e49ec7728cce02ee
>>> 46729511387160358cc961c27e1f02668c9fa97b12f422468cfcb1fbd19d
>>> a38d92069a7406db60882d7d4346631e409f65e5453fe500a49f6a04c0d9
>>> 06b7b180436f09027606db50f45c7847ce6febe01a882ffe73f9d1f15c4b
>>> daaaa7be4ab15431e6b665ebc358a8ee55785e4157ff46052533d4b486b1
>>> 3393aae1d8d0b4fd3c7468e222506703915f10a016ce6c614e97ddc4156a
>>> b3c42ecd4d60997924f2d5b8b2845d2f1b20a5132010f1d79dfd258cda1b1
>>> primeP: ef0c9c674cd9134beedef5c0009784
>>> 0ed1b7fd281a0f8de837b217e447892c698b8e8deba9fd596550dd22fc79
>>> 561b5befd4659d281a44a15d56605c780eb22d809fffda7943e6f5f6dfb5
>>> 92b601502882e19478ec90c6f084afb8ba5eedf2509007869718ee82454e
>>> 54757165ca57269090fcc35bc19f6d00ce1877f0c56d3b
>>> primeQ: da44dde77039f5405f9130dce4d1eb
>>> a783f1c8d03657a61fb43a8e15387d566a59006abefb5ffa2cdff9b3c661
>>> d62158da7f8d4a6b80eba4522292d9542d37350f0e48e46b0366ff65edeb
>>> c781253518959d953e72c991581e24ebd76d92e238dae22ee2d5859ced88
>>> c0d03d35db5b7eccd1766d7f1cb1e0859ad62db867e3f1
>>> primeExponentP: aa05e9345be7459f4b6dcf92d998ea
>>> b773988e79b85779d241d2ecc553d010039ddc2dbb01740de24eea8a18d2
>>> e058a342686a41a62550cd08cb07cc9d23aebd487004954a8cee37e17869
>>> f7c87614a24bbcd05255c7ff8750887f362790cc395ac7cf85a698f594ff
>>> ca78a1c8096b85256bca2bd516592339605cecea1631c3
>>> primeExponentQ: c76cdaaf064bfe37e5d97ba2a7f2e0
>>> f43a4ae4a6d0affe99c30b291c5c73b04c14ab9bdc8942a50af14d6da359
>>> 6ad32722e41dcd1c323b9af46ca06daf4a6cc1aed2e768c419e4b67f8405
>>> c44fcc161a33413ac6470cc21e97d43623abfae374fd1061b46150e613e5
>>> b9fdc99f769fbf58161db567c9690072320974d6a31d91
>>> crtCoefficient: bc841db992c7cdfa376cba7677e88d
>>> 5b81c27455db2371224aa3029179c93d638d8c6aec2d1af782647e5320da
>>> 356cb394115180296ed49841cf3adf0a2e3cff25669f172edd2c6e3ea5af
>>> 0a3c55bd1349f5c74de41333a48ec0ae0fb45f747b94897ae7ab74e7156c
>>> 5945a5833438113b6feda152b5a7190d584ff771637b4d
>>>
>>> PublicKey: RSA Public Key
>>> modulus: cbd10bbf831335e4b9d0942ed4da06
>>> 2763caf63c3230f509ee7ce8c234bb6e6e6c1bf75c8e3a46f955227e7edc
>>> ce1de0f6691320b1f5fa300f9f8819d0507243c264ca77cf3eac67450dd2
>>> 08b30f2e34cebc2bec1fc1aed6d2f389d5843492c19297038019c4302259
>>> 763aec26e302362ade9b7a190f1606cc0355c698f32e206c4af84032539c
>>> 3519b72feb1886ad5366a35e233942a38a32b25b25d418c0f4d452a491e1
>>> 64046b638d4b2777d743cdbb6b3a166fa413e0595414e3dd326468dad084
>>> 65fdbbb1551915645ea9d1c4783903b08327fd003590f85446315f6df73e
>>> e64e26deac07e4fddd2e991869aac660dc489c68b989544788aeb91474258b
>>> public exponent: 10001
>>>
>>> Generating Certificate...
>>> Certificate PEM: -----BEGIN CERTIFICATE-----
>>> MIIDfzCCAmegAwIBAgIBADANBgkqhkiG9w0BAQsFADCBgjENMAsGA1UEKQwEVGVz
>>> dDELMAkGA1UEBhMCU0UxEjAQBgNVBAgMCVN0b2tjaG9sbTEOMAwGA1UEBwwFS2lz
>>> dGExETAPBgNVBAoMCEhEUyA4MDAwMQwwCgYDVQQLDANDTU0xHzAdBgNVBAMMFlNl
>>> Y3VyaXR5IFRydXN0IFNlcnZpY2UwHhcNMTcwMTI1MDMwMTI3WhcNMTgwMTI1MDMw
>>> MTI3WjCBgjENMAsGA1UEKQwEVGVzdDELMAkGA1UEBhMCU0UxEjAQBgNVBAgMCVN0
>>> b2tjaG9sbTEOMAwGA1UEBwwFS2lzdGExETAPBgNVBAoMCEhEUyA4MDAwMQwwCgYD
>>> VQQLDANDTU0xHzAdBgNVBAMMFlNlY3VyaXR5IFRydXN0IFNlcnZpY2UwggEiMA0G
>>> CSqGSIb3DQEBAQUAA4IBDwAwggEKAoIBAQDABdQWm514+56SR3TJR+bQvjztRVzN
>>> NYXe67l0zsJfjprDf7mrSfe7NJMPjht/ltAgB4Pb8h8SlYZLtIKWF/fJ8rLRSNsZ
>>> pxk1cvxVibPyyUoXLq+jOTTsplNBhl2LDzVMspwd66CckP/TIB46g8vr4xyQMiAt
>>> tF6awL+ExY6V85/3btpjImBp66qhzZUiBnEOtQ5fNV6De4NQf7cLHGg7sdvcwWBv
>>> Ngz1zIpFuBlzzyAvoYWhrUADN/KJMBPoPKdhBWTA1DSt+RT57dPqirLPUlIKNk74
>>> t8De+XJQUf8A4bfvZDI6I1mFh6f0ujDAPxCx1VuI3nlVqovtT2P8JTDpAgMBAAEw
>>> DQYJKoZIhvcNAQELBQADggEBAKM3/WxEDveIekL1qdBLBI6IuPRiarlrQFmKfD/F
>>> +BNupyltBHOKpli4uS7IlO3QTQCJczk8Y6eh71fzOgavOJK9izAcJOj3wnTh6ICI
>>> Iysb/Shh8X7C1dKHOrJe3mjzEAHbYEl/OOWae4UKrzr+p8JVrJpHucQMC/NUVMpi
>>> f0FBNHfIMUezOloC97cSBMV+DaDkHhTYijmJ7ya1Jam++vO8Tspi3HcfslXxb3v9
>>> jQ/sXhBMhvGNIErOHiHsOSK/BaE6DcDePixubcGJVQBIPlk2/BN7PYR+kyI8NkHZ
>>> T+6+vvu36GPkJnuP94f1yglP2D7PsijBl+p1Qoi5hFyFJvg=
>>> -----END CERTIFICATE-----
>>>
>>>
>>> *real 7m3.241s*
>>> *user 7m1.972s*
>>> *sys 0m0.196s*
>>>
>>> Could you please suggest any solution or patches to improve the
>>> performance?
>>>
>>> Thanks in advance,
>>> Srinivas
>>>
>>
>>
>
More information about the aarch32-port-dev
mailing list