How to do Asynchronous inserts in Aerospike using Python Client

1.2k views Asked by At

I am using Aerospike 3.4 and Python Clinet 1.0.41

I am able to achieve only around 1400 writes per second. This is by synchronous writes, single thread. Can anyone suggest how to improve the write speed on single thread. I didn't find Asynchronous write feature in Python client.

I have seen benchmark results on the web claiming around 8L writes per second on SSD.

My Configuration: No of nodes:2, CPUs: 16 per node, Replication: 2, Data Persistence: SSD

Thanks, Dhanasekaran

3

There are 3 answers

2
Carbonrock On BEST ANSWER

A good news here is 'C' client 4.0 has been released with asynchronous support. http://www.aerospike.com/download/client/c/notes.html.

Since python client wraps around C client, there are very good chances that python client will have this feature sooner.

3
RavenMan On

Updated 2015-07-29:

(1) The Python Aerospike client is fully synchronous at the moment. There appeared to be no firm plans for async support in the discussion at https://discuss.aerospike.com/t/gevent-compatibility-or-async-api/1001 but Ronen has since confirmed below (see comments) that async support is planned for all clients in the future.

(2) Regarding 1.4k TPS, I experienced very similar results when hosting Aerospike in a VirtualBox VM and connecting from the physical host. This may be due to VirtualBox's networking issues. When the client (Java benchmark) was run on the same VM as the host database, my speed went up to about 8k TPS.

0
Sean Tan On

Source code: https://github.com/sean-tan-columbia/aerospike-async-client

I've implemented an Aerospike asynchronous client as an open-source project, the source code is as above. It has been tested on Aerospike 3.3 with Aerospike Python Client 1.0.38 and Python 2.7.

I just recently started it so it's not yet mature, welcome to improve it!