ywkaras edited a comment on pull request #7382: URL: https://github.com/apache/trafficserver/pull/7382#issuecomment-744784390
Performance testing in a RHEL7(ish) docker container on a MacBook (2.8 GHz Quad-Core Intel Core i7 16 GB 1600 MHz DDR3). Baseline commit on ATS master: 472075bd7b5755cc1d8bf9a4bbf750474c4da53c config.nice for build: ``` #! /bin/sh # # Created by configure CFLAGS=" "; export CFLAGS CXXFLAGS=" "; export CXXFLAGS LDFLAGS="-L/opt/oath/libssh2/1.8/lib -L/opt/oath/nghttp2/1.36/lib"; export LDFLAGS "./configure" \ "--with-openssl=/opt/oath/openssl/1.1.1" \ "--enable-experimental-plugins" \ "--enable-example-plugins" \ "--with-brotli=/opt/oath/brotli/1.0/include:/opt/oath/brotli/1.0/lib" \ "--enable-ccache" \ "--enable-werror" \ "--prefix=/Users/wkaras/TSX/TS4" \ "--exec-prefix=/Users/wkaras/TSX/TS4" \ "PKG_CONFIG_PATH=/opt/rh/devtoolset-8/root/usr/lib64/pkgconfig:/opt/rh/httpd24/root/usr/lib64/pkgconfig:/opt/rh/rh-python36/root/usr/lib64/pkgconfig:/opt/rh/devtoolset-8/root/usr/lib64/pkgconfig:/opt/rh/httpd24/root/usr/lib64/pkgconfig:/opt/rh/devtoolset-8/root/usr/lib64/pkgconfig" \ "CFLAGS=" \ "LDFLAGS=-L/opt/oath/libssh2/1.8/lib -L/opt/oath/nghttp2/1.36/lib" \ "CXXFLAGS=" \ "$@" ``` records.config: ``` CONFIG proxy.config.url_remap.remap_required INT 0 CONFIG proxy.config.http.cache.required_headers INT 0 CONFIG proxy.config.http.push_method_enabled INT 1 CONFIG proxy.config.http.server_ports STRING 8080 8081 ``` remap.config: ``` map http://localhost:8081 http://fakehost ``` I started TS up, then used this script to create (using PUSH) an object with URL http://fakehost/fake in the cache: ``` # Create an object in TS cache by sending a PUSH request. First param is TS TCP port to send request to # (default 8080). Second param is size in bytes (default 64K). if [[ "$1" != "" ]] ; then PORT=$1 else PORT=8080 fi if [[ "$2" != "" ]] ; then BYTES=$2 else BYTES=$(( 64 * 1024 )) fi EXE=$(mktemp) cc -x c -o $EXE - << THE_END #include <stdio.h> #include <stdlib.h> #include <stdint.h> #include <inttypes.h> int main(int n_arg, char const *const *arg) { int64_t data_count; int toggle = 0; int c = 'a', hdr_count; char buf[200]; if ((n_arg != 2) || ((data_count = atoi(arg[1])) < 0)) { fprintf(stderr, "size of object must be greater than 0\n"); return 1; } hdr_count = snprintf(buf, sizeof(buf), "HTTP/1.1 200 OK\r\n" "Content-Type: text/plain\r\n" "Content-Length: %" PRId64 "\r\n" "\r\n", data_count); if (hdr_count <= 0) { fprintf(stderr, "INTERNAL ERROR\n"); return 1; } if (printf("PUSH http://fakehost/fake HTTP/1.1\r\n" "Content-Length: %" PRId64 "\r\n" "\r\n%s", hdr_count + data_count, buf) <= 0) { fprintf(stderr, "error writing standard output\n"); return 1; } while (--data_count) { if (putchar(c) != c) { fprintf(stderr, "error writing standard output\n"); return 1; } if (c == '\n') { c = 'a'; } else if (toggle) { if (c == 'z') { c = '\n'; } else { ++c; } toggle = 0; } else { toggle = 1; } } if (putchar('\n') != '\n') { fprintf(stderr, "error writing standard output\n"); return 1; } if (fflush(stdout) != 0) { fprintf(stderr, "error writing standard output\n"); return 1; } return 0; } THE_END $EXE $BYTES | nc localhost $PORT rm -f $EXE ``` I used this command to generate traffic and measure performance: ``` h2load --h1 -t 40 -D 60 -c 40 http://localhost:8081/fake ``` For baseline TS (no code changes to the baseline commit), I got these results: ``` finished in 60.06s, 28099.97 req/s, 1.72GB/s requests: 1685998 total, 1686038 started, 1685998 done, 1685998 succeeded, 0 failed, 0 errored, 0 timeout status codes: 1686000 2xx, 0 3xx, 0 4xx, 0 5xx traffic: 103.16GB (110763455574) total, 188.13MB (197265042) headers (space savings 0.00%), 102.91GB (110495398871) data min max mean sd +/- sd time for request: 75us 173.42ms 1.42ms 1.75ms 95.98% time for connect: 41us 22.59ms 1.40ms 3.74ms 92.50% time to 1st byte: 641us 30.66ms 4.30ms 4.85ms 95.00% req/s : 648.39 742.04 702.49 23.81 65.00% ``` This was with running `./traffic_server` (no manager). When I ran `./traffic_server --disable_freelist` I got 26894.90 req/s . When I ran `./traffic_server --disable_pfreelist` (Proxy allocators disabled) I got 26367 req/s. ---------------------------------------------------------------- This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. For queries about this service, please contact Infrastructure at: [email protected]
