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
{{ message }}
Repository navigation
Commit a43cc05
Browse filesBrowse the repository at this point in the historyBrowse files
ext/mysqlnd: Use relaxed atomics for statistics in ZTS builds
In ZTS builds every statistics update locked a mutex, and the global
statistics are one object shared by all threads of the process. The
values are now atomic_uint_least64_t updated with relaxed atomic
additions, and LOCK_access is removed. NTS builds are unchanged.
FrankenPHP 1.13.1 in worker mode with 16 threads, one prepared SELECT
of 20 rows per request, AMD Ryzen 9 5950X, GCC 15.2. CPU time per
request with statistics on (the default), by the cores FrankenPHP
runs on:
- 4 cores of one CCD: 0.3029 -> 0.2722 ms (-10%)
- 4 cores, two on each CCD: 0.3553 -> 0.2934 ms (-17%)
- 8 cores of one CCD: 0.3810 -> 0.2739 ms (-28%)
- 8 cores, four on each CCD: 0.5274 -> 0.2781 ms (-47%)
Statistics on now cost 0.6-1.4% over statistics off, against 12%,
23%, 41% and 91% before.
0 commit comments