duke8253 opened a new pull request #7719:
URL: https://github.com/apache/trafficserver/pull/7719


   This should help reduce the CPU utilization some more, @shinrich found this 
when testing a new build in prod. The `std::unordered_map` was supposed to 
provide speed when `getSession` takes up majority of the session cache 
workload. But to retain the functionalities it had to work along side 
`std::map`, and looks like that is messing things up a bit.
   
   ```
      4.51%  traffic_server                                 [.] 
std::_Hashtable<SSLSessionID, std::pair<SSLSessionID const, SSLSession*>, 
std::allocator<std::pair<SSLSessionID const, SSLSession*> >, 
std::__detail::_Select1st, std:
      4.28%  libwaflzts.so                                  [.] 
ns_waflz::ac::find
      1.96%  libc-2.17.so                                   [.] __memcmp_sse4_1
   ```
   
   After testing a few different ways to store sessions, `std::unordered_map` 
always takes up around 4% cpu whenever it's paired with other data structures, 
but by itself it's not even showing up in the perf top list. Since session id 
reuse rate is extremely low now (around 0.1-0.2% in our production), I think 
it's ok to just remove any random session in the cache. And after testing, 
removing random sessions still provided around 0.1-0.2% reuse rate. 


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