Entries:
Comments:
Posts:

Loading User Information from Channel 9

Something went wrong getting user information from Channel 9

Latest Achievement:

Loading User Information from MSDN

Something went wrong getting user information from MSDN

Visual Studio Achievements

Latest Achievement:

Loading Visual Studio Achievements

Something went wrong getting the Visual Studio Achievements

msemack

msemack msemack Embedded Systems Guy

Niner since 2004

I work for a company that develops high-reliability embeddded systems.
  • Landy Wang - Windows Memory Manager

    Beer28 wrote:

    Swap is always at 0 on my system monitor on FC4 with about a gig of ram. top reports it at 0 as well.

    The only time I remember seeing it at anything other than 0 was when I only had 256 MB of ram a long time ago. And on my server where I only have 512MB.



    Reporting a 0 doesn't necessarily mean your swap space is completely unused.

    Edit: http://sourcefrog.net/weblog/software/linux-kernel/swap.html
  • Landy Wang - Windows Memory Manager

    AndyC wrote:
    The best place is the only partition on a dedicated drive on a dedicated controller. Anything else is a compromise of some sort.


    I agree.  And that is fully compatible with what I said.  It's the most-used partition (the only one) of the least-used drive. Smiley

    AndyC wrote:
    And even that's assuming all the drives are similar speeds. Which may not be the case.


    This is true.  However, in a system with a sufficient amount of RAM, the pagefile will be hit so infrequently that this all becomes academic.
  • Landy Wang - Windows Memory Manager

    androidi wrote:
    I haven't tested whether there's a real perf benefit for this, but have always thought that it's optimal to have one drive/array for system and apps and second for pagefile and backups/infrequently accessed data.


    Assuming you have multiple drives, the best place for the pagefile is the middle of the most-used partition on the least-used drive.
  • Landy Wang - Windows Memory Manager

    Beer28 wrote:
    Why is swap space on windows used when you have enough physical ram to handle the processes? As opposed to it not being used until it's necessary on linux?


    There is no such thing as "swap space" in Windows (NT anyway).  Swapping and paging are not the same.  Don't confuse them.

    Windows "backs" pages of memory in the pagefile.  I should note that it doesn't back every memory page in the pagefile.  Things like EXE and DLL code are already backed in their on-disk files.

    Notice that I used the word "backs".  The pagefile is (loosely) mirroring the contents of RAM.  This means that when an app does need to get paged to disk, it's already in the pagefile.  The RAM can just be marked as free.

    If this wasn't done, when an app needed to be paged out, Windows would have to write the modified pages to disk right then and there.  This would increase the disk thrashing when a system gets maxed out.

    Yes Windows is using the pagefile.  Is it actually running programs from the pagefile?  Probably not.  Unfortunately, a lot of people don't understand this.

    I feel that Task Manager is to blame for some of this.  The way that it reports pagefile usage is misleading.  If you want to get an idea for how much of your pagefile is really being used, run Perfmon.

    FYI, You are incorrect when you say that Linux doesn't use the swap space with lots of physcial memory.  It does something very similar to what I have described above.
  • Landy Wang - Windows Memory Manager

    Beer28 wrote:
    Is there any major differences between the page file and swap?


    There is a difference between paging and swapping.  You can't use the two terms interchangeably.


    Beer28 wrote:
    Why not have a privilaged swap partition instead of a file?


    Pagefile accesses are largely limited by seek times.  This is precisely why Windows tries to put the pagefile in the middle of your partition.

    Remember, pagefile access is happening in parallel with other file activity.  The futher the disk heads have to move, the slower your system will run.

    If you put your pagefile on a dedicated partition (or use a swap partition like Linux does), then the disk heads have to go out of their way on each pagefile read/write.

    The optimal place for a pagefile is in the middle of the most heavily used parition of the hard drive.
  • Chris Gray - A super small file server

    Did you make that ICOP BSP yourself?  Or was that provided to you by ICOP?

    I'd like to see a movie on designing your own BSP.
  • Mike Hall - Windows CE and Windows Embedded Lab Tour

    Darn, I was hoping you'd have at least one PC/104 board there. Sad

    Although, I must say this is probably one of the best videos I've seen on Channel 9.  This relates more to my line of work.  I wish there were more videos about things like XPe/WinCE and driver development.  I would love to see a video on the new Windows Driver Framework.