You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
In looking at a CPU pprof of one of our production instances, we have noticed that a significant amount of CPU time is being spend on the strings.ToLower in the normalizeHost function in table.go.
The pprof was taken on a 16 core instance, with about 3,000 requests per second of traffic. In this environment, the route table has about 13,000 separate routes. In the pprof, we see the following:
I've done some testing and updated the matchingHostNoGlob to use string.EqualFold instead of doing the comparison with the normalizeHost and strings.ToLower. With that change, the normalizeHost was reduced from 22% to 8% with similar request volume and route table size. The overall CPU usage of the instance was reduced by about 10%.
I'll create a PR to share the changes I've done already. I think there's still some opportunity to further reduce the CPU load by changing how the :port is trimmed off.
The text was updated successfully, but these errors were encountered:
In looking at a CPU pprof of one of our production instances, we have noticed that a significant amount of CPU time is being spend on the strings.ToLower in the normalizeHost function in table.go.
The pprof was taken on a 16 core instance, with about 3,000 requests per second of traffic. In this environment, the route table has about 13,000 separate routes. In the pprof, we see the following:
I've done some testing and updated the matchingHostNoGlob to use string.EqualFold instead of doing the comparison with the normalizeHost and strings.ToLower. With that change, the normalizeHost was reduced from 22% to 8% with similar request volume and route table size. The overall CPU usage of the instance was reduced by about 10%.
I'll create a PR to share the changes I've done already. I think there's still some opportunity to further reduce the CPU load by changing how the :port is trimmed off.
The text was updated successfully, but these errors were encountered: