Skip to content

What to do with lots of ram?

I have 32 gigs of RAM and I rarely use more than 4. I would like to take advantage of that and so far i have enabled zram and makepkg in memory.

I would like to use anything-sync-daemon as well, but what folders should I put in ram and does it really do that much in terms of speed?

And do you have any recommendations what other things I could consider?

258 points243 comments
Open on Reddit
About this post
Posted
Archived
Score
258 · 99% up
Kind
Text
ID
pqlpdf

Author

3
posts
4
comments
0
media
View profile

248 comments

Run VSCode and slack on the same machine.

312 points

Honestly, language servers for rust or go are eating a lot of memory

73 points

clangd sometimes goes berzerk too, specially if there are some jumbo libraries involved.

14 points

Add python and js to the list, they're a very significant part of my resource usage on my machine

11 points
1 more reply

Alternatively, get forced to use Teams at work. Watch your RAM go byebye.

30 points

This is an underrated comment. I'm buying a new laptop because my (more than decent) current one with 8gb soldered ram is having difficulty handling Teams...

5 points

You should try Intellij & Android Studio.

4 points

I love intellij, set to 8GB max RAM, 4 projects open, 24GB used up most of the time, haven't had any prompt to increase the ram. 🙂

Though my projects are small

2 points

And tabnine! This damn IA plugin almost codes by itself, but can blow whatever amount of RAM you have.

4 points
unknown author

Deleted before we saved it.

1 points
unknown author45 hidden

Install Windows

203 points

Preload your most used applications?

Preloading is the action of putting and keeping target files into the RAM. The benefit is that preloaded applications start more quickly because reading from the RAM is always quicker than from the hard drive. However, part of your RAM will be dedicated to this task, but no more than if you kept the application open. Therefore preloading is best used with large and often-used applications like Firefox and LibreOffice.

147 points

Play heavily modded Cities Skylines.

144 points

I actually had to start a new save because 24 GB wasn't enough to load the map anymore and removing mods broke the save file.

That and how piss-poor the steam workshop is as a mod management tool.

7 points

I love this post.

75 points

Me too! It might not really be what OP was looking for but there's actually helpful information here!

10 points

Me too! Also have 32GB of RAM although I use Ubuntu with KDE so my idle RAM usage is a bit more than the OP (usually between 5 to 7GB) , but still wondering what to do with all the RAM nonetheless lol

2 points

Create an ad-hoc ramdisk, create a steam library on it, move a game to it, play.

EDIT: Obviously, move the game back to the old library when you're done, as the ramdisk will disappear on a reboot.

EDIT AGAIN: You can easily create a ramdisk with this function in your shell config(assuming bash)

function mkrd { sudo mount -t tmpfs -o size=${1}G ramdisk /mnt/ram; df -h /mnt/ram; }
export -f mkrd

So you can just run mkrd 10 to create a ten gigabyte ramdisk mounted on /mnt/ram.

55 points

This. I saw someone do that and it's insane. Load times? Basically nonexistent. I'll definitely do this when I buy a new PC with more RAM.

25 points

Why I wish I had 128GB of memory and not 32. Single 32gb sticks are crazy expensive though, no way I can justify buying that over a graphics card right now

11 points
1 more reply

The kernel does this for you transparently for recently/frequently accessed files, no manual step necessary

9 points

Man! You made my day! I have 64 Gb of RAM and I'm going to download fresh arch) I hope my CsGo shouldn't lagging at all from RAM)

4 points

I have a ZFS raid running and use around 24 GB for caching.

49 points
unknown author4 hidden

Deleted before we saved it.

1 points

I have 3 servers with zfs on root with multiple distros Ubuntu, arch and Debian

Do not run zfs on root. Such a headache. Especially if it is a remote server and you do not have an IPMI

1 points
1 more reply

Trust your system. Linux already knows that leaving RAM unused is a waste, and will use spare RAM to cache disk I/O as much as possible. I'd sooner look into tuning that caching behaviour than stuff like anything-sync, to be honest.

