📜 ⬆️ ⬇️

How to incorrectly test the performance of NoSQL DB in Amazon

The post tells about my unsuccessful performance test, and also shows a couple of incorrect numbers of ARDB performance with LMDB embedded database in Amazon EC2 containers.

Where the legs grow


The project expects that from time to time it will be necessary to write thousands of rows in the database for the minimum time. Of course, I don’t want to load the main database, after a little digging I liked LMDB . A ARDB is a wrapper that allows you to reach the last one as to Redis.

Unfortunately I could not find the performance tests of this miracle in Amazon ec2, so I decided to check it myself

DISCLAIMER


The post is not about choosing NoSQL database ... Only one database was tested on different configurations
')

Equipment and installation


Tests were performed in 4 configurations.


All components for tests compiled from source.

Typical installation scenario:

yum install git yum install gcc git checkout git://smth cd smth make 

Errors


The main mistake was not planning ... there was only an idea. Also, I did not take into account the features of Amazon that most services give a burst at the start of active use, and then the performance decreases, this refers to:


As a result of the wrong choice of instances - often the CPU of the server being tested was not fully loaded

Ideally, it would be worth simulating the real way of use, but as always there is no time ...

Without taking into account all these points, all the figures below are only indicative, synthetics gentlemen.

Measurements


Small data set


The data set is modest, I did not want to wait, but yes, I wanted to get an assessment.

Number of keys: 1,000,000 keys (read 650k records in the database)
Customers: 50
Record size: 3,000 bytes

Tested by several consecutive commands:

 #   ./redis-benchmark -n 1000000 -r 1000000 -h ec2-xx-xx-xx-xx.eu-west-2.compute.amazonaws.com -p 16379 -t set -d 3000 #    100k ./redis-benchmark -n 1000000 -r 100000 -h ec2-xx-xx-xx-xx.eu-west-2.compute.amazonaws.com -p 16379 -t get -d 3000 #    1m ./redis-benchmark -n 1000000 -r 1000000 -h ec2-xx-xx-xx-xx.eu-west-2.compute.amazonaws.com -p 16379 -t get -d 3000 

Characteristict2.microi3.large
GP2IO1
3000 PIOPS6000 piops
Server price$ 10$ 10$ 10$ 130
Disc price$ 1$ 9 **$ 18 **$ 1
PIOPS price-$ 195$ 390-
Price, total$ 11$ 214$ 418$ 131
CPU10-100%10-100%10-100%200%
Ram1GB1GB1GB16GB
Iops100,
up to 300,000 in burst
3,0006,000100,000
Record, constant load700 (disk throttled)
1,700 (CPU throttled)
1,3002,30027,000 ***
Record, burst2,70010,000> 10,000
Reading from 100k kit, stable load<4,00011,000 *21,000 *
Reading from a 100k set, burst35,000
Reading from 1m set, stable load<4,0003,0005,00043,000 *, ***
Reading from a 1m dial, burst6,000
* all data is placed in RAM
** Amazon limit, no more than 50 PIOPS per gigabyte
*** read "no less than", the bottleneck in these tests is the transfer rate from the server where the redis-benchmark was launched

i3.large


Here testing was conducted on different sizes of the database.
CharacteristicDB size, keys
100k1m10m30m
Read speed41,40742,97743,22017.286 *
Delay reading, up to 1ms60.14%62.34%60.27%2.88%
Delay reading up to 5ms99.97%100.00% **99.99%99.16%
Maximum read delay6ms **3ms **13ms **14ms **
Write speed34,83126,91115.967 *10,353 *
Delay recording, up to 1ms11.96%8.66%5.22%2.88%
Delay recording, up to 5ms99.53%97.50%96.15%82.65%
Delay recording, up to 50ms100%99.99%99.74%99.68%
Record delay up to 100ms100%**99.99%99.84%99.75%
Recording delay up to 300ms100%**99.99%99.94%99.87%
Delay recording up to 500ms100%**100%99.96%99.91%
Maximum recording delay17ms **604ms3104ms5059ms
* read "no less than", the bottleneck in these tests is the transfer rate from the server where the redis-benchmark was launched
** results are thrown, for which they are detained exactly for 200ms for an unclear reason, blame the Amazon environment

findings



Thank you, I hope my time will be useful to someone for free .

Source: https://habr.com/ru/post/341778/


All Articles