Abnormal Memory usage (the reason was hugepages enabled)

After a recent update to Fedora 30, which I applied 18th of October, I noticed that the mouse freezes at times and in fact the whole system is unresponsive for a couple of seconds at a time (sometime longer and sometime shorter). Today I thought I’d investigate the issue and I’m seeing abnormal memory usage immediately after booting (see attached htop screenshot taken immediately after booting and loggin in).
This may have started earlier but it wasn’t as noticeable so I’m not sure what could have caused this and since how long the system is using this much memory…
I have tried booting with an earlier kernel (5.2.18) but this did not fix the situation.

Has anyone else encountered this?

The following packages were updated in that 18th of October update:
Packages Altered:
Install kernel-5.3.6-200.fc30.x86_64 @updates
Install kernel-core-5.3.6-200.fc30.x86_64 @updates
Install kernel-modules-5.3.6-200.fc30.x86_64 @updates
Install kernel-modules-extra-5.3.6-200.fc30.x86_64 @updates
Upgrade cups-filters-1.22.5-7.fc30.x86_64 @updates
Upgraded cups-filters-1.22.5-4.fc30.x86_64 @@System
Upgrade cups-filters-libs-1.22.5-7.fc30.x86_64 @updates
Upgraded cups-filters-libs-1.22.5-4.fc30.x86_64 @@System
Upgrade geolite2-city-20191008-1.fc30.noarch @updates
Upgraded geolite2-city-20190806-1.fc30.noarch @@System
Upgrade geolite2-country-20191008-1.fc30.noarch @updates
Upgraded geolite2-country-20190806-1.fc30.noarch @@System
Upgrade giflib-5.1.9-2.fc30.x86_64 @updates
Upgraded giflib-5.1.9-1.fc30.x86_64 @@System
Upgrade kernel-headers-5.3.6-200.fc30.x86_64 @updates
Upgraded kernel-headers-5.3.5-200.fc30.x86_64 @@System
Upgrade libtpms-0.7.0-0.20191008gitc26e8f7b08.fc30.x86_64 @updates
Upgraded libtpms-0.7.0-0.20190719gitd061d8065b.fc30.1.x86_64 @@System
Upgrade openjpeg2-2.3.1-3.fc30.x86_64 @updates
Upgraded openjpeg2-2.3.1-1.fc30.x86_64 @@System
Removed kernel-5.2.17-200.fc30.x86_64 @@System
Removed kernel-core-5.2.17-200.fc30.x86_64 @@System
Removed kernel-modules-5.2.17-200.fc30.x86_64 @@System
Removed kernel-modules-extra-5.2.17-200.fc30.x86_64 @@System

Note I’m running Fedora 30 on a Lenovo Thinkpad Yoga 4th gen with 16GB of memory and a 512GB NVME SSD.

Hi @sergong and welcome to Ask Fedora!

I’m not 100% percent sure if my experience is relevant to yours, please judge for yourself. I do experience exactly this:

once – every time after reboot, right after I login to my account.

I’m not 100% sure in it’s once per boot or once per login (i.e. if the freeze will reoccur after logging out and logging in again without a reboot). For me it happens for quite a long time – for sure since F29 and maybe since F28, I don’t remember.

I think (haven’t investigated properly though) that in my case it’s evolution-data-server syncing my calendar entries (quite a number of them) with my radicale server. As it doesn’t reoccur during normal computer usage I haven’t bothered to investigate it more thoroughly.

I can’t comment on excessive memory usage, I haven’t seen it on my system (though I have to recheck right after login). Does memory usage go down after some time, or does it stay the same afterwards?


Hi @nightromantic, thanks for your reply. Interesting but probably a different issue than the one I described. I’ve done some more digging and testing and I think I’ve found the cause of the ‘abnormal’ memory usage. I was using hugepages, configured following the advice on some article I read, to improve KVM performance for a Windows VM (sorry I don’t have a link)… However, it turns out that the those hugepages get used by other processes when the WIndows VM is not running. After I disabled the hugepages, memory usage is back to normal proportions and I am now using transparant huge pages (THP) instead, configured for madvise rather than enabled system-wide. A quick test with the Windows VM did not unearth a loss of performance so I may stick with that. I also checked that THP’s were indeed being assigned (grep AnonHugePages /proc/meminfo) which they were. I did read that THP apparently doesn’t work if you passthrough PCI hardware using VFIO, which I’m not doing, so I may be OK. Fingers crossed :slight_smile:


@sergong, just to confirm: so the freezes you’ve discribed were the result of memory exhaustion (100% used), which in turn was the result of using hugepages.

After you’ve disabled hugepages, the memory usage gone to normal and the freezes are gone, right?

If that’s the case (or when you’re sure it’s the case) I propose you mark your own answer as a solution to the thread, it can be useful to others with similar problem/question. Also it makes sence to particularise the topic name a bit:

Abnormal Memory usage (the reason was hugepages)

or something similar – again, so other people can judge at a glance if the question is relevant to their problem.

Hi @nightromantic, yes correct, the freezes I described were due to memory exhaustion causing excessive swapping, which in turn was caused by the hugepages.
After disabling this and enabling transparent hugepages with the madvise option, memory usage is back to normal and no more periodic freezes.

I was able to mark my own answer as the solution but I seem to be unable to find out to edit the title of the post.


1 Like

This topic was automatically closed 28 days after the last reply. New replies are no longer allowed.