Должен ли я отключить файл страницы, если у моего компьютера много ОЗУ?

Оглавление:

Должен ли я отключить файл страницы, если у моего компьютера много ОЗУ?
Должен ли я отключить файл страницы, если у моего компьютера много ОЗУ?

Видео: Должен ли я отключить файл страницы, если у моего компьютера много ОЗУ?

Видео: Должен ли я отключить файл страницы, если у моего компьютера много ОЗУ?
Видео: Как создать свою сборку Windows 10 - YouTube 2024, Апрель
Anonim
Если у вас есть компьютер с огромным объемом оперативной памяти, можете ли вы получить какие-либо выгоды от отключения файла страницы или просто оставить достаточно одного? Сегодняшние вопросы и ответы SuperUser обсуждают эту тему, чтобы помочь удовлетворить любопытство читателя.
Если у вас есть компьютер с огромным объемом оперативной памяти, можете ли вы получить какие-либо выгоды от отключения файла страницы или просто оставить достаточно одного? Сегодняшние вопросы и ответы SuperUser обсуждают эту тему, чтобы помочь удовлетворить любопытство читателя.

Сегодняшняя сессия вопросов и ответов приходит к нам благодаря SuperUser - подразделению Stack Exchange, основанной на сообществах сайтам Q & A.

Фото предоставлено Collin Anderson (Flickr).

Вопрос

Считыватель SuperUser user1306322 хочет знать, есть ли какие-либо преимущества для отключения файла страницы, если на компьютере пользователя много оперативной памяти:

Imagine that I have tons of RAM, say 64 GB, for example. That is a lot, even for gaming computers. Now the default location of a page file in Windows is on the main operating system drive (be it HDD or SSD), which is faster in general but still not as fast as RAM.

Something tells me that disabling the page file on the hard-drive or creating a virtual RAM drive and letting the page file be there could make Windows move all its virtual memory to RAM and increase the system’s performance. But I am not very knowledgeable in that area, so that might not be true at all.

I tried both, but I could not analyze the results to reach a definite conclusion with my knowledge level in memory-related matters. Would this work? If not, then why?

Будет ли пользователь1306322 получать какие-либо выгоды от отключения файла страницы?

Ответ

Ответчик SuperUser Дэвид Шварц отвечает за нас:

No matter how much RAM you have, you want the system to be able to use it efficiently. Not having a page file at all forces the operating system to use RAM inefficiently for two reasons:

  • First, it cannot make pages discardable, even if they have not been accessed or modified in a very long time, which forces the disk cache to be smaller.
  • Second, it has to reserve physical RAM to back allocations that are very unlikely to ever require it (for example, a private, modifiable file mapping), leading to a case where you can have plenty of free physical RAM and yet allocations are refused to avoid over-committing.

Consider, for example, if a program makes a writable, private memory mapping of a 4 GB file. The operating system has to reserve 4 GB of RAM for this mapping because the program could conceivably modify every byte and there is no place but RAM to store it. So from the start, 4 GB of RAM is basically wasted (it can be used to cache clean disk pages, but that is about it).

You need to have a page file if you want to get the most out of your RAM, even if it is never used. It acts as an insurance policy that allows the operating system to actually use the RAM it has, rather than having to reserve it for possibilities that are extraordinarily unlikely.

The people who designed your operating system’s behavior are not fools. Having a page file gives the operating system more choices, and it will not make bad ones.

There is no point in trying to put a page file in RAM. And if you have lots of RAM, the page file is very unlikely to be used (it just needs to be there), so it does not particularly matter how fast the device it is on is.

Не забудьте проверить живую дискуссию по теме по ссылке ниже!

Есть что добавить к объяснению? Отключить звук в комментариях. Хотите узнать больше ответов от других пользователей Windows? Посмотрите здесь полную дискуссионную тему.

Рекомендуемые: