Since upgrading my desktop computer (Ryzen 3600 CPU) to FreeBSD 13, I have been experiencing some issues with micro stutters. This was most noticeable in games, but also some when using Firefox. I first thought this had something to do with the video drivers (which somehow ended being a mess - I have an AMD GPU, but somehow got the Nvidia driver installed which was preventing xf86-video-amdgpu from running) but after clearing up all those issues, still had the problem. After dedicating some time this weekend to the issue, I eventually came across this post on the FreeBSD mailing lists:
The solution was to set
Apparently the default is "2"
This seems to be an issue that affects Ryzen CPU's, but I would be interested if it applicable to any similarly high thread-count CPU. My older Xeon E3-1230 v2 system did not encounter these issues.
After making this change, I was able to test a couple of the programs where I had been experiencing the issue. In those programs, the issue had made the experience rather unpleasant, and therefore unusable. After making this change, these programs ran as smoothly as I expected. As it was getting rather late last night, I wasn't able to test out everything that was having issues, but so far I am pleased with the improvement.
Putting this out there on the forums in case anyone else is experiencing the issue and is looking here for a fix.
The solution was to set
sysctl kern.sched.steal_thresh=1
Apparently the default is "2"
This seems to be an issue that affects Ryzen CPU's, but I would be interested if it applicable to any similarly high thread-count CPU. My older Xeon E3-1230 v2 system did not encounter these issues.
After making this change, I was able to test a couple of the programs where I had been experiencing the issue. In those programs, the issue had made the experience rather unpleasant, and therefore unusable. After making this change, these programs ran as smoothly as I expected. As it was getting rather late last night, I wasn't able to test out everything that was having issues, but so far I am pleased with the improvement.
Putting this out there on the forums in case anyone else is experiencing the issue and is looking here for a fix.