linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: David Hildenbrand <david@redhat.com>
To: Oleksandr Natalenko <oleksandr@natalenko.name>,
	linux-kernel@vger.kernel.org
Cc: vincentdelor@free.fr, Andrew Morton <akpm@linux-foundation.org>,
	linux-mm@kvack.org
Subject: Re: Increase Default vm_max_map_count to Improve Compatibility with Modern Games
Date: Tue, 2 Apr 2024 11:48:16 +0200	[thread overview]
Message-ID: <1a91e772-4150-4d28-9c67-cb6d0478af79@redhat.com> (raw)
In-Reply-To: <13499186.uLZWGnKmhe@natalenko.name>

On 02.04.24 09:34, Oleksandr Natalenko wrote:
> Hello.
> 
> On středa 20. března 2024 22:05:34, CEST vincentdelor@free.fr wrote:
>> Hello,
>>
>> I am writing to highlight an issue impacting many Linux users, especially those who enjoy modern gaming. The current default setting of `vm_max_map_count` at 65530 has been linked to crashes or launch failures in several contemporary games.
>>
>> To address this, I have opened a detailed bug report (218616 – Increase Default vm_max_map_count to Improve Gaming Experience on Linux) available at: 218616 – Increase Default vm_max_map_count to Improve Gaming Experience on Linux (kernel.org) .
>>
>>
>> We have identified that several modern games such as Hogwarts Legacy, Star Citizen, and others experience crashes or fail to start on Linux due to the default `vm_max_map_count` being set to 65530. These issues can be mitigated by increasing the `vm_max_map_count` value to over 1048576, which has been confirmed to resolve the crashes without introducing additional bugs related to map handling.
>>
>> This issue affects a wide range of users and has been noted in distributions like Fedora and Pop!_OS, which have already adjusted this value to accommodate modern gaming requirements.
>>
>> For reference, here is the change for Fedora:
>> https://fedoraproject.org/wiki/Changes/IncreaseVmMaxMapCount
>>
>> Here is a list of games affected by this low value in vm_max_map_count as reported to Valve:
>>
>> THE FINALS
>> https://github.com/ValveSoftware/Proton/issues/7317#issuecomment-1974837850
>>
>> Hogwarts Legacy
>> https://github.com/ValveSoftware/Proton/issues/6510#issuecomment-1422781100
>>
>> DayZ
>> https://github.com/ValveSoftware/Proton/issues/3899#issuecomment-1304397069
>>
>> Counter-Strike 2
>> https://github.com/ValveSoftware/Proton/issues/2704#issuecomment-1705199788
>>
>>
>> **Steps to Reproduce:**
>> 1. Install Ubuntu or other distribution with `vm_max_map_count` being set to 65530 and attempt to run affected games such as Hogwarts Legacy or Star Citizen.
>> 2. Observe that the games crash or fail to start with the default `vm_max_map_count` setting.
>> 3. Modify `/etc/sysctl.conf` to include `vm.max_map_count=1048576` (or another sufficiently high value).
>> 4. Reboot the system and observe that the games now run without issue.
>>
>> **Expected Result:**
>> Games should run without crashing or failing to start due to `vm_max_map_count` limitations.
>>
>> **Actual Result:**
>> Games crash or fail to start unless `vm_max_map_count` is manually increased.
>>
>> **Suggested Fix:**
>> Increase the default `vm_max_map_count` value in Linux to a value greater than 1048576 to accommodate modern gaming software requirements.
>>
>> **Affected Games:**
>> - Hogwarts Legacy
>> - Star Citizen
>> - THE FINALS
>> - DayZ
>> - Counter-Strike 2
>> - Payday 2
>> - (and potentially others)
>>
>> **References:**
>> - Fedora's change documentation: https://fedoraproject.org/wiki/Changes/IncreaseVmMaxMapCount
>> - Various user reports and confirmations on gaming performance improvement with increased `vm_max_map_count`.
>>
>> I appreciate your time and consideration and welcome any feedback or suggestions on this matter.
>>
>> Best regards,
>>
>> Vincent DELOR
>>
>>
> 
> Adding more lists and people to Cc. This email was sent to LKML only meaning it is highly likely no one really saw it.
> 
> Andrew et al., what do you think?

Using a high VMA count usually implies that the application is doing 
something suboptimal. Having many VMAs can degrade performance of MM 
operations and result in memory waste.

Running into VMA limits usually implies that the application is not 
optimized and should handle things differently. Likely, the memory 
allocator is doing something "bad" (e.g., mmap()+munmap() instead of 
MADV_DONTNEED) and should be optimized.

I don't think we should be raising the limit for everybody out there.

-- 
Cheers,

David / dhildenb


  reply	other threads:[~2024-04-02  9:48 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
     [not found] <978241829.272633099.1710968583886.JavaMail.root@zimbra54-e10.priv.proxad.net>
2024-03-20 21:05 ` Increase Default vm_max_map_count to Improve Compatibility with Modern Games vincentdelor
2024-04-02  7:34   ` Oleksandr Natalenko
2024-04-02  9:48     ` David Hildenbrand [this message]
2024-04-12 17:18       ` Liam R. Howlett
2024-04-15  0:21         ` Pierre-Loup A. Griffais
2024-04-15 19:57           ` Liam R. Howlett
2024-04-17  1:04             ` Pierre-Loup A. Griffais

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=1a91e772-4150-4d28-9c67-cb6d0478af79@redhat.com \
    --to=david@redhat.com \
    --cc=akpm@linux-foundation.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-mm@kvack.org \
    --cc=oleksandr@natalenko.name \
    --cc=vincentdelor@free.fr \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).