You are viewing a plain text version of this content. The canonical link for it is here.
Posted to github@trafficserver.apache.org by GitBox <gi...@apache.org> on 2023/01/10 22:29:16 UTC

[GitHub] [trafficserver] maskit opened a new pull request, #9298: Limit the serching range of static table by the first letter of header name

maskit opened a new pull request, #9298:
URL: https://github.com/apache/trafficserver/pull/9298

   Before:
   ```
   finished in 14.74s, 6784.85 req/s, 53.19MB/s
   requests: 100000 total, 100000 started, 100000 done, 100000 succeeded, 0 failed, 0 errored, 0 timeout
   status codes: 100000 2xx, 0 3xx, 0 4xx, 0 5xx
   traffic: 783.92MB (822000249) total, 976.78KB (1000219) headers (space savings 96.45%), 781.25MB (819200000) data
                        min         max         mean         sd        +/- sd
   time for request:      860us      3.60ms      1.45ms       179us    89.26%
   time for connect:     4.08ms      4.08ms      4.08ms         0us   100.00%
   time to 1st byte:     7.58ms      7.58ms      7.58ms         0us   100.00%
   req/s           :    6784.90     6784.90     6784.90        0.00   100.00%
   ```
   
   After:
   ```
   finished in 13.09s, 7642.25 req/s, 59.91MB/s
   requests: 100000 total, 100000 started, 100000 done, 100000 succeeded, 0 failed, 0 errored, 0 timeout
   status codes: 100000 2xx, 0 3xx, 0 4xx, 0 5xx
   traffic: 783.92MB (822000227) total, 976.75KB (1000197) headers (space savings 96.44%), 781.25MB (819200000) data
                        min         max         mean         sd        +/- sd
   time for request:      766us      3.28ms      1.28ms       163us    89.01%
   time for connect:     3.78ms      3.78ms      3.78ms         0us   100.00%
   time to 1st byte:     6.61ms      6.61ms      6.61ms         0us   100.00%
   req/s           :    7642.30     7642.30     7642.30        0.00   100.00%
   ```
   
   
   Before:
   <img width="736" alt="image" src="https://user-images.githubusercontent.com/153144/211675718-a81853dc-5c85-4d8e-b577-e57229d0bba6.png">
   
   After:
   <img width="740" alt="image" src="https://user-images.githubusercontent.com/153144/211675748-a70b3d58-2abc-4893-9e53-c0ab09416860.png">
   


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

To unsubscribe, e-mail: github-unsubscribe@trafficserver.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


[GitHub] [trafficserver] maskit commented on pull request #9298: Limit the serching range of static table by the first letter of header name

Posted by GitBox <gi...@apache.org>.
maskit commented on PR #9298:
URL: https://github.com/apache/trafficserver/pull/9298#issuecomment-1387681186

   Since entries in HPACK static table is sorted, we can narrow the search range by checking the first character of a header name.


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

To unsubscribe, e-mail: github-unsubscribe@trafficserver.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


[GitHub] [trafficserver] bneradt commented on a diff in pull request #9298: Limit the serching range of static table by the first letter of header name

Posted by GitBox <gi...@apache.org>.
bneradt commented on code in PR #9298:
URL: https://github.com/apache/trafficserver/pull/9298#discussion_r1081989070


##########
proxy/http2/HPACK.cc:
##########
@@ -227,7 +256,20 @@ namespace HpackStaticTable
   {
     HpackLookupResult result;
 
-    for (unsigned int index = 1; index < TS_HPACK_STATIC_TABLE_ENTRY_NUM; ++index) {
+    // Limit the search range of static table
+    unsigned int start = 1;

Review Comment:
   Maybe comment that the first real header value in TS_HPACK_STATIC_TABLE_ENTRY starts at 1? Without that context, initializing at 1 instead of 0 was surprising to me.



##########
proxy/http2/HPACK.cc:
##########
@@ -227,7 +256,20 @@ namespace HpackStaticTable
   {
     HpackLookupResult result;
 
-    for (unsigned int index = 1; index < TS_HPACK_STATIC_TABLE_ENTRY_NUM; ++index) {
+    // Limit the search range of static table
+    unsigned int start = 1;
+    unsigned int end   = TS_HPACK_STATIC_TABLE_ENTRY_NUM;
+    if ('a' <= header.name[0] && header.name[0] <= 'z') {

Review Comment:
   Since we're optimizing, does it help to grab the first character once and use that?
   
   ```
   char const first_char = header.name[0];
   ```



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

To unsubscribe, e-mail: github-unsubscribe@trafficserver.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


[GitHub] [trafficserver] maskit commented on pull request #9298: Limit the serching range of static table by the first letter of header name

Posted by "maskit (via GitHub)" <gi...@apache.org>.
maskit commented on PR #9298:
URL: https://github.com/apache/trafficserver/pull/9298#issuecomment-1398873004

   I added the comment and also a temporal variable to store the first character.


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

To unsubscribe, e-mail: github-unsubscribe@trafficserver.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


[GitHub] [trafficserver] maskit merged pull request #9298: Limit the serching range of static table by the first letter of header name

Posted by "maskit (via GitHub)" <gi...@apache.org>.
maskit merged PR #9298:
URL: https://github.com/apache/trafficserver/pull/9298


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

To unsubscribe, e-mail: github-unsubscribe@trafficserver.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org