Git Product home page Git Product logo

tcpkali's People

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

tcpkali's Issues

Latency Value is too Large, can't record

Seeing errors like below while running tests:

Latency value 223.976 is too large, can't record.
Latency value 224.032 is too large, can't record.
Latency value 219.1 is too large, can't record.
Latency value 219.407 is too large, can't record.
Latency value 220.719 is too large, can't record.
Latency value 218.847 is too large, can't record.
Latency value 223.449 is too large, can't record.
Latency value 217.907 is too large, can't record.
Latency value 209.543 is too large, can't record.
Latency value 124.174 is too large, can't record.
Latency value 197.907 is too large, can't record.
Latency value 218.193 is too large, can't record.
Latency value 234.989 is too large, can't record.
Latency value 209.13 is too large, can't record.
Latency value 204.588 is too large, can't record.
Latency value 216.269 is too large, can't record.

Offer Plugin Interface to Support Additional Transport Layers

tcpkali is a great tool for websockets and tcp, however, there are other transport layers that could benefit from the bench harness internal to tcpkali.

This feature request is for a plugin interface that would allow a user to define additional transports for use during testing.

make error: tcpkali_syslimits.c:34:10: fatal error: sys/sysctl.h: No such file or directory

tcpkali_syslimits.o -MD -MP -MF .deps/tcpkali-tcpkali_syslimits.Tpo -c -o tcpkali-tcpkali_syslimits.o test -f 'tcpkali_syslimits.c' || echo './'tcpkali_syslimits.c
tcpkali_syslimits.c:34:10: fatal error: sys/sysctl.h: No such file or directory
34 | #include <sys/sysctl.h>
| ^~~~~~~~~~~~~~
compilation terminated.
make[2]: *** [Makefile:627: tcpkali-tcpkali_syslimits.o] Error 1

do not support post?

When i use tcpkali for websocket test ,i found it does not support post method?

Cannot open multiple websockets

When trying to open more than one websocket endpoint, only the first one is used.

$ tcpkali --websocket --message "ping" --message-rate=20 --latency-marker="\n" --verbose=3 devel.cometa.io:8000/v1/websockets/1/ca77d88d78ff01fbe816490e8fb436c61d9f3fb3 devel.cometa.io:8000/v1/websockets/2/1cc75625d88fce1777b6b5cf8dfd5344a3a2d0df

I get the double destination but messages are only sent to the first one.

Destination: [54.241.247.101]:8000
Destination: [54.241.247.101]:8000

Payload generation

I'm using the tcpkali to test the capabilities of our websocket service under high load. We run a binary protocol over the socket. The tool works fine, out of the box πŸ‘. Though, currently we send the same message over and over, which causes our backend to start serving out cached results which skews our measurements.

I'm looking for a way to generate different payloads for each request. Is that something which is going to be supported? Or is there some alternative way I can achieve this?

tcpkali crashes while load testing

Hi
tcpkali crashes running following command
./tcpkali --workers 1 -c 1 -T 10s -1 "hello" -m "test" --ssl 127.0.0.1:8000 against

./evt of https://github.com/deleisha/evt-tls/tree/master/sample/libuv-tls
The server(evt) also crashes at OpenSSL layer

Here is the backtrace from the core being dumped on ubuntu 16.04