Also, I'd argue that if your issue is too much RAM, using zram/zswap is actually counter-productive. All that does is block off a bunch of your RAM to be used as (compressed) swap. You're going to get a penalty as pages are swapped in and out, and as they're compressed and decompressed. If RAM isn't a concern, I'd consider disabling swap entirely.

37 points

isnt the system smart enough to not use swap unless truely necessary? (I use swap for hibernation on my laptop)

7 points

It depends on the value of vm.swappiness. A value of 1 means "don't use swap unless truly necessary", it defaults to 60 which swaps a lot more aggressively.

6 points

too much RAM

There's no such thing as too much RAM.

Penalty as pages are swapped in and out

That's because of slow(er) I/O. Not relevant if your swap is actually RAM.

and as they're compressed and decompressed

Negligible.

3 points

That's because of slow(er) I/O. Not relevant if your swap is actually RAM.

There's still slower I/O, and that's not all of it. If you try to access a swapped page, the CPU has to throw a page fault, the kernel has to take over to swap the page back in, do the decompression step and then return control back to the program. You might call it negligible (and in practice it generally is) but if you have RAM to spare there's really no point to it, and you will get better performance not doing this.

It certainly wouldn't be negligible if you're dedicating too much memory to it as you'd be constantly swapping, and you'd mess up the kernel's ability to do efficient caching as well.

2 points

Run two electron apps at the same time

34 points

That works fine on 8GB. I can easily run Chromium, Spotify, Signal, Discord and only reach about 3GB ram usage total.

6 points
unknown author

Deleted before we saved it.

1 points
unknown author

Deleted before we saved it.

32 points

You're clearly delusional, 32 GB of RAM is not enough in this day and age. (jk)

You just need to run a bunch of "apps" from big name companies, each of which is basically shipping it's own copy of Chrome as part of some cross-platform "framework" like Electron or React Native

Then you should do Android development - run Android Studio, fetch some big project with a lot of modules, and have a Gradle daemon on - give them both 4096M of memory to play with. And then run an Android emulator for development and testing.

Then, you should run a bunch of containers - not sure which the heavy hitters are, I'm sure someone can help you with that.

Your system will be brought to it's knees with just the first step.

24 points

I have 64GB

32GB is for VMs (nextcloud, samba, proxy and some others) rest is filesystem caches, tmpfs for compiles and my vm-build script (pacstrap in tmpfs is fun)

i am thinking about getting two more 32gb ecc ram (total 128gb) and use them for a lv read cache

23 points

Host Minecraft server

19 points

This probably won’t put a dent in his RAM. Minecraft typically never uses more than 4GB of RAM in a single player world, and even with a small amount of players most likely won’t exceed 10GB. You’d need a very large amount of players to actually use up all 32GB of RAM.

16 points
4 more replies

I can easily host a minecraft server on my android phone, it handles pretty well 2-4 people on the serv:D

1 points

But yeah, plugins and mods require some aditional ram of course

My phone has 4gb ram. The serv was running on 2048mb ram.

1 points

You setup super optimized TUI application, and use only use 4gb. At least in my experience.

6 points

All I see on this post is a demonstration that no operating system should not have to use so many computer resources at idle.

5 points

Keyboard shortcuts

Move and act

jork
Next / previous post or comment
Enteroro
Open the post
f
Open the media viewer
s
Save
h
Hide (the toast has Undo)
Tab
Right after an action: the toast's Undo
x
Collapse the comment
v
Next layout: cards, compact, grid

Go to

/
Search
gthenh
Home
gthena
All
gthens
Subreddits
gthenl
Library
?
This list
Esc
Close a menu or this list

In the viewer

←or→
Previous / next file
↑or↓
Previous / next post
korj
Previous / next post
Space
Play / pause
m
Mute
z
Zoom
s
Save
o
Open the post (on its own page: back to it)
Esc
Close

Keys do nothing while you type in a box.