phaistos-networks / TANK

A very high performance distributed log service
Apache License 2.0
940 stars 70 forks source link

writting 100MM on tank-cli fails #58

Closed emaxerrno closed 6 years ago

emaxerrno commented 6 years ago

Hi Mark,

Was trying to test current HEAD and I got this.

./tank-cli -b localhost:11221 -t test -t test  bm p2b  -s 100 -c 100000000 -B 8196 -R
Will publish 100,000,000 messages, in batches of 8,196 messages, each message content is 100b (compression disabled)
tank-cli: Switch/buffer.h:919: void Buffer::EnsureSize(const uint32_t): Assertion `newSize >= newMin && newSize > length_' failed.
[1]    27166 abort (core dumped)  ./tank-cli -b localhost:11221 -t test -t test bm p2b -s 100 -c 100000000 -B 

do you have a different tag i should try.

markpapadakis commented 6 years ago

Thank you Alex,

Please check latest update, pushed a few minutes ago. It should work fine, though it will fail unless you set (s * c) to something lower, because Tank(the service) will explicitly shutdown connections if clients attempt to push more than 2MBs or so in a single request. You can try e.g start from: -s 10000 -c 10000 -B 8192

emaxerrno commented 6 years ago

Thanks mark!

The lastest version still core dumps

 ✘ agallego@mountdoom  ~/workspace/TANK   master  ./tank-cli  -b 127.0.0.1:11221 -t test  bm p2b  -s 1000 -c 100000000 -B 8196 -R
Will publish 100,000,000 messages, in batches of 8,196 messages (12,201 batch(es)), each message content is 1000b (compression disabled)
tank-cli: Switch/buffer.h:919: void Buffer::EnsureSize(const uint32_t): Assertion `newSize >= newMin && newSize > length_' failed.
[1]    30442 abort (core dumped)  ./tank-cli -b 127.0.0.1:11221 -t test bm p2b -s 1000 -c 100000000 -B 8196 -R

The output of the command is right. I want 12K batches of 8196 messages.

How would I fix that command then?

markpapadakis commented 6 years ago

Alex, it fails because the client attempts to allocate memory for 100 million messages x 1000 which is a lot of memory and it falls to allocate that much memory. This would be a single request, not 8192 requests. Even if it could allocate that much memory would be rejected by TANK because no individual request can be larger than 2mb or so in size. Maybe you are trying to execute 8k requests and get the average RTT ?

emaxerrno commented 6 years ago

I see. Thanks Mark!

I want to dispatch 12K rpc . Each of size 8196 messages. Each message of 100bytes.

I don't think all the options in the cli are documented

emaxerrno commented 6 years ago

I want to measure

P50 P95 P99 P999 P100

Maybe I'll instrument that myself