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.02s, 488.85 req/s, 286.91KB/s requests: 29331 total, 29371 started, 29331 done, 0 succeeded, 29331 failed, 0 errored, 0 timeout status codes: 0 2xx, 0 3xx, 0 4xx, 29331 5xx traffic: 16.81MB (17627931) total, 4.08MB (4282326) headers (space savings 0.00%), 10.94MB (11468421) data min max mean sd +/- sd time for request: 35.50ms 376.28ms 81.73ms 37.49ms 84.59% time for connect: 59us 2.18ms 214us 365us 92.50% time to 1st byte: 58.40ms 242.99ms 134.03ms 57.74ms 55.00% req/s : 10.07 12.90 12.22 0.81 87.50% ``` This was ---------------------------------------------------------------- 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]
