Database Reference
In-Depth Information
If you see a message indicating that the stress test cannot connect to localhost:9160 , you have
a couple of options. First, make sure that your Cassandra server is actually started and listening
on that address and port. If you configured Cassandra to listen on your IP or hostname instead
of localhost, you can change the script to point where your server is, change your config to listen
on localhost, or, probably best, just pass the script the -d option to indicate which node you want
to connect to. Here we go:
$ stress.py -d 192.168.1.5
NOTE
You can execute stress.py -h to get usage on the stress test script.
The test will run until it inserts one million values, and then stop. I ran this test on a single regular
workstation with an Intel I7 processor (which is similar to eight cores) with 4GB of RAM avail-
able and a lot of other processes running. Here was my output:
eben@morpheus $ ./stress.py -d 192.168.1.5 -o insert
total,interval_op_rate,avg_latency,elapsed_time
196499,19649,0.0024959407711,10
370589,17409,0.00282591440216,20
510076,13948,0.00295883878841,30
640813,13073,0.00438663874102,40
798070,15725,0.00312562838215,50
950489,15241,0.0029109908417,60
1000000,4951,0.00444872583334,70
Let's unpack this a bit. What we've done is generated and inserted one million values into a com-
pletely untuned single node Cassandra server in about 70 seconds. You can see that in the first
10 seconds we inserted 196,499 randomly generated values. The average latency per operation
is 0.0025 seconds, or 2.5 milliseconds. But this is using the defaults, and is on a Cassandra serv-
er that already has 1GB of data in the database to manage before running the test. Let's give the
test more threads to see if we can squeeze a little better performance out of it:
eben@morpheus$ ./stress.py -d 192.168.1.5 -o insert -t 10
total,interval_op_rate,avg_latency,elapsed_time
219217,21921,0.000410911544945,10
427199,20798,0.000430060066223,20
629062,20186,0.000443717396772,30
832964,20390,0.000437958271074,40
1000000,16703,0.000463042383339,50
Search WWH ::




Custom Search