Мониторинг физической против значения выделенной памяти
Доброго времени суток! Текущий блог я бы хотел посветить цифрам потребления оперативной памяти и немного рассказать о вариантах мониторинга и различиях в потреблении.

Натолкнул меня на эту мысль мой хороший коллега под ником М., у которого я так же обнаружил некорректные цифры потребления оперативной памяти. Да, они часто встречаются в видео и комментариях, где ребята тщетно пытаются выяснить у кого больше FPS и, в частности, показать работоспособность данной игры на конкретно выбранном компьютере. Но ровно как FPS, без показателей минимальных значений 0.1/1, времени кадра и максимального значение, это всего лишь среднее значение в данный момент, так и потребление озу, в варианте «физической», цифра, что не отражает реального потребления оперативной памяти всех процессов. Да да, у нас есть две цифры на выбор в программах и даже в диспетчере задач, в разделе «производительность» и вкладке «память», есть используемая (сжатая) и выделенная. Обратите внимание, что эти цифры отличаются, при том выделенная заметно больше. Сразу скажу, что в силу своего непрофессионализма данной области, блог будет иметь характер, с точки зрения простого пользователя.
Итак, в английском языке «выделенная память» в windows 10 называется commit charge (в диспетчере задач просто committed). Если интересует подробности данного термина и его характеристика, то вы теперь всегда можете узнать больше в интернете. Однако здесь, я попробую вкратце охарактеризовать простыми словами. Конечно этот параметр можно найти, к примеру в MSI Afterburner, сразу под строчкой Загрузка ОЗУ (RAM Usage) и в HWiNFO, части сенсоров, подраздела System: X System Product Name, где X название ваше материнской платы, а сама строчка Virual memory Committed и Virual memory Available, т.е. занятая и свободная виртуальная память (всё верно, виртуальная или выделенная память). Стоит внести ясность, что если у вас есть файл подкачки, то это значение будет просуммировано с объёмом вашей оперативной памяти.
Итак, к цифрам. Начнём с наиболее яркого примера – RDR2, где в моём бенчмарке указано 18 Гб потребления оперативной памяти. Чего не скажешь о моём коллеге М. (скриншот), где только 9,6 Гб, зато яркая строчка DDR4 – 32Gb (4000MHz).

