Private bytes что это
Перейти к содержимому

Private bytes что это

Using Performance Monitor to Find a User-Mode Memory Leak

If you suspect there is a user-mode memory leak but are not sure which process is causing it, you can use Performance Monitor to measure the memory usage of individual processes.

Launch Performance Monitor. Add the following counters:

Process—>Private Bytes (for each process you want to examine)

Process—>Virtual Bytes (for each process you wish to examine)

Change the update time to 600 seconds to capture a graph of the leak over time. You might also want to log the data to a file for later examination.

The Private Bytes counter indicates the total amount of memory that a process has allocated, not including memory shared with other processes. The Virtual Bytes counter indicates the current size of the virtual address space that the process is using.

Some memory leaks appear in the data file as an increase in private bytes allocated. Other memory leaks show up as an increase in the virtual address space.

After you have determined which process is leaking memory, use the UMDH tool to determine the specific routine that is at fault. For details, see Using UMDH to Find User-Mode Memory Leaks.

Private bytes что это

Сообщения: 16
Благодарности: 0

Обьясните пожалуйста популярно, что означают эти счетчики производительности:Private bytes, working set, virtual bytes.
Насколько я знаю,
private bytes — количество байтов памяти, которое кушает сам исполняемый модуль без подгружаемых библиотек.
working set — количество байтов памяти, которое кушает сам исполняемый модуль плюс все подгружаемые библиотеки.
virtual bytes — не понимаю вообще, что это.

Так вот, о том, что я заблуждаюсь насчет первых двух, говорит следующее:
Запускаю мое приложение, которое юзает кучу библиотек. Значение счетчиков следующее:

Как такое может быть? Без библиотек — 15 мегабайт, а с библиотеками в два раза меньше, то есть 7.

Private bytes, Virtual bytes, Working set

In this article, we are going to understand private bytes, virtual bytes, and working sets.

Private Bytes :
As a result of completely paging out the process’s private memory footprint to swap, Private Bytes summarizes the amount of RAM allocated to the process (though not necessarily used).

Process executables use Private Bytes only to request memory. It doesn’t mean that they are actually using the memory they have requested. Private Bytes are considered “private” since they (usually) exclude memory-mapped files (e.g. shared DLLs). They do exclude some memory, however, but not all memory allocated by those files. Neither the executable nor the linked library is able to determine when private bytes change. In addition, private bytes are not just restricted to physical memory. They can also be paged to disk or listed in the standby page list (not in use yet, but not yet paged either).

Private Bytes are the actual bytes allocated by your app, including pagefile usage. in general, private bytes are the overall committed memory. while the working set refers to the memory that is backed by RAM.

Private Bytes [Committed Memory] = Private Bytes + Page File

Virtual Bytes :
Virtual Bytes are the total amount of virtual address space that a process occupies. Similar to the working set, this set includes memory-mapped files (shared DLLs), as well as data that has already been paged out and resides on a disk somewhere. When a system is under heavy load, the total virtual memory used by all processes is significantly greater than actually available memory.

virtual bytes=working set+private bytes+standby list.

Working Set :
It refers to the amount of physical memory (RAM) the process uses. The measurement is less accurate since it also includes memory-mapped files and other resources, unlike private bytes. In recent years, Task Manager’s “Mem Usage” also reports the same value that has caused endless amounts of confusion. The Working Set runs on physical memory. However, the standby page list does not appear in the Working Set as it is still in memory, so when you minimize an application, the “Mem Usage” might suddenly drop.

It includes non-paged Private Bytes as well as memory-mapped files;

Under any process, By default Task Manager displays the Working Set:

and Process Explorer shows all Private Bytes, Working Set, and Virtual Bytes.

Добавить комментарий

Ваш адрес email не будет опубликован. Обязательные поля помечены *