Le Thu, Mar 02, 2023 at 10:26:55AM +0100, Marc Espie a écrit : > Every few days, my desktop at home suddenly slows down. Looking at top, > I can see that literally everything is being forced into swap (I have 16G > of memory, when the problem starts, I usually have roughly 5-7G of memory > used, so very far below the limit, and I can see it drain into swap, > until there's 100K of memory used and everything else in swap). > > I haven't tinkered with bufcachepercent. > > At that point the machine is completely frozen, and I have no option besides > materially stopping it. > > If I catch it before that, I can try to reboot it to avoid fsck. > > Same kind of workload I use at home and at work: lots of chrome with images, > lots of image/video displays with mpv, lots of youtube, and also a game > that wants webgl (elvenar) which doesn't work on firefox at all. > > The big difference is that my home box is an amd with a radeon TURKS adapter > (r300 I think ?) > > I suspect something in the memory allocator of dri wants memory with dma > constraints, and somehow, the pagedaemon decides to put everything into swap. > > I've talked a bit to kettenis@, and followed a red herring through to > instrumenting the memory allocation routines that this radeon does NOT > abuse (namely alloc_pages and friends: allocates a grant total of one single > page). I will try to look at the ttm stuff next, probably. > > Since this takes usually a day or three to trigger, I don't know when this > started exactly, but this has been going on for at least a few months. > > Just in case somebody has a bright idea, or is experiencing similar issues.
I'm having a totally similar issue on my old optiplex radeondrm @work w/ 8Gb RAM (sorry no dmesg for now), running top -SH in a term i see pagedaemon going berserk before things slow down to a halt. Sometimes it recovers after a minute or too, sometimes i give up and powercycle. Happens most of the days and sometimes several times a day. Been happening for 1 year maybe. Discussed it a bit with claudio@ who told me it was somewhat already known, about having a 'special region for the first 4Gb of RAM' that apparently goes low on available free mem and advised talking to mpi@ :). I know this doesnt help, but if i have some precise guidance i can try to extract info from the box by breaking into ddb, i should have serial somewhere. Landry