Measure performance of compression libraries on Arm servers

Detailed Steps

The latest released version of Snappy and Zstandard data compression algorithms are supported on the following Linux distributions:

  • Amazon Linux 2
  • RHEL/CentOS 8
  • Ubuntu Versions - 20.04, 18.04

The detailed steps below have been tested on AWS EC2 and Oracle OCI Arm-based servers running Ubuntu 20.04.

Install necessary software packages

    

        
        
            sudo apt install -y unzip make
        
    

Install lzbench

lzbench is an in-memory benchmark of open-source compression algorithms.Use this benchmark to measure stand-alone performance of the compression algorithms on Arm servers.

This benchmark also contains the source files for the snappy and zstd compression algorithms among others. They are built as part of the lzbench build process.

On your running EC2 instance, run the following command

    

        
        
            git clone https://github.com/inikep/lzbench && cd lzbench
make
        
    

Download a data set to benchmark the compression algorithms

To benchmark the data compression algorithms, you will need a data set to run the compression and decompression algorithms on. Use the Silesia corpus data set, which is a data set of files that covers the typical data types used nowadays.

Download and unpack the data set:

    

        
        
            cd ..
wget https://sun.aei.polsl.pl//~sdeor/corpus/silesia.zip
mkdir silesia && cd silesia
unzip ../silesia.zip
cd ../lzbench
        
    

Run lzbench with snappy and zstd

To benchmark the stand-alone performance of snappy with lzbench, using one of the files(dickens) from the Silesia corpus data set you installed run the following command:

    

        
        
            ./lzbench -esnappy ../silesia/dickens
        
    

To benchmark the stand-alone performance of zstd with lzbench, using one of the files(dickens) from the Silesia corpus data set you installed run the following command:

    

        
        
            ./lzbench -ezstd ../silesia/dickens
        
    

The value passed to -e in the command above is the compression algorithm.

For full usage and viewing all the arguments you can pass to lzbench run the command below:

    

        
        
            ./lzbench --help
        
    

You can repeat with another file.

View Results

The Compression, Decompression Bandwidth, Latency and Compression ratio for the files is printed at the end of each of these commands

Below is a table with the results on AWS EC2 Arm 64-bit C6g instance, with Ubuntu 20.04 and gcc 9.3 running with snappy.

File nameCompression Bandwidth (MB/s)Decompression Bandwidth(MB/s)Compression Latency (us)Decompression Latency(us)Compr SizeRatio (%)
../silesia/nci75519004427117684614679518.32
../silesia/xml555146296093659130858124.48
../silesia/samba47111464584118907805736137.29
../silesia/webster296729139904567862021121348.75
../silesia/reymont2906402283310352323496848.81
../silesia/mozilla388973131761525822669082652.11
../silesia/osdb4571211220048340541282553.67
../silesia/mr3737872664912658544045154.57
../silesia/dickens2445484165618563634026762.21
../silesia/ooffice292820210287509431190170.09
./silesia/sao313829231758715646935289.21
../silesia/x-ray6626116541270698845979499.83
Back
Next