Greetings!
Based on another thread I learned that NixOS has a very simple and elegant way to manage and increase Linux swapfile allocation. No need to partition manually. All that is needed are a few lines in configuration.nix
:
swapDevices = [{
device = "/swapfile";
size = 24 * 1024; # 24 GB
}];
Boom! Works.
I went looking for a comparable configuration option to increase the size of my AMD iGPU shared VRAM allocation. My shared VRAM by default is ~500MB according to $ radeontop -c
. I want to increase it to 2GB. I found these official NixOS resources on configuring AMD graphics settings:
I didn’t see anything in those docs about declaring VRAM memory.
Based on further reading of those docs, I gather the change I might need is to flip a switch in my UEFI BIOS, assuming my motherboard supports it. That could be my problem. I have a cheap Dell laptop and the BIOS isn’t very feature rich. I booted into my BIOS and took a good hard look at all the options and I didn’t see anything about VRAM settings. That could mean I am SOL.
I have a Dell Inspiron 15 3535. For what it is worth, here is the official owners manual for this laptop:
What can you people tell me?
Well, the owner’s manual leaves a pretty wide range of possibilities on the very relevant «how much total RAM do you have» issue.
However, the main question is why do you want to preallocate more memory for iGPU VRAM use. In principle, the driver allocates RAM for iGPU use as needed, up to 1/2 installed RAM by default. I have a Ryzen system where I set BIOS allocation low but the maximum high, and workloads needing lots of VRAM work fine there.
Do you have a specific thing you try to run that complains about low VRAM and should work with 2GiB VRAM?
I am not 100% sure. The 3D game I am running is Spirit City Lofi Sessions on Steam. The system requirements show graphics cards with a minimum of 2GB of VRAM. As I mentioned in my original thread, radeontop says I only have 500MB which is why I am surprised that it runs as well as it does considering it is an Unreal Engine 4 rendered game. When focused it only takes up about 30% of CPU resources. The RAM is another story. gotop tells me my system RAM is at 70% with 30% swap file. So it is heavy on RAM/swap consumption. I don’t have an FPS counter app, but I would say that it easily exceeds 30fps.
This is interesting. I suppose this might mean that the default setting is 500MB but scales up to a max of 8GB (or anywhere in between) as needed and seems to be operating as you describe. Is that a fair assessment, @7c6f434c?
This scaling description should be right according to the docs, and it matches my experience (except for the fact that I have increased the maximum)
radeontop says I only have 500MB
Does it say anything about GTT with the game loaded?
70% RAM + 30% swap does look like it consumes its promised 2GiB VRAM + 8GiB RAM
Bingo! radeontop (right hand side in screenshot below) shows GTT at: ~1.6 GiB out of a potential maximum of ~7.6 GiB. Make sense. Thanks for your insight, @7c6f434c.
1 Like