I upgraded all our machines to 15.0-STABLE last week. Which works fine,
but I have noticed a very curious thing where the load averages on our
main database machine have doubled.
See graph here...
https://api.ticketswitch.com/shared/mysql-load-average-14-to-15.png
The only thing which has changed there is the operating system, and
the re-install of the packages to match. All the versions are
identical, config is identical, workload is identical.
The CPU usage hasn't changed, just the load averages. If I look on
that machine, which is really only running mysql, then the processes
in mysql are all in the state "Waiting for table metadata lock"
My hope is that FreeBSD 15 somehow calculates load averages
differently, and I simply never noticed 100 processes
waiting on locks before. But I also worry that maybe mysql does
its locking using some operating system primitive, which has changed,
and is causing this.
Any ideas anyone ?
On 03/02/2026 18:19, Pete Wright wrote:
which filesystem is your mysql data mounted on? my fist suspect would > be some performance change in the underlying filesystem, or how data is > cached in memory. systat may help shed light on this with maybe the > vmstat, iolat or iostat options.
Its on ZFS, and that was my first thought as well, as the version of
ZFS did change between 14 and 15, and all the non running threads
seem to be in either kread or uwait state. But after some reading
around it doesn't look as if mysql is using the filesystem for these
kind of locks.
do you have a similar system running 14.x available for comparison > purposes?
Unfortunately not :-(
However, your suggestion of other things to look at are super helpful.
I often forget we have all these other tools available ;) thanks!
-pete. [ off to re-read the man page for systat etc.. ]
You could post more information about the system.
Something which pops up in my mind is that it might be interesting if it
is a NUMA system.
Is it possible to get the output of "procstat -kk <pid-of-mysqld>" when
it is contending on these locks? That would show if it is waiting in the kernel or not.
| Sysop: | Amessyroom |
|---|---|
| Location: | Fayetteville, NC |
| Users: | 59 |
| Nodes: | 6 (0 / 6) |
| Uptime: | 03:57:05 |
| Calls: | 810 |
| Files: | 1,287 |
| D/L today: |
4 files (10,048K bytes) |
| Messages: | 203,128 |