#0 0x000000000042f23b in clear_pending (w=0x7f5768001810, w@entry=0x68000078, w=0x7f5768001810, w@entry=0x68000078, loop=loop@entry=0x7f57680008c0) at ev.c:3580
No locals.
#1 ev_io_stop (loop=loop@entry=0x7f57680008c0, w=w@entry=0x7f5768001810) at ev.c:3657
PRETTY_FUNCTION = "ev_io_stop"
#2 0x000000000040874c in close_connection (loop=loop@entry=0x7f57680008c0, conn=conn@entry=0x7f5768001810, reason=reason@entry=CCR_REMOTE) at tcpkali_engine.c:2873
buf = "\020\030\000h\027\000\000\000\300\b\000hW\177\000\000\001\000\000\000\000\000\000\000\211+\336mW\177\000\000\000\000\000\000\000\000\000\000 \000\000\000\060\000\000\000\000\000\000\000\000@\000\000P0\277\000\000\000\000\000\206\023hW\177\000\000\206\023hW\177\000\000Ϊ­C", '\000' <repeats 29 times>, "\356Mz\317", '\000' <repeats 20 times>, "\001\000\000\000\213\356F\231 \021\000\000\000\000\000\000\000\a\312K\213\356F\231\000\000\000\000\000\000\000\000\377\377\377\377", '\000' <repeats 12 times>, "F*\220nW\177\000\000\000m\254mW\177\000\000\000\000\000\000"...
largs = 0xbf2a90
PRETTY_FUNCTION = "close_connection"
#3 0x000000000040c9dd in connection_cb (loop=, w=, revents=) at tcpkali_engine.c:2741
buf = "\020\000\000\000\000\000\000\000\300\b\000hW\177\000\000\020", '\000' <repeats 15 times>, "\001\000\000\000\000\000\000\000\204\001\325mW\177\000\000\t\000\000\000\000\000\000\000\000\a\312K\213\356F\231\000\000\000\000\000\000\000\000\340m\254mW\177\000\000\220*\277\000\000\000\000\000\020\030\000hW\177\000\000\003", '\000' <repeats 12 times>
available_write =
wrote =
available_body = 140013383718576
position =
available_header =
record_moved =
lockstep =
largs =
conn =
remote =
PRETTY_FUNCTION = "connection_cb"
#4 0x000000000042dbc3 in ev_invoke_pending (loop=0x7f57680008c0) at ev.c:3088
p =
#5 0x000000000043121e in ev_run (loop=loop@entry=0x7f57680008c0, flags=flags@entry=0) at ev.c:3488
flags = 0
loop = 0x7f57680008c0
#6 0x0000000000409834 in single_engine_loop_thread (argp=0xbf2a90) at tcpkali_engine.c:1000
largs = 0xbf2a90
loop = 0x7f57680008c0
global_control_watcher = {active = 1, pending = 0, priority = 0, data = 0x0, cb = 0x40ae70 <control_cb>, next = 0x0, fd = 3, events = 1}
private_control_watcher = {active = 1, pending = 0, priority = 0, data = 0x0, cb = 0x40ae70 <control_cb>, next = 0x0, fd = 9, events = 1}
on_main_thread =
PRETTY_FUNCTION = "single_engine_loop_thread"
stats_flush_interval_ms = 42
#7 0x00007f576e09d6ba in start_thread (arg=0x7f576dac7700) at pthread_create.c:333
__res =
pd = 0x7f576dac7700
now =
unwind_buf = {cancel_jmp_buf = {{jmp_buf = {140013478901504, 5952960589203722786, 0, 140723353956335, 140013478902208, 12528272, -6038217394577255902,
-6038212135155576286}, mask_was_saved = 0}}, priv = {pad = {0x0, 0x0, 0x0, 0x0}, data = {prev = 0x0, cleanup = 0x0, canceltype = 0}}}
not_first_call =
pagesize_m1 =
sp =
freesize =
PRETTY_FUNCTION = "start_thread"
#8 0x00007f576ddd33dd in clone () at ../sysdeps/unix/sysv/linux/x86_64/clone.S:109

Doesnt build on Ubuntu

