On Fri, 8 Jun 2018 17:50:26 +0200
Dimitry Sibiryakov <s...@ibphoenix.com> wrote:

> 08.06.2018 17:47, Hristo Stefanov wrote:
> > It has 4 cores but the openssl benchmark is single threaded. Here
> > are the repeated benchmarks with the openssl process pinned to a
> > single core on the Intel(R) Core(TM) i5-2500 CPU:  
> 
>    It doesn't matter for speculative execution. Run 4 benchmarks in
> parallel.
> 
> 

Speculative execution only works within the boundaries of a single core
so my results are correct.

Here are the benchmarks anyway:

$ for i in {0..3}; do sudo taskset -c $i openssl speed -elapsed -evp 
aes-128-xts & done;

type             16 bytes     64 bytes    256 bytes   1024 bytes   8192 bytes  
16384 bytes
aes-128-xts     255677.39k   896166.61k  2033702.49k  3154852.86k  3749115.22k  
3804332.03k
aes-128-xts     256324.77k   898756.20k  2037401.94k  3157264.73k  3736510.46k  
3811480.92k
aes-128-xts     256659.08k   902971.56k  2044758.10k  3156077.91k  3728381.27k  
3807581.53k
aes-128-xts     256870.74k   900522.90k  2041011.88k  3159909.72k  3744429.40k  
3805495.30k

$ for i in {0..3}; do sudo taskset -c $i openssl speed -elapsed -evp 
aes-128-cbc & done;

type             16 bytes     64 bytes    256 bytes   1024 bytes   8192 bytes  
16384 bytes
aes-128-cbc     550000.15k   635221.31k   660944.90k   667407.02k   669136.21k  
 669390.17k
aes-128-cbc     549710.10k   634700.76k   659112.79k   665637.21k   667885.57k  
 666872.49k
aes-128-cbc     548084.97k   633240.28k   659870.63k   666325.67k   668393.47k  
 668472.66k
aes-128-cbc     548962.02k   634942.40k   660375.47k   666916.86k   668931.41k  
 668740.27k

The reason for XTS to be faster than CBC is that in XTS there is no 
dependency between the blocks much like in ECB and that is why it gives
better performance. Here are ECB results:

$ for i in {0..3}; do sudo taskset -c $i openssl speed -elapsed -evp 
aes-128-ecb & done;

type             16 bytes     64 bytes    256 bytes   1024 bytes   8192 bytes  
16384 bytes
aes-128-ecb     582299.13k  1737014.42k  3204176.13k  3722085.38k  3846059.35k  
3875291.14k
aes-128-ecb     583074.53k  1742079.38k  3207300.18k  3719742.12k  3870187.52k  
3893269.85k
aes-128-ecb     581938.63k  1740206.57k  3199143.34k  3699344.04k  3844000.43k  
3867497.81k
aes-128-ecb     582175.62k  1743287.57k  3205212.76k  3721558.36k  3869245.44k  
3892898.47k

Feel free to reproduce the benchmarks.

------------------------------------------------------------------------------
Check out the vibrant tech community on one of the world's most
engaging tech sites, Slashdot.org! http://sdm.link/slashdot
Firebird-Devel mailing list, web interface at 
https://lists.sourceforge.net/lists/listinfo/firebird-devel

Reply via email to