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 ``` I started TS up, then used this script to create (using PUSH) an object with URL http://localhost/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://localhost/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 ``` ---------------------------------------------------------------- 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]