make[2]: Entering directory /home/*****/Downloads/tcpkali-0.8/src' gcc -DHAVE_CONFIG_H -I. -I.. -I../deps/libev -I../deps/libcows -I../deps/libstatsd/src -I../deps/HdrHistogram -I../deps/boyer-moore-horspool -std=gnu99 -W -Wall -Wno-strict-aliasing -fno-strict-aliasing -g -O2 -pthread -MT tcpkali-tcpkali_terminfo.o -MD -MP -MF .deps/tcpkali-tcpkali_terminfo.Tpo -c -o tcpkali-tcpkali_terminfo.otest -f 'tcpkali_terminfo.c' || echo './'tcpkali_terminfo.c tcpkali_terminfo.c:149:6: error: conflicting types for β€˜tcpkali_init_terminal’ void tcpkali_init_terminal(void) { return; } ^ In file included from tcpkali_terminfo.c:43:0: tcpkali_terminfo.h:34:5: note: previous declaration of β€˜tcpkali_init_terminal’ was here int tcpkali_init_terminal(void); ^ make[2]: *** [tcpkali-tcpkali_terminfo.o] Error 1 make[2]: Leaving directory/home/_/Downloads/tcpkali-0.8/src'
make[1]: ** [all-recursive] Error 1
make[1]: Leaving directory `/home/**
**/Downloads/tcpkali-0.8'
make: *_* [all] Error 2

Can't open more than 1000 connections on mac os x

Mac OS X 10.10.3 (14D136)

18:06 $ ~/bin/tcpkali -c 1100 -T 60 127.0.0.1:3000
Destination: [127.0.0.1]:3000
WARNING: 1100 connections might not be opened at a rate 100 within test duration 60.
Decrease --connections=1100, or increase --duration=60 or --connect-rate=100.
(libev) select: Invalid argument============>-----| 999 of 1100 (999)
Abort trap: 6

Configure error about "error: cannot find input file: `asn1/Makefile.in'"

When running ./configure, there is always an error about "config.status: error: cannot find input file: `asn1/Makefile.in'".

I have try it on two different Ubuntu and have the same result.

image

