But, at least in my understanding, using the madvise option would not have a noticeable performance impact, and hugepages are still being used where needed.
Memory is complicated, shared resource, "would be terrible" is not the argument that one wants to make. I would trust the kernel to know what to do unless proven otherwise.
I guess one is testing with an ssd, then:
turn on swap with same size as ram,
swapiness=100 and
every other vm.* to default.
May fake occupied uncompressible memory by example:
head -c 8000000000 /dev/random > /tmp/my_ballast
Then measure by looking at pressure stall info while using the system. (Still not objective, but probably the best metric people came up with):
watch cat /proc/pressure/memory
and
watch cat /proc/pressure/io
Is there a regression in these values with transparent huge pages on?
Doesn't the kernel break up huge pages once memory pressure appears and swapping some parts of the huge page is needed? I know there are parameters controlling that, I would go for those first if there is a real problem here.
Until there is no memory pressure saving ram does not help with anything expect the user's ego - or as we always say unused ram is wasted ram.
The only metric that matters is the system performance under memory pressure. Is there a measurable regression in that?
On the other hand having larger page tables of smaller pages is a constant penalty every context switch. Don't kill your performance just for having some nice numbers in (h/b/ )top.
Doesn't the kernel break up huge pages once memory pressure appears and swapping some parts of the huge page is needed? I know there are parameters controlling that, I would go for those first if there is a real problem here.
Until there is no memory pressure saving ram does not help with anything expect the user's ego - or as we always say unused ram is wasted ram.
The only metric that matters is the system performance under memory pressure. Is there a measurable regression in that?
On the other hand having larger page tables of smaller pages is a constant penalty every context switch. Don't kill your performance just for having some nice numbers in (h/b/ )top.
Doesn't the kernel break up huge pages once memory pressure appears and swapping some parts of the huge page is needed? I know there are parameters controlling that, I would go for those first if there is a real problem here.
Until there is no memory pressure saving ram does not help with anything expect the user's ego - or as we always say unused ram is wasted ram.
The only metric that matters is the system performance under memory pressure. Is there a measurable regression in that?
On the other hand having larger page tables of smaller pages is a constant penalty every context switch. Don't kill your performance just for having some nice numbers in (h/b/ )top.
Okay, no worries then. Probably you hit a random, difficult-to-reproduce bug. The GPU driver's state depends on everything the GPU has done since the boot. If you can't reproduce it, just leave it.
You may check dmesg once in following days that there are no silent issues there, just to be sure.
Ok, but then add to your post the way you did set it up (the nvidia driver, the something -> VAAPI translation layer you use, etc), so people can understand which of these non-standard setups you use, then someone might be able to help.
(I don't use nvidia, so someone else will have to help with your exact case)
Don't mark this solved if the "solution" is to downgrade to LTS kernel.
This could be a bug in the amdgpu kernel driver. It is part of the linux kernel.
Maybe regression in 6.6.3 -> 6.6.4. Instead of switching to LTS kernel, does just downgrading the kernel to the previous version (6.6.3) solve the issue?
Upstream reporting usually expects you to do some work. Read the details there. Like to try it with the current drm-tip kernel to see if it is already solved upstream for future versions.
(I have never done this for AMD, but Intel has a nice guide for gathering information on kernel gpu driver issues.)
motherboard BIOS is likely involved here: make sure fastboot any similar that skips some hardware initialization disabled and that you have is no inappropriate PCIe power saving feature turned on
It might help you debugging this if you do a test with "soft" reboot - only rerunning the kernel initialization but not the BIOS - through kexec
GPU Hang issue on Laptop, Had to hard shutdown laptop
GPU hangs normally fully recover in about 1 second by the kernel resetting the GPU (screen freeze for max 1-2 s, then a couple frames of flickering), so there is something more to it here.
The package intel-gpu-tools has a lot of other useful tools too. Not saying it is related but I had some power-management related GPU hangs on 10th gen mobile partially solved by increasing the minimum frequency with # intel_gpu_frequency .
Whenever there is a segfault if you want to give the best shot for people to help do:
Open the coredump in gdb: $ coredumpctl debug mpd
If it asks Enable debuginfod for this session? (y or [n]) say y (this may use up to few 100 MB bandwidth to download debuginfo files)
Run (gdb) bt
If you don't know what is needed also run (gdb) thread apply all bt full
copy the beginning of the coredumpctl output, and the output of the (gdb) commands (redact any personal info, if it's too long put it to a pastebin service and share the link)
This will be likely a bug in mpd or in a dependency.
That thing only uses a small non-authenticated subset of the reddit API. Not sure if it will be affected but if yes, I guess I will have a good opportunity to use my Rust knowledge, and contribute patching it to access reddit by web scraping means. Yo-ho-ho-ho!
This year is crazy for the 3rd party software I'm using. Last month Nitter broke down for NSFW tweets. Before yesterday Streamlink and yt-dlp and everything else broke for Twitch. Now this.
Alt +sysrq +f. This instantly unfreezes the system, although interestingly, no processes (at least not that I can see from my desktop usage, I didn't bother to monitor processes) are killed.
OOM kills (sysrq or not) are logged to the kernel log:
[ 9477.131124] oom-kill:constraint=CONSTRAINT_NONE,nodemask(null),
cpuset=system.slice,mems_allowd=0,global_oom,
task_memcg=/user.slice/user-1000.slice/session1.scope,
task=tail,pid=12944,uid=1000
[ 9477.131136] Out of memory: Killed process 12944 (tail)
totalvm:8157860kB,anon-rss:6434048kB, file-rss:128kB, shmem-rss:0kB,
UID:1000 pgtables:16000kB oom_score_adj:0
Most importantly keep backups of your files. Test backups and make sure you can restore from them.
If you save passwords in your browser enable master/primary password which encrypts the browser's password storage. And most browsers support multiple profiles which can have their settings and extensions installed, eg. I have a separate profile for banking which is clean with no extensions installed.
Read the Arch wiki pages about configuring the network setup you use. Eg. for DNS with systemd-resolved consider enabling DNSSEC and using a DNS-over-TLS provider. These are not enabled by default.
For firewall you may pick your poison. I started with nftables default config, for me it's a reasonable starting point, although changing the config later is not that user friendly as in others.
If you are running network services/daemons (transmission, ipfs, ..., eg. I have a local libreddit and nitter instance), prefer to start them with a systemd .service which runs them under their own user. And check their configs that sockets that don't need to be internet facing are binded to localhost / 127.0.0.1 instead of 0.0.0.0
Wine running windows apps can expose the system to most of risks that the windows ecosystem has. Read Wine security guidelines and consider using sandboxing for Wine
Good, but something is missing from the fetch:
I loosely remember something like systemd setting the watchdog in case of the shutdown would hang. You should probably just ignore it.
fyi torvalds/linux git has always as default: https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/tree/mm/Kconfig#n819
Fedora rawhide uses madvise as default: https://src.fedoraproject.org/rpms/kernel/blob/rawhide/f/kernel-x86_64-fedora.config#_7764
I guess both have their reasons after all, maybe git blame these lines if someone wants to dig deeper why is it this way.
Not sure. Depends on the allocator configuration, which is allocator-specific. Here is an example on the impact: https://kobzol.github.io/rust/rustc/2023/10/21/make-rust-compiler-5percent-faster.html
Memory is complicated, shared resource, "would be terrible" is not the argument that one wants to make. I would trust the kernel to know what to do unless proven otherwise.
I guess one is testing with an ssd, then:
May fake occupied uncompressible memory by example:
head -c 8000000000 /dev/random > /tmp/my_ballastThen measure by looking at pressure stall info while using the system. (Still not objective, but probably the best metric people came up with):
watch cat /proc/pressure/memoryand
watch cat /proc/pressure/ioIs there a regression in these values with transparent huge pages on?
Doesn't the kernel break up huge pages once memory pressure appears and swapping some parts of the huge page is needed? I know there are parameters controlling that, I would go for those first if there is a real problem here.
Until there is no memory pressure saving ram does not help with anything expect the user's ego - or as we always say unused ram is wasted ram.
The only metric that matters is the system performance under memory pressure. Is there a measurable regression in that?
On the other hand having larger page tables of smaller pages is a constant penalty every context switch. Don't kill your performance just for having some nice numbers in (h/b/ )top.
Doesn't the kernel break up huge pages once memory pressure appears and swapping some parts of the huge page is needed? I know there are parameters controlling that, I would go for those first if there is a real problem here.
Until there is no memory pressure saving ram does not help with anything expect the user's ego - or as we always say unused ram is wasted ram.
The only metric that matters is the system performance under memory pressure. Is there a measurable regression in that?
On the other hand having larger page tables of smaller pages is a constant penalty every context switch. Don't kill your performance just for having some nice numbers in (h/b/ )top.
Doesn't the kernel break up huge pages once memory pressure appears and swapping some parts of the huge page is needed? I know there are parameters controlling that, I would go for those first if there is a real problem here.
Until there is no memory pressure saving ram does not help with anything expect the user's ego - or as we always say unused ram is wasted ram.
The only metric that matters is the system performance under memory pressure. Is there a measurable regression in that?
On the other hand having larger page tables of smaller pages is a constant penalty every context switch. Don't kill your performance just for having some nice numbers in (h/b/ )top.
Okay, no worries then. Probably you hit a random, difficult-to-reproduce bug. The GPU driver's state depends on everything the GPU has done since the boot. If you can't reproduce it, just leave it.
You may check dmesg once in following days that there are no silent issues there, just to be sure.
Ok, but then add to your post the way you did set it up (the nvidia driver, the something -> VAAPI translation layer you use, etc), so people can understand which of these non-standard setups you use, then someone might be able to help.
(I don't use nvidia, so someone else will have to help with your exact case)
VAAPI does not work with nvidia out of the box. Possible setups here: https://wiki.archlinux.org/title/Hardware_video_acceleration
Don't mark this solved if the "solution" is to downgrade to LTS kernel.
This could be a bug in the amdgpu kernel driver. It is part of the linux kernel.
Maybe regression in 6.6.3 -> 6.6.4. Instead of switching to LTS kernel, does just downgrading the kernel to the previous version (6.6.3) solve the issue?
Downstream (Arch Linux) reporting of kernel bugs go here: https://gitlab.archlinux.org/archlinux/packaging/packages/linux/-/issues
Upstream bug reporting for the graphics ("DRM" with kernel terms) kernel drivers of AMD go here: https://gitlab.freedesktop.org/drm/amd
Upstream reporting usually expects you to do some work. Read the details there. Like to try it with the current drm-tip kernel to see if it is already solved upstream for future versions.
(I have never done this for AMD, but Intel has a nice guide for gathering information on kernel gpu driver issues.)
I don't use nvidia, so only tips:
dmesg?fastbootany similar that skips some hardware initialization disabled and that you have is no inappropriate PCIe power saving feature turned onIt might help you debugging this if you do a test with "soft" reboot - only rerunning the kernel initialization but not the BIOS - through kexec
This should give a hint whether
You likely hit this one: https://gitlab.freedesktop.org/mesa/mesa/-/issues/9922
The patched mesa-23.2.1 arch package should be out for it soon.
UPDATE: Fixed with glibc 2.38-3 (2023-08-18)
You are correct, my phrasing was a bit ambiguous: so
posix_memalignfunction in the "malloc component".GPU hangs normally fully recover in about 1 second by the kernel resetting the GPU (screen freeze for max 1-2 s, then a couple frames of flickering), so there is something more to it here.
Maybe a malfunction in GuC firmware? You can try to disable it: https://wiki.archlinux.org/title/Intel_graphics#Enable_GuC_/_HuC_firmware_loading
Or try to use an older GuC version from
linux-firmware(or idk maybe with i915.guc_firmware_path ?)Also if ubuntu works you can compare all i915 parameters (https://wiki.archlinux.org/title/Intel_graphics#Module-based_options) and then force them
There is a bunch of other things that people tend to try: https://wiki.archlinux.org/title/Intel_graphics#Troubleshooting
Also search the official issues for kernel space Intel iGPU problems: https://gitlab.freedesktop.org/drm/intel/-/issues
The package intel-gpu-tools has a lot of other useful tools too. Not saying it is related but I had some power-management related GPU hangs on 10th gen mobile partially solved by increasing the minimum frequency with
# intel_gpu_frequency.Just a guess: could it be something iGPU related (?)
For the 'message' press 'c - continue without paging' and just scroll up at the end :)
(There is a way to run gdb in batch mode where it outputs to a file instead of a terminal but I can't recall the commands instantly)
Anyway looks like it crashed in the middle of printing an error message (https://github.com/MusicPlayerDaemon/MPD/blob/9c19368fc789fa7101110f73b6ffae8503ae326d/src/tag/Config.cxx#L47).
You was about to get an error message like: 'error parsing metadata item "???" '
So 2 things here:
Whenever there is a segfault if you want to give the best shot for people to help do:
$ coredumpctl debug mpdEnable debuginfod for this session? (y or [n])sayy(this may use up to few 100 MB bandwidth to download debuginfo files)(gdb) bt(gdb) thread apply all bt fullThis will be likely a bug in mpd or in a dependency.
I run my own libreddit instance on localhost.
That thing only uses a small non-authenticated subset of the reddit API. Not sure if it will be affected but if yes, I guess I will have a good opportunity to use my Rust knowledge, and contribute patching it to access reddit by web scraping means. Yo-ho-ho-ho!
This year is crazy for the 3rd party software I'm using. Last month Nitter broke down for NSFW tweets. Before yesterday Streamlink and yt-dlp and everything else broke for Twitch. Now this.
OOM kills (sysrq or not) are logged to the kernel log:
You can view it:
or
This sound like a job for:
See this for more:
Something might help here: https://wiki.archlinux.org/title/Power_management/Wakeup_triggers