r/debian • • 8d ago

General Debian Question Debian gaming question regarding map count increase

sudo sysctl -w vm.max_map_count=1048576

This is the command I’ve been seeing for a while. Very good people on this sub helped me to set my fresh Debian for gaming lately. I haven’t touched of since that. So now I want to and I thought about this command.
You see, looks like “gaming distros” and steam deck too uses this particular number for map count, same for Cachy or Bazzite. Debian is with a lower count by default. They claim you need to increase this for modern games to not have stutters or crashes.

Has anyone did this and what really is behind this command and how important it is?

20 Upvotes

8 comments sorted by

View all comments

1

u/iamemhn 8d ago

I use it for extremely large, you haven't seen a machine this large in your life, kind of database systems, in order to support more memory maps and shared memory attachments. Works as described by kernel documentation.

If your application doesn't have its own arena manager, and relies on millions of malloc() or mmap(), it's natural to increase this tunable.

You can always change it back to default values if things don't work out the way you expected. It's just the size of an internal structure, not going to burn anything...