checking whether compiling and linking against OpenSSL works... yes
checking for SSL_CTX_set_ecdh_auto... no
checking for pandoc... no
checking for clang-format... :
checking for python... /usr/bin/python
checking for python version... 2.7
checking for python platform... linux2
checking for python script directory... ${prefix}/lib/python2.7/dist-packages
checking for python extension module directory... ${exec_prefix}/lib/python2.7/dist-packages
checking for pep8... :
checking for pylint... :
checking for shellcheck... :
checking that generated files are newer than configure... done
configure: creating ./config.status
config.status: creating Makefile
config.status: error: cannot find input file: `asn1/Makefile.in'

How to compile tcpkali with TLS support?

Hi,

Can someone help me to compile tcpkali with TLSsupport ? I am seeing below message when I try to use ssl option. I built it from source as per documentation in github repo.

tcpkali --ssl --message '$' 3.94.69.40:443/1 -c 80 -T 20
Compiled without TLS support

Best,
Ravi Kiran

Hex Mesage

is possible to send Message Hex Format and automatic translate to byte array?

Use of \{ws.text <file>}

Hello again πŸ˜„

I am trying to use \{ws.text <mypayload>} but I cannot quite get the desired result.
Can I ask you what is the format I should use in the file?

Should it be a newline-separated series of strings (In my case JSON)?

A big thanks,
Andrea.

tcpkali -l <port> --ws exits immediately with return code 0 if host:port is not provided

$ tcpkali -l 8999 --ws
Listen on: [0.0.0.0]:8999
Listen on: [::]:8999
Total data sent:     0 bytes (0 bytes)
Total data received: 0 bytes (0 bytes)
Bandwidth per channel: 0.000β‡… Mbps (0.0 kBps)
Aggregate bandwidth: 0.000↓, 0.000↑ Mbps
Packet rate estimate: 0.0↓, 0.0↑ (0↓, 0↑ TCP MSS/op)
Test duration: 0.000210047 s.

I would expect it to either complain or listen to 127.1.

ability to not bind client

TCPKali seems to always bind when connecting. This can make sense if there are multiple network interfaces, but if there is only one interface then binding actually reduces the number of available connections, at least on Linux.

Connections are limited by the number of unique src/dest pairs. If TCPKali makes lots of connections to two IP addresses with one network interface, it should be able to make 64k * 2 total connections. However, when binding, this is limited to just 64k. This doesn't really make sense to me, since I'm not sure how a bind call would affect the uniqueness of src/dest pairs, but maybe I'm overlooking something.

Anyway, commenting out the bind() call in tcpkali lets me make greater than 64k outbound connections with one network interface. Probably there should be an option to disable the bind, or TCPKali should only bind if there is more than one valid interface for the destination.

About latencies and Latency at percentiles

My test report:

Destination: [127.0.0.1]:8001
Ramped up to 10 connections.
Total data sent:     0.6 MiB (649285 bytes)
Total data received: 2.4 MiB (2534118 bytes)
Bandwidth per channel: 0.255β‡… Mbps (31.8 kBps)
Aggregate bandwidth: 2.027↓, 0.519↑ Mbps
Latency at percentiles: 616.3/2486.3/2502.3 (95/99/99.5%)
Mean and max latencies: 322.3/2540.7 (mean/max)
Test duration: 10.0029 s.

what mean of latencies or Latency at percentiles?

Build error

I have the following error during make:

make[2]: Entering directory '/home/narma/s/tcpkali/src'
gcc -DHAVE_CONFIG_H -I. -I..  -I../deps/libev -I../deps/libcows -I../deps/libstatsd/src -I../deps/HdrHistogram -I../deps/boyer-moore-horspool  -std=gnu99 -W -Wall -Wno-strict-aliasing -fno-strict-aliasing -g -O2 -pthread -MT tcpkali-tcpkali_expr_y.o -MD -MP -MF .deps/tcpkali-tcpkali_expr_y.Tpo -c -o tcpkali-tcpkali_expr_y.o `test -f 'tcpkali_expr_y.c' || echo './'`tcpkali_expr_y.c
tcpkali_expr_y.y: In function 'yyparse':
tcpkali_expr_y.y:44:24: error: 'param' undeclared (first use in this function)
         *(tk_expr_t **)param = expr;
                        ^
tcpkali_expr_y.y:44:24: note: each undeclared identifier is reported only once for each function it appears in

Latency/tput with tcpkali ?

Hello,
we're trying to measure how many requests per second a given tcpkali can handle before the response time grows to unacceptable values (let's say more than 2/3 seconds).
Ideally, we would like to send as much traffic at fixed rates (either in terms of messages per second or fixed mbit rate) and observe the response latencies.
Is tcpkali the right tool for this task ?

What we tried is the following. On the server-side:
./tcpkali --listen-port 8888 --listen-mode=active -T3h --write-combine=off -m "PONG"
(we assume the 'PONG' messages are used to reply upon each client request...if this is not the case, how do we enforce it?)

Next, on the client-side:
/tcpkali server-node:8888 -m "PING" --latency-marker "PONG" --write-combine=off

But it seems not to do what we want: the server is sending 'PONG' messages as fast as possible.

Are doing something conceptually wrong ?
We are using the master branch from this repository, latest release.

Send query parameters on connection

Dear maintainer,

in order to benchmark the behavior of my server-side websocket implementation, I need to have some payload sent as query query parameter (?client-id), see Wireshark dump below:

GET /chsk?client-id=bd5ee0f2-dc22-47b5-98ab-618711f34b45 HTTP/1.1
Host: localhost:3000
Connection: Upgrade
Pragma: no-cache
Cache-Control: no-cache
Upgrade: websocket
Origin: http://localhost:3000
Sec-WebSocket-Version: 13
User-Agent: Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/54.0.2824.0 Safari/537.36
Accept-Encoding: gzip, deflate, sdch, br
Accept-Language: en-US,en;q=0.8,fr-FR;q=0.6,fr;q=0.4
Cookie: ...
Sec-WebSocket-Key: Nl49IiqBKuyC/x5FVHrqwA==
Sec-WebSocket-Extensions: permessage-deflate; client_max_window_bits

At the moment tcpkali sends a message, but I have not found a way to send it as query the moment the handshake is established. I would be willing to contribute the feature but my C is a bit rusty (I haven't been doing it for 10 years or so). I would for sure need some guidance.

First things first, would you be open to such a feature?

Thanks for your work by the way!
Andrea.

Can't generate more than 1013 concurrent connections

Hi there, I want to use tcpkali to generate 2000 concurrent websockets connections, however when I issued following command, the connection can't be generated more when it hits 1013.

fredwang@HPDMDebian:/etc/rabbitmq|β‡’  tcpkali -c2000 --ws 192.168.0.180:8010 --duration 3h
Destination: [192.168.0.180]:8010
Interface eth0 address [192.168.0.212]:0
Using interface eth0 to connect to [192.168.0.180]:8010
|=======================>-----------------------| 1013 of 2000 (7484)

I've add following settings into /etc/sysctl.conf
net.ipv4.tcp_tw_reuse = 1
Also, the result returned by ulimit -n is 65536. Is there anything I miss?

using tcpkali to measure pubsub latency

It would be great if tcpkali could externally invoke a message delivery system and then confirm receipt on the client connections. One idea I have is to be able to pass a program name via argument, which tcpkali could run on startup and then feed it unique strings via stdout.

Tcpkali could then generate a unique strings to be used as a latency markers, send the strings to the child process, and wait to see when the strings shows up on the client connections.

support ssl

To allow wss and https testing scenarios.

Could not create 1 connection in allotted time

Could not create 1 connection in allotted time when run tcpkali, the command is as follows:

tcpkali --latency-connect -r 400 -em 'GET / HTTP/1.0\r\n\r\n' 1.1.1.40:80

and tool on the other side is nginx (1.1.1.40:80)

I checked that packets are sent on nginx, but I don't know why connection can't be created on tcpkali.
do you known the reason?

[root@dell-per730-41 tcpkali]# tcpkali --latency-connect -r 400 -em 'GET / HTTP/1.0\r\n\r\n' 1.1.1.40:80
Destination: [1.1.1.40]:80
Interface p4p1 address [1.1.1.41]:0
Using interface p4p1 to connect to [1.1.1.40]:80
Could not create 1 connection in allotted time (10s)

Not support bind Clinet IP

The max requests from same IP is 65535, so if I want mock clients more , add Virtual Network Adapter can't resolve it.

Failed installation on ubuntu 17.10

Hi,

Failed installation from source on Ubuntu 17.10/

See Dockerfile:

FROM ubuntu:17.10

RUN \
    apt-get update && \
    apt-get install -y curl bzip2 sudo autoconf build-essential automake libtool bison flex gcc git && \
    git clone https://github.com/machinezone/tcpkali && \
    cd tcpkali && \
    autoreconf -iv && \
    ./configure  &&\
    make && \
    make install

CMD "tcpkali"

Error:

mv -f .deps/tcpkali-tcpkali_ring.Tpo .deps/tcpkali-tcpkali_ring.Po
gcc -DHAVE_CONFIG_H -I. -I..   -I../deps/libev -I../deps/libcows -I../deps/libstatsd/src -I../deps/HdrHistogram -I../deps/boyer-moore-horspool -I../deps/pcg-c-basic  -std=gnu99 -W -Wall -Wno-strict-aliasing -fno-strict-aliasing -g -O2 -pthread -MT tcpkali-tcpkali_terminfo.o -MD -MP -MF .deps/tcpkali-tcpkali_terminfo.Tpo -c -o tcpkali-tcpkali_terminfo.o `test -f 'tcpkali_terminfo.c' || echo './'`tcpkali_terminfo.c
tcpkali_terminfo.c:58:23: error: storage size of 'initial_term_attr' isn't known
 static struct termios initial_term_attr;
                       ^~~~~~~~~~~~~~~~~
tcpkali_terminfo.c:59:12: warning: 'input_initialized' defined but not used [-Wunused-variable]
 static int input_initialized = 0;
            ^~~~~~~~~~~~~~~~~
tcpkali_terminfo.c:58:23: warning: 'initial_term_attr' defined but not used [-Wunused-variable]
 static struct termios initial_term_attr;
                       ^~~~~~~~~~~~~~~~~
Makefile:1044: recipe for target 'tcpkali-tcpkali_terminfo.o' failed
make[2]: *** [tcpkali-tcpkali_terminfo.o] Error 1
make[2]: Leaving directory '/tcpkali/src'
Makefile:439: recipe for target 'all-recursive' failed
make[1]: Leaving directory '/tcpkali'
make[1]: *** [all-recursive] Error 1
Makefile:371: recipe for target 'all' failed
make: *** [all] Error 2

1.1 release tarball is missing pcg_basic.h

I noticed this due to

clang -DHAVE_CONFIG_H -I. -I..  -I../deps/libev -I../deps/libcows -I../deps/libstatsd/src -I../deps/HdrHistogram -I../deps/boyer-moore-horspool -I../deps/pcg-c-basic  -std=gnu99 -W -Wall -Wno-strict-aliasing -fno-strict-aliasing -g -O2 -Qunused-arguments -pthread -c -o tcpkali-pcg_basic.o `test -f '../deps/pcg-c-basic/pcg_basic.c' || echo './'`../deps/pcg-c-basic/pcg_basic.c
../deps/pcg-c-basic/pcg_basic.c:31:10: fatal error: 'pcg_basic.h' file not found
#include "pcg_basic.h"
         ^
1 error generated.
make[2]: *** [tcpkali-pcg_basic.o] Error 1
make[1]: *** [all-recursive] Error 1
make: *** [all] Error 2

--message-rate @latency is not working

Tcpkali is not increasing rate when @Latency arg is passed

Echo server on one side:

# ncat -4 -l 2000 --keep-open --exec "/bin/cat"

Trying to get max rate with given latency:

# tcpkali 10.198.128.47:2000 --ws  -T 30m -c1 -m '@marker@\{global.re [a-z]{60000}}' --latency-marker '@marker@' -r @10ms
Ramped up to 1 connections.
Attempting --message-rate 400 (in range 100..inf)
πŸ•›  Traffic 47.971↓, 47.985↑ Mbps (0↓ 1↑ 0⇑; 1) (m=0.2 ms⁹⁡ᡖ)
Attempting --message-rate 1600 (in range 400..inf)
πŸ•›  Traffic 48.029↓, 48.027↑ Mbps (0↓ 1↑ 0⇑; 1) (m=0.2 ms⁹⁡ᡖ)
Attempting --message-rate 6400 (in range 1600..inf)
πŸ•›  Traffic 48.016↓, 48.015↑ Mbps (0↓ 1↑ 0⇑; 1) (m=0.2 ms⁹⁡ᡖ)
Attempting --message-rate 25600 (in range 6400..inf)
πŸ•›  Traffic 48.012↓, 48.011↑ Mbps (0↓ 1↑ 0⇑; 1) (m=0.2 ms⁹⁡ᡖ)
Attempting --message-rate 102400 (in range 25600..inf)
πŸ•›  Traffic 48.061↓, 48.061↑ Mbps (0↓ 1↑ 0⇑; 1) (m=0.2 ms⁹⁡ᡖ)

As may be seen actual rate is not increasing

Wait for response option?

Hi,
First of all, great utility you've written here!

I try to understand it and test a TCP protocol that I wrote. I run it with this command
tcpkali --unescape-message-args --latency-connect --latency-marker '\x00\x01' --latency-percentiles 50,100 -r 10 -c 1000 -T20s -1 '\x35\x36' -m '\x00\x01\x00\x00\x7C\x5E' <ip>:<port>
and I have this outcome

Decrease --connections=1000, or increase --duration=20 or --connect-rate=100.
Ramped up to 1000 connections.
Total data sent: 9.2 MiB (9614129 bytes)
Total data received: 198.2 KiB (203003 bytes)
Bandwidth per channel: 0.004β‡… Mbps (0.5 kBps)
Aggregate bandwidth: 0.081↓, 3.843↑ Mbps
Packet rate estimate: 36.7↓, 10009.1↑ (1↓, 1↑ TCP MSS/op)
TCP connect latency at percentiles: 0.1/495.1 ms (50/100%)
Message latency at percentiles: 1391.1/12428.7 ms (50/100%)
Test duration: 20.0112 s.

From what I understand is this: tcpkali sent out ~10k packets per second and only received ~36 per second. And the rest, can't really understand.

Also, is there an option to say something like "don't send the next request until the server sent back something" ?
By having this option, we can actually test a protocol.

Unable to Process --first-message Response

I am attempting to use tcpkali to benchmark a system which responds to the first-message with a JSON encoded payload of {success: true} or {success: false, reason: string()}. The former ({success: true}) also serves as our latency marker.

This prevents us from using tcpkali as I see the following error message shortly after tcpkali ramps up connections:

More messages received than sent. Choose a different --latency-marker.

In this case, I would like to be able to expect a certain result from --first-message as, in my case, this pertains to whether or not a connection initialized successfully.

Can't seem to get websocket testing to work.

Hi, thanks for creating this useful library! I've some trouble getting it to work however.

The following command:

tcpkali --websocket --first-message "date" 127.0.0.1:1337 # returned no data

This is the server's code

var express = require('express'),
    cors = require('cors'),
    app = express();
app.use(cors());
//noinspection JSUnresolvedFunction
var http = require('http').Server(app);
var io = require('socket.io')(http);

io.on('connection', (socket) => {
    winston.log('info', 'a user has connected, socket-id: ' + socket.id, {tags: ['Connection']});

    socket.on('date', function () {
        var currentdate = new Date();
        socket.emit('date', currentdate);
    });

});

http.listen(1337, function() {
    winston.log('info', 'CORs-enabled server listening at port 1337', {tags: ['Init']});
});

Looking forward to seeing it in action.

connection.uid corrupts message

For example, if I run:

tcpkali -em 'GET /image-\{connection.uid%10}.jpg\r\n\r\n' localhost:8000

Then, the server receives the message but with 6 seemingly-bogus bytes prepended: 81 a3 00 00 00 00, and the last 6 bytes of the message missing (pg\r\n\r\n not sent).

If I don't use a connection.uid expression in the message then this problem doesn't happen.

--channel-bandwidth-downstream affects sender

When I add --channel-bandwidth-downstream option not only receiving side gets blocked but the sender as well.
Example:

server side

$ tcpkali -l 8839  -T '15m' --dump-all --listen-mode=active -m "**********" -r 1
Listen on: [0.0.0.0]:8839
Snd(233, 10): [**********]
Rcv(233, 10): [@@@@@@@@@@]
Snd(233, 10): [**********]
Rcv(233, 10): [@@@@@@@@@@]
Snd(233, 10): [**********]
Rcv(233, 10): [@@@@@@@@@@]
Snd(233, 10): [**********]
Snd(233, 10): [**********]
Snd(233, 10): [**********]
Snd(233, 10): [**********]
Snd(233, 10): [**********]
Snd(233, 10): [**********]
Snd(233, 10): [**********]
Snd(233, 10): [**********]
Snd(233, 10): [**********]
Snd(233, 10): [**********]
Snd(233, 10): [**********]
Snd(233, 10): [**********]
Snd(233, 10): [**********]
Snd(233, 10): [**********]
Snd(233, 10): [**********]
Snd(233, 10): [**********]
Snd(233, 10): [**********]
//... keeps sending ...

client side

tcpkali -m "@@@@@@@@@@"  -c 1 -T '15m' -r 1 --dump-all  --channel-bandwidth-downstream '5Bps' localhost:8839 --nagle=on
Destination: [127.0.0.1]:8839
Destination: [127.0.0.1]:8839
Interface lo address [127.0.0.1]:0
Using interface lo to connect to [127.0.0.1]:8839
Using interface lo to connect to [127.0.0.1]:8839
Ramped up to 1 connections.
Rcv(12, 10): [**********]
Snd(12, 10): [@@@@@@@@@@]
Snd(12, 10): [@@@@@@@@@@]
Rcv(12, 20): [********************]
Snd(12, 10): [@@@@@@@@@@]
πŸ•  Traffic 0.000↓, 0.000↑ Mbps (conns 0↓ 1↑ 0⇑; seen 1)

//... sends nothing more (but it should)...

Add time unit to latency percentile output

Running with --latency-marker gives the following output:

$ tcpkali -c 50 -r 1000 -T 60s --websocket --latency-marker "pong" --message "ping" localhost:8080
WARNING: Dumb terminal, expect unglorified output.
Destination: [127.0.0.1]:8080
Interface lo address [127.0.0.1]:0
Using interface lo to connect to [127.0.0.1]:8080
Ramped up to 50 connections.
Total data sent: 28.6 MiB (30009173 bytes)
Total data received: 17.2 MiB (18005609 bytes)
Bandwidth per channel: 0.128β‡… Mbps (16.0 kBps)
Aggregate bandwidth: 2.401↓, 4.001↑ Mbps
Packet rate estimate: 48796.8↓, 44670.8↑ (1↓, 1↑ TCP MSS/op)
Message latency at percentiles: 0.0/0.2/0.4 (95/99/99.5%)
Test duration: 60.002 s.

The latency at percentiles section could be improved by showing the time unit of those values.
For example I am not sure if the 99.5% is 0.4ms or if its some other time unit.

Wrong message rate value when {re } is present

Trying to send 100K messages per second but message counter shows only 1K-ish number. Actual rate is 100K though (could be confirmed by bitrate and by message rate on receiving side):

Sender (message rate is wrong):

tcpkali 127.0.0.1:12345 --ws  -T 30m -c1 -m '\{re [0-9]}\{message.marker}' -r100000
πŸ•›  Traffic 0.000↓, 29.435↑ Mbps (0↓ 1↑ 0⇑; 1) (0↓ 786↑ mps) (m=? ms⁹⁡ᡖ)

Receiver (message rate is correct):

tcpkali -l 12345 --ws -T 1d --message-marker
πŸ•›  Traffic 29.857↓, 0.000↑ Mbps (1↓ 0↑ 0⇑; 27) (100868↓ 0↑ mps) (m=16.9 ms⁹⁡ᡖ)

If {re ...} expression is removed from the message the bug disappears.

Support micro / nano second latencies

I assume latencies are reported in ms? However if the response times are below milli seconds range, the latency report shows 0s and nan, example below.

Latency at percentiles: 0.0/0.0/0.0 (95/99/99.5%)
Mean and max latencies: nan/0.0 (mean/max)

tcpkali: unrecognized option `--latency-marker-skip'

