ywkaras edited a comment on pull request #7674:
URL: https://github.com/apache/trafficserver/pull/7674#issuecomment-813721843


   Performance Testing
   
   Test server:  Intel Xeon CPU ES-2683 v4 @ 2.10GHz, 64 logical CPU cores.
   
   Baseline build, master commit a5a85234b7c13b938f3dae70f1e641bbc598e0bf
   
   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
   CONFIG proxy.config.diags.debug.enabled INT 0
   CONFIG proxy.config.diags.debug.tags STRING does_not_match_anything
   ```
   
   remap.config:
   ```
   map http://localhost:8081 http://fakehost
   ```
   
   Command to start TS:
   `TS_ROOT=$PWD LD_LIBRARY_PATH=$PWD/lib bin/traffic_server &`
   
   I ran this script to create the object /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 1K).
   
   if [[ "$1" != "" ]] ; then
       PORT=$1
   else
       PORT=8080
   fi
   
   if [[ "$2" != "" ]] ; then
       BYTES=$2
   else
       BYTES=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
   ```
   
   Traffic generation command:
   `h2load --h1 -t 64 -D 60 -c 512  http://localhost:8081/fake`
   
   ```
   fi
   ```
   Changing debug.enabled to 1:
   ```
   fi
   ```


-- 
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]


Reply via email to