Bug 60006

Summary: Replacing g_mutex_skiplist_mtx mutex lock with pthread_spin_lock provides performance benefit
Product: Apache httpd-2 Reporter: Mejbah <mejbah.alam>
Component: mpm_eventAssignee: Apache HTTPD Bugs Mailing List <bugs>
Status: NEW ---    
Severity: normal CC: jim, toscano.luca
Priority: P4    
Version: 2.4.20   
Target Milestone: ---   
Hardware: All   
OS: Linux   

Description Mejbah 2016-08-15 16:47:44 UTC
While running benchmark ab with our tool we found that g_timer_skiplist_mtx is acquired very frequently but the contention is very low. We experinted by replacing this pthread_mutex_lock with spinlock. We achieve 7% speedup running 
./ab -k -c 350 -n 20000 localhost:8080/
in our 16 core linux machine.
Comment 1 Yann Ylavic 2016-08-22 08:53:55 UTC
There is a patch proposed in https://bz.apache.org/bugzilla/show_bug.cgi?id=57399#c5 which avoids this lock in the listener (unless necessary, i.e. it should be more contented in this case).

Could you please pass your test(s) with it?