Looks like the latest version of tcpkali lacks some options described in README.

  β€Ί tcpkali --version
tcpkali version 0.6 (libev)

  β€Ί tcpkali -r 50 -c 4 --latency-marker '[1,0,' --latency-marker-skip 2 Β·Β·Β·
tcpkali: unrecognized option `--latency-marker-skip'
--latency-marker-skip: unknown option
Β·Β·Β·

Fails running ./configure

vagrant@vagrant-ubuntu-trusty-64:~/tcpkali$ ./configure
configure: error: cannot find install-sh, install.sh, or shtool in config "."/config

I ran the following to solve it

$ libtoolize --force
$ aclocal
$ autoheader
$ automake --force-missing --add-missing
$ autoconf
$ ./configure

copied from here

Message not appear in server

I want to my tcp server with command,

tcpkali --connections 10 192.168.100.23:9003 --message "Helo\r\n"
``
but in my server message Helo not appear... what going on?

when try manually using telnet 9003 my message appear in server

Long running server

When testing lots of machines, it may be desirable to use a tcpkali server purely as an endpoint for multiple tcpkali clients, with the test driven on the client side. In this situation, we may want the server to run for unlimited connections and indefinite time.

The interface for this could be "-1" to the -T option indicating unlimited time.

Build Error

Hi,
I'm getting the below build error:

make[2]: Entering directory `/var/tcpkali/src'
/bin/bash ../config/ylwrap tcpkali_expr_l.l .c tcpkali_expr_l.c -- /bin/bash /var/tcpkali/config/missing flex -s
lex.yytcpkali_expr_l.c is unchanged
gcc -DHAVE_CONFIG_H -I. -I..  -I../deps/libev -I../deps/libcows -I../deps/libstatsd/src -I../deps/HdrHistogram -I../deps/boyer-moore-horspool  -std=gnu99 -W -Wall -Wno-strict-aliasing -fno-strict-aliasing -g -O2 -pthread -MT tcpkali-tcpkali_expr_l.o -MD -MP -MF .deps/tcpkali-tcpkali_expr_l.Tpo -c -o tcpkali-tcpkali_expr_l.o `test -f 'tcpkali_expr_l.c' || echo './'`tcpkali_expr_l.c
gcc: error: ./tcpkali_expr_l.c: No such file or directory
gcc: fatal error: no input files
compilation terminated.
make[2]: *** [tcpkali-tcpkali_expr_l.o] Error 4
make[2]: Leaving directory `/var/tcpkali/src'
make[1]: *** [all-recursive] Error 1
make[1]: Leaving directory `/var/tcpkali'
make: *** [all] Error 2

Not sure what the issue is? Any ideas?

Thanks for your help.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    πŸ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. πŸ“ŠπŸ“ˆπŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❀️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.