using task manager to monitor memory

This is a discussion on using task manager to monitor memory within the Tech Board forums, part of the Community Boards category; Hello everyone, Just two terminology questions which I have not found answer from MSDN. I am using Windows Server 2003. ...

  1. #1
    Registered User
    Join Date
    May 2006
    Posts
    1,579

    using task manager to monitor memory

    Hello everyone,


    Just two terminology questions which I have not found answer from MSDN. I am using Windows Server 2003.

    1. Page File (PF) Curve

    I think Page File is system page swap file (persistent storage to store page-out pages by a page stealer). Is that correct?

    If yes, I do not know why this parameter is so important and displayed in central together with CPU surve. I think physical memory consumed and available is more important to analyze performance, right?

    How do you use the page file parameter to analyze performance and how it impacts performance in your experience?

    2. What are the differences between System Cache and Kernel memory?


    thanks in advance,
    George

  2. #2
    C++まいる!Cをこわせ! Elysia's Avatar
    Join Date
    Oct 2007
    Posts
    22,537
    Quote Originally Posted by George2 View Post
    1. Page File (PF) Curve

    I think Page File is system page swap file (persistent storage to store page-out pages by a page stealer). Is that correct?
    Yes, that's correct.

    If yes, I do not know why this parameter is so important and displayed in central together with CPU surve. I think physical memory consumed and available is more important to analyze performance, right?
    No, since the more data goes into the page file, the slower your system will become.

    How do you use the page file parameter to analyze performance and how it impacts performance in your experience?
    Remember that the page file resides on the hard disk and therefore any data that is read/written to it will be 100x slower than from memory, so there's a real bottleneck there.

    2. What are the differences between System Cache and Kernel memory?
    A cache is where Windows stores common info for fast access. But the Kernel Memory is the memory used by Window's kernel and any drivers and applications that are running inside kernel mode. Typically, this has a maximum size on Windows, so it can't grow forever.
    Quote Originally Posted by Adak View Post
    io.h certainly IS included in some modern compilers. It is no longer part of the standard for C, but it is nevertheless, included in the very latest Pelles C versions.
    Quote Originally Posted by Salem View Post
    You mean it's included as a crutch to help ancient programmers limp along without them having to relearn too much.

    Outside of your DOS world, your header file is meaningless.

  3. #3
    Registered User
    Join Date
    May 2006
    Posts
    1,579
    Thanks Elysia,


    Great reply! Two more comments,

    1.

    Quote Originally Posted by Elysia View Post

    No, since the more data goes into the page file, the slower your system will become.
    I want to confirm two things,

    - In your experience, the larger page file, the slower the system performance, right?

    - I think PF is used to store pages which are swapped out. But I am not sure whether Windows will keep duplicate pages both in physical memory and in PF? Or keep pages either in physical memory or in PF, but not both? :-)

    2.

    Quote Originally Posted by Elysia View Post
    A cache is where Windows stores common info for fast access. But the Kernel Memory is the memory used by Window's kernel and any drivers and applications that are running inside kernel mode. Typically, this has a maximum size on Windows, so it can't grow forever.
    From your description, I can not see any differences between System Cache and Kernel Memory? They are all system internal memory. Could you provide more information or some some specific samples what types of information are stored in System Cache, and what types of information are stored in Kernel Memory please?


    regards,
    George

  4. #4
    C++まいる!Cをこわせ! Elysia's Avatar
    Join Date
    Oct 2007
    Posts
    22,537
    Quote Originally Posted by George2 View Post
    I want to confirm two things,

    - In your experience, the larger page file, the slower the system performance, right?
    Not necessarily. From my experience, the page file grows to about the size of physical memory used. But when things stop fitting into memory, then yes, things become slower.
    Want a good example? Try opening a memory intensive application. Then go start a game or something. Close the game and switch to your memory intensive application.
    Chances are, it will take a long time tor respond while Windows pages all the memory it used back into memory from the page file.

    - I think PF is used to store pages which are swapped out. But I am not sure whether Windows will keep duplicate pages both in physical memory and in PF? Or keep pages either in physical memory or in PF, but not both? :-)
    I don't know the specific workings of the page file, but I know it will keep pages that are pages out of physical memory.

    From your description, I can not see any differences between System Cache and Kernel Memory? They are all system internal memory. Could you provide more information or some some specific samples what types of information are stored in System Cache, and what types of information are stored in Kernel Memory please?
    Cache can be application code and data, for example. If you start an application for the first time, typically it takes a long time to start. When you close and start it again, it loads much faster because Windows has cached information the application used.

    Kernel Memory is where the internals of the OS is stored. For example, it's the memory your drivers are using, I believe. I'm not a kernel hacker or driver writer, so my knowledge about the kernel is somewhat limited.
    Quote Originally Posted by Adak View Post
    io.h certainly IS included in some modern compilers. It is no longer part of the standard for C, but it is nevertheless, included in the very latest Pelles C versions.
    Quote Originally Posted by Salem View Post
    You mean it's included as a crutch to help ancient programmers limp along without them having to relearn too much.

    Outside of your DOS world, your header file is meaningless.

  5. #5
    Registered User
    Join Date
    May 2006
    Posts
    1,579
    Thanks Elysia,


    Two more comments,

    1.

    Quote Originally Posted by Elysia View Post
    Not necessarily. From my experience, the page file grows to about the size of physical memory used. But when things stop fitting into memory, then yes, things become slower.
    What do you mean "stop fitting into memory"?

    2.

    Quote Originally Posted by Elysia View Post
    Cache can be application code and data, for example. If you start an application for the first time, typically it takes a long time to start. When you close and start it again, it loads much faster because Windows has cached information the application used.

    Kernel Memory is where the internals of the OS is stored. For example, it's the memory your drivers are using, I believe. I'm not a kernel hacker or driver writer, so my knowledge about the kernel is somewhat limited.
    I think you mean System Cache is used to cache some application related materials, and Kernel Memory is used to cache some kernel internal objects, right?

    Then from this point of view, what is the difference between normal physical memory (exclude kernel memory) and system cache? Besides the part of physical memory used for kernel memory, what are stored in system cache and what are stored as normal non system cache and non-kernel memory memory?


    regards,
    George

  6. #6
    C++まいる!Cをこわせ! Elysia's Avatar
    Join Date
    Oct 2007
    Posts
    22,537
    Quote Originally Posted by George2 View Post
    What do you mean "stop fitting into memory"?
    When you don't have enough physical memory left. The data you are trying to place in the physical memory won't fit because it's too big to fit into the little amount you have left.

    I think you mean System Cache is used to cache some application related materials, and Kernel Memory is used to cache some kernel internal objects, right?

    Then from this point of view, what is the difference between normal physical memory (exclude kernel memory) and system cache? Besides the part of physical memory used for kernel memory, what are stored in system cache and what are stored as normal non system cache and non-kernel memory memory?
    No, that's not correct.
    System Cache is a cache but Kernel Memory is NOT a cache. It's memory used by the low-level workings of the operating system.
    And System Cache does not just cache application related materials, it can cache other things. I just gave an example.
    Quote Originally Posted by Adak View Post
    io.h certainly IS included in some modern compilers. It is no longer part of the standard for C, but it is nevertheless, included in the very latest Pelles C versions.
    Quote Originally Posted by Salem View Post
    You mean it's included as a crutch to help ancient programmers limp along without them having to relearn too much.

    Outside of your DOS world, your header file is meaningless.

  7. #7
    Registered User
    Join Date
    May 2006
    Posts
    1,579
    Thanks Elysia,


    1.

    Quote Originally Posted by Elysia View Post
    When you don't have enough physical memory left. The data you are trying to place in the physical memory won't fit because it's too big to fit into the little amount you have left.
    Begin to understand your points. So, you mean when the system begins page steal to swap in needed pages and swap out un-needed pages by the replacement policy?

    2.

    Quote Originally Posted by Elysia View Post
    No, that's not correct.
    System Cache is a cache but Kernel Memory is NOT a cache. It's memory used by the low-level workings of the operating system.
    And System Cache does not just cache application related materials, it can cache other things. I just gave an example.
    The term "Cache" could have many meanings, for example, system L2/L3 cache are called cache -- cache in this context means something physically different from physical memory (DRAM).

    So, I am confused about what do you mean Cache, "System Cache is a cache but Kernel Memory is NOT a cache"? Do you mean something physically different from physical memory (DRAM) or something functional different from memory? :-)


    regards,
    George

  8. #8
    C++まいる!Cをこわせ! Elysia's Avatar
    Join Date
    Oct 2007
    Posts
    22,537
    Quote Originally Posted by George2 View Post
    Begin to understand your points. So, you mean when the system begins page steal to swap in needed pages and swap out un-needed pages by the replacement policy?
    You could put it that way, yes.

    The term "Cache" could have many meanings, for example, system L2/L3 cache are called cache -- cache in this context means something physically different from physical memory (DRAM).
    No, it does not. Cache means that it's used to store temporary data used by programs so the processor can access it quickly.

    So, I am confused about what do you mean Cache, "System Cache is a cache but Kernel Memory is NOT a cache"? Do you mean something physically different from physical memory (DRAM) or something functional different from memory? :-)
    Kernel Memory is working memory for the kernel! It is not a cache because it does not store data for quick access, it is like typical RAM - where everything that resides in the kernel space store their information.

    Perhaps you should actually read what cache is.
    Quote Originally Posted by Adak View Post
    io.h certainly IS included in some modern compilers. It is no longer part of the standard for C, but it is nevertheless, included in the very latest Pelles C versions.
    Quote Originally Posted by Salem View Post
    You mean it's included as a crutch to help ancient programmers limp along without them having to relearn too much.

    Outside of your DOS world, your header file is meaningless.

  9. #9
    Registered User
    Join Date
    May 2006
    Posts
    1,579
    Thanks Elysia,


    1.

    Quote Originally Posted by Elysia View Post
    Not necessarily. From my experience, the page file grows to about the size of physical memory used. But when things stop fitting into memory, then yes, things become slower.
    I think it is not easy to evaluate performance from the number of FP. I mean no precise rule. We can just roughly evaluate that if PF is large, there may be frequent I/O for swap-in/swap-out pages, which will degrade performance, right?

    Another question, will Windows shrink the size of PF? :-)

    2.

    Quote Originally Posted by Elysia View Post
    No, it does not. Cache means that it's used to store temporary data used by programs so the processor can access it quickly.


    Kernel Memory is working memory for the kernel! It is not a cache because it does not store data for quick access, it is like typical RAM - where everything that resides in the kernel space store their information.

    Perhaps you should actually read what cache is.
    Sorry that I do not make myself understood. I know what cache is. :-)

    CPU L2/L3 is acting as a cache between CPU and RAM, RAM is acting as cache between disk and L2/L3.

    My question is, physical memory stores information of part of (or all) the virtual memory of a process (shared library by a process, private code by a process, private data of a process, shared data of a process), System cache has a different name, and should stores something different, what are the specific information which is stored in System cache compared with the above mentioned normal physical memory.


    regards,
    George

  10. #10
    C++まいる!Cをこわせ! Elysia's Avatar
    Join Date
    Oct 2007
    Posts
    22,537
    Quote Originally Posted by George2 View Post
    I think it is not easy to evaluate performance from the number of FP. I mean no precise rule. We can just roughly evaluate that if PF is large, there may be frequent I/O for swap-in/swap-out pages, which will degrade performance, right?
    Yes, it will degrade performance if there's a lot of swapping pages.

    Another question, will Windows shrink the size of PF? :-)
    Yes, when the physical memory use decreases, the page file will decrease, as well. Or rather, the page file size in use. The page file will expand and shrink depending on the need.

    Sorry that I do not make myself understood. I know what cache is. :-)

    CPU L2/L3 is acting as a cache between CPU and RAM, RAM is acting as cache between disk and L2/L3.

    My question is, physical memory stores information of part of (or all) the virtual memory of a process (shared library by a process, private code by a process, private data of a process, shared data of a process), System cache has a different name, and should stores something different, what are the specific information which is stored in System cache compared with the above mentioned normal physical memory.
    As I mentioned, the cache stores information which is frequently used. The same goes for cpu cache.
    Information is removed when it gets old and is not used to make place for new information.
    The physical memory or the ram simply stores all the data applications are using. It's the big, general set of memory used for holding all sorts of information. It's not limited to specific information. Cache on the other hand caches frequently used information so as to speed up requests which require this information. So frequently used information is stored in the System Cache.
    Quote Originally Posted by Adak View Post
    io.h certainly IS included in some modern compilers. It is no longer part of the standard for C, but it is nevertheless, included in the very latest Pelles C versions.
    Quote Originally Posted by Salem View Post
    You mean it's included as a crutch to help ancient programmers limp along without them having to relearn too much.

    Outside of your DOS world, your header file is meaningless.

  11. #11
    Registered User
    Join Date
    May 2006
    Posts
    1,579
    Thanks Elysia,


    I have performed some self-study as well. Here is what I found from help system of task manager (press F1). I am using Windows Server 2003.

    --------------------
    The System Cache shows the current physical memory used to map pages of open files.
    --------------------

    What do you understand what the help says "map pages of open files"? Does it only mean page map file or covers more information to cache?

    Quote Originally Posted by Elysia View Post

    As I mentioned, the cache stores information which is frequently used. The same goes for cpu cache.
    Information is removed when it gets old and is not used to make place for new information.
    The physical memory or the ram simply stores all the data applications are using. It's the big, general set of memory used for holding all sorts of information. It's not limited to specific information. Cache on the other hand caches frequently used information so as to speed up requests which require this information. So frequently used information is stored in the System Cache.

    regards,
    George

  12. #12
    C++まいる!Cをこわせ! Elysia's Avatar
    Join Date
    Oct 2007
    Posts
    22,537
    It means it tries to map frequently used pages by open files, whatever they may contain. This means, in theory, that regardless if the application's memory is paged to disk or not, frequently used pages will stay paged in the system cache.
    Quote Originally Posted by Adak View Post
    io.h certainly IS included in some modern compilers. It is no longer part of the standard for C, but it is nevertheless, included in the very latest Pelles C versions.
    Quote Originally Posted by Salem View Post
    You mean it's included as a crutch to help ancient programmers limp along without them having to relearn too much.

    Outside of your DOS world, your header file is meaningless.

  13. #13
    Registered User
    Join Date
    May 2006
    Posts
    1,579
    Hi Elysia,


    Here is an interesting article I want to share with you that from the article it seems the PF value means physical RAM + paging file, PF == committed memory, not only the swapped out paging file. :-)

    http://articles.techrepublic.com.com...1-5071997.html

    Do you agree? Any comments? Looking like the term PF is very confusing. :-)

    Here is the part I mentioned,

    --------------------
    Since you know that at this point the operating system is making 208 MB of physical memory available to running programs and that the Total is 243 MB, you can come up with a rough estimate of the actual size of the page file by subtracting the Total Commit Charge from the Available Physical Memory. In this case, you end up with 35 MB.
    --------------------

    Quote Originally Posted by Elysia View Post
    It means it tries to map frequently used pages by open files, whatever they may contain. This means, in theory, that regardless if the application's memory is paged to disk or not, frequently used pages will stay paged in the system cache.

    regards,
    George

Popular pages Recent additions subscribe to a feed

Similar Threads

  1. Task Manager: Applications vs Processes
    By Shwick in forum Windows Programming
    Replies: 3
    Last Post: 08-14-2008, 06:47 AM
  2. hide from task manager
    By koyboy in forum Windows Programming
    Replies: 6
    Last Post: 05-27-2008, 04:00 PM
  3. Task Manager technic
    By NoFearXD in forum Windows Programming
    Replies: 10
    Last Post: 05-26-2007, 10:09 AM
  4. Replies: 5
    Last Post: 04-17-2003, 07:07 AM
  5. Scheduling Algo
    By BigDaddyDrew in forum C++ Programming
    Replies: 41
    Last Post: 03-08-2003, 10:00 AM

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21