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
Bug#35916912 Performance degradation from 8.0.30 onwards related to performance_schema
This fix reduces performance overhead of the statement instrumentation,
in the performance_schema implementation.
Problem
=======
1)
The new g_telemetry global atomic pointer is not protected against false
sharing on the CPU cache line.
2)
The statement instrumentation makes unnecessary copies of MESSAGE_TEXT,
which is using 512 bytes, and is most of the time empty.
Fix
===
1)
Declared g_telemetry using a dedicated cache line, to avoid false sharing.
This helps because this atomic is expected to be "read only",
and will not change during the server lifetime except when installing
or uninstalling a telemetry component.
Keeping a shared copy in each CPU cache should reduce the atomic overhead.
2)
The diagnostics area has been fixed to keep track of the message text
length.
The performance schema instrumentation now only copies the message text
when it is not empty, saving overhead in memcpy().
The data layout in events_statements_current / history / history_long
has changed to improve data locality for other attributes,
and also reduce overhead in memcpy().
Change-Id: I6a80af3547e98eccbb1e39c806f603462b665cef
0 commit comments