Зачем там 32 Гб, если потребление не больше 10-ти? И можно подумать, что я специально излишне нагружаю оперативную память бразуером с 300 вкладками. Последнее опровергается просто – в конце видео (ниже под спойлером) продемонстрирован диспетчер задач, в том числе видно время работы ПК и вкладка памяти – используется (сжатая), которая соответствует 10,5 Гб и выделено уже 18Гб. Да, значение используемой память похоже на значение со скриншота товарища М. Выделенная больше физической всегда, и об этом дальше.
Стоит напомнить, что файл подкачки (ФП) служит для расширения оперативной памяти, т.е. используется при её нехватке. Система может отправлять неактивные или свёрнутые программы в ФП, так у меня как то оказалась Far Cry: New Dawn там. В моём случае 18 Гб превратятся 16 в оперативной и 2 Гб занято в ФП. Хотя нет, сейчас у меня 32Гб (2х16) и отключенный ФП, а значит всё в оперативной памяти. Проблем с этим нет вот уже многие годы. А это значит, если у тебя 16 Гб (или меньше), то отключать его не стоит, поскольку при неправильном мониторинге (выбранной загрузка озу или мониторинг физической памяти), в данной игре будет вылет с последующим сообщением о нехватке памяти, и удивлённым, вопрошающим лицом – «почему же при 10 Гб потребления ОЗУ в RDR2 у меня нехватка памяти?». Наконец перейдём к определению и всё что я нашёл о выделенной памяти и причинах, почему данное значение больше.
Как гласит сайт майкрософт, выделенная (так же виртуальная) – максимально доступная память, включающая все файлы подкачки, которую система может поддерживать. Если это значение достигает предела, система и процессы могут не получить выделенную память. Это состояние может вызвать зависание, сбой и другие неисправности.
Попросту это виртуальное адресное пространство частного процесса, часть которого может находится как в ОЗУ, так и файле подкачки. Так существуют и неиспользуемые, выделенные, области для будущих обращений программ. Поэтому это значение больше, чем физическая (используемая). Т.е. по сути, это место зарезервировано операционной системой под кэш, драйвера, программу и т.д. Не забывайте, что очистку кэша можно произвести и такой программой, как Empty tandbyList, прописав её в планировщик заданий. В итоге, когда запускаешь windows, то уже увидишь порядка 4 Гб в ОЗУ реально занятного пространства, а спустя, условно, часов 5 порядка 5-6 Гб. И совсем необязательно это строго область файла подкачки (пространство в HDD/SSD). Личное наблюдение в течении суток (и более при системе 32 и 16 Гб) показало, что у меня был занят в простое файл подкачки порядка 50 мегабайт, максимум 300. Сам файл подкачки «по выбору системы» и объём автоматически увеличивался, по мере необходимости. При фиксации 2Гб (наличии планок 8+8) вылетела ошибка нехватки, т.к. объём перевалил уже за 18Гб. Для меня наиболее ярким примером являются вышеупомянутая RDR2, а так же ARK, Tom Clancy’s The Division 2, Horizon Zero Dawn К последним играм, прогулявшись по youtube, я даже нашёл пару роликов, где кто-то всё же догадался добавить верные значения потребления ОЗУ. Не забывайте, что игра кэширует данные в оперативную память, и всего да 10 минут в игре можно потерять порядка 2Гб уже, легко. За 2 часа игры в ARK я терял 6Гб (к доступных 16 ОЗУ + файл подкачки), а начиналось всё с 14.
Приходим к выводу, что большинство роликов, хоть здесь, хоть на youtube, и конечно комментарии, связанные с величиной FPS (и всё?), а тем более потреблением ОЗУ, с красивыми цифрами, как у моего коллеги М., это видео, которые не несут большой ценности, элементарно из-за озу, просто вводят в заблуждение. Отслеживайте правильно, отмечая верные значения, если хотите показать действительную картину работу и оптимизацию на конкретно твоей конфигурации пк. Это будет хороший пример и приятное зрелище.
Грамотные и приятные комментарии по делу, критика, всегда приветствуется. Всем спасибо!
Sysadminium
База знаний системного администратора
Process Explorer и память
Process Explorer и память. В этом уроке я покажу вам как наблюдать за расходованием памяти используя сторонний инструмент “Process Explorer”.
Process Explorer и память
Process Explorer выводит намного больше информации о физической и виртуальной памяти чем диспетчер задач. Для того чтобы открыть информацию по памяти откройте меню View, выберите команду System Information и перейдите на вкладку Memory:
Графики
В открывшемся окне мы видим 2 графика:
Из этого следует, что файл подкачки у меня занимает примерно 1,4 GB.
Отображаемые показатели
Ниже графиков вы можете увидеть обширную информацию по используемой памяти. Все показатели разбиты на определённые блоки, что делает обзор несколько удобнее.
Commit Charge
В этом блоке можно увидеть информацию по выделенной физической памяти (оперативной + swap). В этом блоке все показатели указаны в килобайтах.
Уже по этому блоку можно судить о том, хватает ли системе памяти.
Phisical Memory
В этом блоке уже не учитывается файл подкачки, а только оперативная память. Точно так же все значения в килобайтах.
Kernel Memory
Здесь дана информация по выгружаемому и невыгружаемому пулу ядра.
Эти лимиты ограничены операционной системой, но по факту будет действовать физическое ограничение. Система просто не сможет выделить 16 TB памяти, так как у меня даже на диске такого объёма нет.
Paging
В этом блоке можно наблюдать процесс свопинга. То есть когда у вас не хватает памяти и данные сбрасываются в файл подкачки (swap). Здесь данные отображаются в виде дельты, то есть количество за определённый период, который равен периоду обновления программы.
Paging List
Этот блок разбирать пока не буду. Он будет описан в уроке посвящённом физическим страницам памяти. У физических страниц есть свои состояния и в этом блоке они описаны. В общем читайте дальше и все станет понятнее.
Commit charge что это
This forum has migrated to Microsoft Q&A. Visit Microsoft Q&A to post new questions.
Answered by:
Question
Answers
In short, my understanding is Virtual Memory is combined with Physical Memory and page files on disk. Committed Memory, also called committed virtual memory, is used or allocated Virtual Memory.
The amount of committed virtual memory for all the active processes is called the current commit charge. When a process commits a region of virtual memory, the operating system guarantees that it can maintain all the data the process stores in the memory either in physical memory or on disk. That means that a process can run up against another limit: the commit limit.
I suggest reading the following article, especially the «Committed Memory» section.
Pushing the Limits of Windows: Virtual Memory
http://blogs.technet.com/markrussinovich/archive/2008/11/17/3155406.aspx
Thanks.
This posting is provided «AS IS» with no warranties, and confers no rights.
All replies
Also you have to understand the process architecture ( not processor ) along with thread architecuture ( major ones are understanding process control block and thread control block.)
But i would like to simplify the concepts and try to give out my best.
windows operating system uses 2 major memory models
a) main memory model
b) virtual memroy model
virtual memroy is nothing but using the disk space to provide applicatoins a feel of using contiguous memory address space. windows OS has 4GB reserved for user mode and 4GB for kernel mode.
to simplify you need to understand major concepts like
page : A page is a ocntiguous block of address space / virtual memory they are divided into 4kbytes. So internally applications are divided into pages in a broader picture.
By said this there is a corresponding page table which is a datastructure which stores logical to physical address mappings ( virtual memory to physical memory )
So now commit charge is nothing but total amount of virtual address space and in other words you can think of commit charge as maximum pagefile usage.
when you open any application the commit charge increases and closed it decreases because its just the usage of the total pagefile.
some of the important issue which one might look with respect to commit charge is
a) commit charge keeps increasing but not decreasing even when applications are opened or closed.
b) commit charge increases and decreases with only some applications installed
at this point you need to check how the page file is configured.
is there any issue with the process / application which might not close the handles etc.
hope this info is useful.
Sainath IRP_MJ_CREATE
«Committed Memory – When an application touches a virtual memory page (reads/write/programmatically commits) the page becomes a committed page. It is now backed by a physical memory page. This will usually be a physical RAM page, but could eventually be a page in the page file on the hard disk, or it could be a page in a memory mapped file on the hard disk. The memory manager handles the translations from the virtual memory page to the physical page. A virtual page could be in located in physical RAM, while the page next to it could be on the hard drive in the page file.»
But is lower in comments David Solomon gives the corrections:
Committed Memory – «When an application touches a virtual memory page the page becomes a committed page. It is now backed by a physical memory page»
Not quite: a page becomes a «committed page» when an application commits virtual memory. At that time, the Memory Manager deducts from the system commit limit and charges it to the Commit Charge Total. If and when it is actually touched, then the memory manager backs it with a physical page (that part you had correctly).
Now I have completely got confused 🙂 What is commit memory? Just virtual memory? These two terms are equivalent? And «total commit memory» == «total virtual memory» of all app and OS which now in use? But by screenshot from my server it not so. (http://img38.imageshack.us/img38/3619/commitcharge2.gif)
What ideas? I will be glad to any explanations.
Commit charge что это
This forum has migrated to Microsoft Q&A. Visit Microsoft Q&A to post new questions.
Answered by:
Question
Answers
In short, my understanding is Virtual Memory is combined with Physical Memory and page files on disk. Committed Memory, also called committed virtual memory, is used or allocated Virtual Memory.
The amount of committed virtual memory for all the active processes is called the current commit charge. When a process commits a region of virtual memory, the operating system guarantees that it can maintain all the data the process stores in the memory either in physical memory or on disk. That means that a process can run up against another limit: the commit limit.
I suggest reading the following article, especially the «Committed Memory» section.
Pushing the Limits of Windows: Virtual Memory
http://blogs.technet.com/markrussinovich/archive/2008/11/17/3155406.aspx
Thanks.
This posting is provided «AS IS» with no warranties, and confers no rights.
All replies
Also you have to understand the process architecture ( not processor ) along with thread architecuture ( major ones are understanding process control block and thread control block.)
But i would like to simplify the concepts and try to give out my best.
windows operating system uses 2 major memory models
a) main memory model
b) virtual memroy model
virtual memroy is nothing but using the disk space to provide applicatoins a feel of using contiguous memory address space. windows OS has 4GB reserved for user mode and 4GB for kernel mode.
to simplify you need to understand major concepts like
page : A page is a ocntiguous block of address space / virtual memory they are divided into 4kbytes. So internally applications are divided into pages in a broader picture.
By said this there is a corresponding page table which is a datastructure which stores logical to physical address mappings ( virtual memory to physical memory )
So now commit charge is nothing but total amount of virtual address space and in other words you can think of commit charge as maximum pagefile usage.
when you open any application the commit charge increases and closed it decreases because its just the usage of the total pagefile.
some of the important issue which one might look with respect to commit charge is
a) commit charge keeps increasing but not decreasing even when applications are opened or closed.
b) commit charge increases and decreases with only some applications installed
at this point you need to check how the page file is configured.
is there any issue with the process / application which might not close the handles etc.
hope this info is useful.
Sainath IRP_MJ_CREATE
«Committed Memory – When an application touches a virtual memory page (reads/write/programmatically commits) the page becomes a committed page. It is now backed by a physical memory page. This will usually be a physical RAM page, but could eventually be a page in the page file on the hard disk, or it could be a page in a memory mapped file on the hard disk. The memory manager handles the translations from the virtual memory page to the physical page. A virtual page could be in located in physical RAM, while the page next to it could be on the hard drive in the page file.»
But is lower in comments David Solomon gives the corrections:
Committed Memory – «When an application touches a virtual memory page the page becomes a committed page. It is now backed by a physical memory page»
Not quite: a page becomes a «committed page» when an application commits virtual memory. At that time, the Memory Manager deducts from the system commit limit and charges it to the Commit Charge Total. If and when it is actually touched, then the memory manager backs it with a physical page (that part you had correctly).
Now I have completely got confused 🙂 What is commit memory? Just virtual memory? These two terms are equivalent? And «total commit memory» == «total virtual memory» of all app and OS which now in use? But by screenshot from my server it not so. (http://img38.imageshack.us/img38/3619/commitcharge2.gif)
What ideas? I will be glad to any explanations.
What is commit charge?
In computing, commit charge is a term used in Microsoft Windows operating systems to describe the total amount of virtual address space for which the backing store is the pagefile.
Can somebody say in simple terms what it means?
Why the term «commit charge»?
2 Answers 2
You seem to be laboring under the misunderstanding that the point of technical articles on Wikipedia is to inform rather than to show off how obscure one can possibly be. This sentence is a perfect example.
«Commit charge» is what microsoft calls the current amount of used virtual memory. That’s it. But if you said that, someone might understand what you’re talking about, which would be terrible.
The «backing store» is what someone who’s never kissed a girl might call a hard drive, or other non-volatile storage. «Pagefile» of course refers to memory pages, so in this case, we’re talking about memory pages that are stored on the hard drive (as opposed to in RAM, which would be actual rather than virtual memory.)
Contrary to what you might read in many articles, the commit charge is not a measurement of anything that physically exists. Not physical memory, the pagefile, or any combination of the two. It can be considered the sum total of the RAM and pagefile needed to store the private virtual address space allocated by all running processes, if they actually used all they allocate. Most applications allocate more than they actually use. Memory for program code, DLL’s etc. is not included in this total.
Windows keeps track of the commit charge to make sure that there is some place to store all of this potential data, just in case the running applications were to use all the space they have allocated. The commit limit is the size of RAM, minus some overhead, plus the size of the pagefile. Not all of RAM is available to the commit charge.
The important thing to remember about the commit charge is that it must always be below the commit limit. If it hits the limit bad things will happen, such as application or system failures. Since the commit charge doesn’t represent anything physical it is of little importance to performance







