Coffeehouse Thread

23 posts

Forum Read Only

This forum has been made read only by the site admins. No new threads or comments can be added.

When will certain Windows settings be set to more efficent settings by default?

Back to Forum: Coffeehouse
  • User profile image
    Shining Arcanine

    Since Windows XP SP2 does this for many security things, I'm going to refrain from talking about security for now but anyway, there are features in Windows that should be turned on or set to specific values by default, some of which are turned on by default in competiting operating systems.

    There is a registry entry called AlwaysUnloadDLL. It should be turned on by default because it makes Windows make more efficent use of memory resources. Currently from what I understand Windows waits perhaps an hour before unloading DLLs, which makes the DLLs do nothing excluding take up space which could be used by anything that is doing something important.

    Another is called DisablePagingExecutive. It should be turned on by default as it prevents drivers and the kernel from being swapped out to the page file, something that makes Windows run like a dog.

    Shut downs should be faster. I created a .reg file that I used to make my computer shutdown faster:

    [HKEY_CURRENT_USER\Control Panel\Desktop]
    "WaitToKillAppTimeout"="2000"
    "WaitToKillServiceTimeout"="2000"
    "AutoEndTasks"="1"
    [HKEY_LOCAL_MACHINE\System\CurrentControlSet\Control\]
    "WaitToKillAppTimeout"="2000"
    "WaitToKillServiceTimeout"="2000"

    It merely lowers some values from their default values of if I recall, 20000 and 4000. This drastically reduces shut down time and if the program doesn't respond in 2000 milliseconds, chances are it hung. These settings by default are too conservative and while mine might be a little too liberal, anything lower than the current defaults would be good.

    Does anyone know when the Windows team would at least consider changing these values by default?

  • User profile image
    warren

    Shining Arcanine wrote:
    There is a registry entry called AlwaysUnloadDLL. It should be turned on by default because it makes Windows make more efficent use of memory resources. Currently from what I understand Windows waits perhaps an hour before unloading DLLs, which makes the DLLs do nothing excluding take up space which could be used by anything that is doing something important.


    You're the victim of bum information.

    First of all, this registry entry only affects Windows Explorer plug-in DLL's.  That's why it's located under the "Explorer" registry key, and not somewhere else.

    Second, by default when a DLL is no longer used, it remains 'mapped', but not 'loaded' and will be paged out if it doesn't get used for a while, or if other applications need some memory right away.  It's a cacheing technique that will make subsequent usage of that DLL faster.

    Third, the only reason this key exists is to help developers of Explorer plug-ins -- having the plug-in's DLL fully unloaded as soon as it exits allows a new copy of the DLL to be used immediately.


    Shining Arcanine wrote:
    It merely lowers some values from their default values of if I recall, 20000 and 4000. This drastically reduces shut down time and if the program doesn't respond in 2000 milliseconds, chances are it hung. These settings by default are too conservative and while mine might be a little too liberal, anything lower than the current defaults would be good.


    So you'd rather that applications and services that take more than 2 seconds to close (Outlook, e.g.) be forcibly closed by the OS to facilitate faster shutdown time, jeopardising data coherency in the process?  What if one of those killed services was in the middle of writing out some important settings?

    The defaults are as they are for safety reasons.  I'm sure most people would rather have shutdown take a few extra seconds, than have lost data.

  • User profile image
    msemack

    There is a huge amount of misinformation floating around the web regarding this.  There aren't any magic tweaks that will make Windows faster.  Think about it...  If these tweaks really worked, why aren't they enabled by default?  Because they don't.

    Everyone and his brother has a "Windows Tweak" web site that tells you how to make Windows faster.  Unfortunately, none of these "tweaks" actually work.  Some people will insist that it makes their computer "feel" faster, but don't mistake this for hard data.  This is call the placebo effect.  Just because you saw it on the web doesn't mean it's true.

    Some popular performance-boosting myths include:

    - Shutting off the pagefile
    - Setting the pagefile to a fixed size
    - Putting the pagefile on a RAM Disk
    - Setting DisablePagingExecutive in the Registry
    - Setting LargeSystemCache
    - Disabling ACPI, or "IRQ Sharing"
    - Setting IoPageLockLimit
    - Setting IRQ8Priority
    - Setting SecondLevelDataCache
    - Setting AlwaysUnloadDLL




  • User profile image
    Karthik

    If you want performance boost, one thing that will definitely speed up your system is if you disabled all those graphical effects Wink

    On a serious note - all those transition effects and active desktop settings - those are the things that when disabled will speed up your system.

    Your information on DLLs is wrong - by default any DLL remains mapped but not loaded in memory, and gets removed after a while (I think time-out and/or resource request). The delay in unloading is for a purpose - to help applications save their settings without killing themselves pre-emptively.

    All those settings are there for a reason. By changing them, you risk losing data and affecting application performance. And then, when your applications crash more often you would be blaming Windows for it Smiley

    And btw - have you looked at Windows2003? The default settings are quite robust and well done, to the point of being really BSD-ish, if I may say so.

  • User profile image
    prog_dotnet

    by the way, you dont use the registry in .net but xml config files..So instead of dll hell you get the configuration hell.
    You have Machine Configuration Files,Application Configuration Files, Security Configuration Files, ASP.NET Configuration Files, and settings could potentially conflict.

  • User profile image
    dalangalma

    That's nowhere near as bad as having a giant database of random crap that constantly grows like the registry.

  • User profile image
    Shining Arcanine

    Warren wrote:
    So you'd rather that applications and services that take more than 2 seconds to close (Outlook, e.g.) be forcibly closed by the OS to facilitate faster shutdown time, jeopardising data coherency in the process?  What if one of those killed services was in the middle of writing out some important settings?

    The defaults are as they are for safety reasons.  I'm sure most people would rather have shutdown take a few extra seconds, than have lost data.


    I've noticed that until a program actually hangs, Windows detects it as hung and starts counting down before it shuts it down. It is extremely rare for a program to stall, at least on my computers, so I thought that it might be better if these settings were a little less conservative.

    msemack wrote:
    There is a huge amount of misinformation floating around the web regarding this.  There aren't any magic tweaks that will make Windows faster.  Think about it...  If these tweaks really worked, why aren't they enabled by default?  Because they don't.

    Everyone and his brother has a "Windows Tweak" web site that tells you how to make Windows faster.  Unfortunately, none of these "tweaks" actually work.  Some people will insist that it makes their computer "feel" faster, but don't mistake this for hard data.  This is call the placebo effect.  Just because you saw it on the web doesn't mean it's true.

    Some popular performance-boosting myths include:

    - Shutting off the pagefile
    - Setting the pagefile to a fixed size
    - Putting the pagefile on a RAM Disk
    - Setting DisablePagingExecutive in the Registry
    - Setting LargeSystemCache
    - Disabling ACPI, or "IRQ Sharing"
    - Setting IoPageLockLimit
    - Setting IRQ8Priority
    - Setting SecondLevelDataCache
    - Setting AlwaysUnloadDLL


    Some of those tweaks actually work in certain situations.

    I shut off the page file on my desktop as I have 1GB of RAM (maximum usage doesn't exceed 700MB) and wanted more space. Since nothing is ever swapped (Windows did swap somethings to the page file even through it didn't need to), so I gained 1.5GB of space and had less disk accesses. I don't plan on running out of RAM so I don't need the paging file.

    Setting the paging file to a fixed size does exactly what it is meant to do, it keeps Windows from adjusting the size.

    Setting DisablePaginingExcutive does what it says it does, prevents things that are vital to System Operation from being sent to the HD which makes Windows slow to a snail's pace.

    Now I see that setting AlwaysUnload DLL only affects Windows Explorer, however, it did save memory which is the reason why I enabled it so I'm leaving it on.

    As for the other ones you mentioned, I never bothered to set those because I either never heard of them, found out that they decreased system stability (e.g. LargeSystemCache) or realized that they were pointless (e.g. Putting the pagefile on a RAM Disk).

    dalangalma wrote:
    That's nowhere near as bad as having a giant database of random crap that constantly grows like the registry.


    Personally, I think that the registry is inefficent and is in need of an overhaul. One thing that might help is if Microsoft took the Yukon technology and replaced the current registry with it.

  • User profile image
    prog_dotnet

    Modern Operating Systems 2ed by Tanenbaum has a whole chapter on memory managment, and explains swapping and paging in detail.
    Highly recomended.
    http://www.prenhall.com/divisions/esm/app/author_tanenbaum/custom/mos2e/

  • User profile image
    Jeremy W

    prog_dotnet wrote:

    by the way, you dont use the registry in .net but xml config files..So instead of dll hell you get the configuration hell.
    You have Machine Configuration Files,Application Configuration Files, Security Configuration Files, ASP.NET Configuration Files, and settings could potentially conflict.



    Settings don't conflict in this environment, they cascade. The setting closest to the environment being accessed takes precedence Smiley

    So, if you had machine and system configs saying one thing, security settings saying something else, you could over-ride everything within a single ASP.NET page using @page directives if you wanted to. Or override using a web.config for your website (or roups of websites).

    It gets messy if you do need to find where a certain setting is (though Find > limited to extensions works wonders), but I actually like this system.

    The strength of .htaccess, but a lot more control and flexibility.

  • User profile image
    Shawn

    Shining Arcanine wrote:



    I shut off the page file on my desktop as I have 1GB of RAM (maximum usage doesn't exceed 700MB) and wanted more space. Since nothing is ever swapped (Windows did swap somethings to the page file even through it didn't need to), so I gained 1.5GB of space and had less disk accesses. I don't plan on running out of RAM so I don't need the paging file.

    Setting the paging file to a fixed size does exactly what it is meant to do, it keeps Windows from adjusting the size.

    Setting DisablePaginingExcutive does what it says it does, prevents things that are vital to System Operation from being sent to the HD which makes Windows slow to a snail's pace.

    Now I see that setting AlwaysUnload DLL only affects Windows Explorer, however, it did save memory which is the reason why I enabled it so I'm leaving it on.

    As for the other ones you mentioned, I never bothered to set those because I either never heard of them, found out that they decreased system stability (e.g. LargeSystemCache) or realized that they were pointless (e.g. Putting the pagefile on a RAM Disk).

     

    This would be a great topic for interview!  I've always though that whaterver program you're running determined whether or not it makes use of physical memory or virtual memory.  I have 1280mb of ddr in my main machine but Windows doesn't use more than half of it and "systeminfo" is always showing certain applications (RSS Bandit is a great example) using a lot of memory in the swapfile.  I've tried all those "recommended" tweaks and have never seen any of them make a difference.

    In my experience, setting a maximum swapfile size doesn't matter much either as Windows XP seems to use however much swap it wants.  I've had mine set as low as 256 for the min and max before but have seen it get to much larger sizes.  Honestly, I've can't see the difference between setting a certain size and letting Windows manage itself performance wise. 

    When Windows is managing it the swap file is certainly larger but I don't miss the disk space as I've still got over 70GB free.

    I'd love to hear some expert opinions from the Microsoft team on this - currently I'm an advocate of just letting Windows do what it wants to.

  • User profile image
    Jeremy W

    Shawn wrote:
    I'd love to hear some expert opinions from the Microsoft team on this - currently I'm an advocate of just letting Windows do what it wants to.


    I'm relatively sure the product team is proud of the work they've done in letting XP manage itself. Back in the days of 95/98 these hacks really were useful, especially when running certain games.

    By and large the reghack community still feels those days are around, even though there aren't any real benchmarks to show real improvements.

    XP is a fantastic piece of software which is incredibly good at managing it's own resources.

  • User profile image
    msemack

    I shut off the page file on my desktop as I have 1GB of RAM (maximum usage doesn't exceed 700MB) and wanted more space. Since nothing is ever swapped (Windows did swap somethings to the page file even through it didn't need to), so I gained 1.5GB of space and had less disk accesses. I don't plan on running out of RAM so I don't need the paging file.

    Windows DOES use the page file for a good reason.  It swaps out unused pages to disk so that you have more space for a disk cache.  Shutting off the page file DECREASES performance.

    Say you have something open for a long period of time, but you're not using it.  Those pages are just eating RAM.  Instead, they're swapped out of memory so that RAM could be claimed as a disk cache.

    Also, Windows "pre-swaps" things to disk, so that if your RAM does happen to get used up, there will be less overhead while things have to be swapped out.


    Setting the paging file to a fixed size does exactly what it is meant to do, it keeps Windows from adjusting the size.

    Which is a BAD IDEA.  If Windows wants to expand the pagefile, it is free to do so.  Setting it to a larger size does nothing but eat disk space.  Having to expand the pagefile is NOT a burden.  It doesn't "expand" the file then "Swap" the pages.  Not is pagfile fragmentation an issue (fragmentation actually IMPROVES performance).

    Setting DisablePaginingExcutive does what it says it does, prevents things that are vital to System Operation from being sent to the HD which makes Windows slow to a snail's pace.

    Except that it translates into about 7MB of stuff that would be paged.  7MB of memory isn't enough to matter.  Secondly, it's stuff that's so frequently accessed that it never get's paged out anyway. 

    The people who designed Windows know a lot more about memory management than you do. 

    If you want to read some information about the inner workings of Windows memory management, buy this book.

    http://www.amazon.com/exec/obidos/tg/detail/-/0735610215/102-0353415-8841717?v=glance

  • User profile image
    msemack

    Shining Arcanine wrote:


    Personally, I think that the registry is inefficent and is in need of an overhaul. One thing that might help is if Microsoft took the Yukon technology and replaced the current registry with it.



    And what do you base this on?  Have you done some benchmarks on the database engine that the Registry uses?  Do you have some hard and fast numbers?


  • User profile image
    warren

    Shining Arcanine wrote:

    I shut off the page file on my desktop as I have 1GB of RAM (maximum usage doesn't exceed 700MB) and wanted more space. Since nothing is ever swapped (Windows did swap somethings to the page file even through it didn't need to), so I gained 1.5GB of space and had less disk accesses. I don't plan on running out of RAM so I don't need the paging file.


    FYI, The term "swap" doesn't apply to modern Windows.  It's called paging.

    Anyhow, the point's already been made to you that disabling the page file prevents Windows from moving rarely-used code and data to your HDD, thus freeing up memory for a larger HDD filesystem cache.  Having some initialisation code sitting around in memory that will never be used again, is a waste of high-demand resources.  You can add all the memory you want, but don't kid yourself into thinking that you're using available resources efficiently.


    Shining Arcanine wrote:

    Setting the paging file to a fixed size does exactly what it is meant to do, it keeps Windows from adjusting the size.


    And what in the world is wrong with Windows increasing the pagefile size?  It only does this when your applications are demanding more memory than is available.  How often do you think this happens, anyhow?  I mean, seriously...  On a default Windows XP configuration, you have to use 250% of your total physical memory before your pagefile size will be expanded.


    Shining Arcanine wrote:

    Personally, I think that the registry is inefficent and is in need of an overhaul. One thing that might help is if Microsoft took the Yukon technology and replaced the current registry with it.


    What exactly is inefficient about the registry?

  • User profile image
    stevex

    It's not a myth that Windows slows down over time.  As much as I hate the "reinstall Windows" method of improving system performance, it does work.

    Why is it?

    I'd love to know if anyone at Microsoft has really studied an aging (and slow) Windows install to see why it's slow and what can be done about it.  Some theories:

    FS fragmentation.

    Too many applications installed that hook things.  For example, shell extensions - when I right-click on a file, sometimes it takes the system a while to bring up the context menu.  My theory is it has to go call every Explorer add-on DLL, which probably has to initialize which probably means loading icons and so on.

    The registry reaches some threshold at which it stops living mostly in the cache.

    There are a lot of applications that install global keyboard or mouse hooks.. This must make the whole system feel a wee bit slower.  Too many of these over time would add up.

    Anyone have any real information?  I'm just guessing, but I don't believe the slowdown-over-time phenomenon is just a myth..

  • User profile image
    vanlandw

    Hearing a MS employeee maybe give us some information on the page file myth would be very interesting to say the least.

    I have mine disabled.  I have 1.5GB of DDR ram and figured after reading a few sites that my machine really wouldn't require it.  Don't flame me!

    I'm going to start searching around a little bit and find more information on this.

  • User profile image
    Shining Arcanine

    msemack wrote:
    Shining Arcanine wrote:

    Personally, I think that the registry is inefficent and is in need of an overhaul. One thing that might help is if Microsoft took the Yukon technology and replaced the current registry with it.



    And what do you base this on?  Have you done some benchmarks on the database engine that the Registry uses?  Do you have some hard and fast numbers?




    I don't program applications for Windows (I do web development for a hobby) so I've never come in contact with the registry.

    At a glance, it is a huge indexless file. Considering that I tend to hear people complaining about how inefficent it is for a modern OS such as Windows, that Linux and Macintosh do not have registries and that there are programs out there that do not even touch the registry, I picked up that idea. 

    Considering this I shouldn't be commenting on the registry since I do not understand it so please disregard everything I have said regarding it.

  • User profile image
    spod

    Hi stevex

    i agree with you on this. The slowdown isn't a myth in my opinion...i've experienced it myself and solved it in the same way.

    I asked around internally and no-one had hard evidence that i talked to. The prime culprits seem to be pretty much as you say them. Specific points that came out:

    Spyware and adware are accelerants to this ( rather than root causes ). They hook pretty much everything etc so each one makes the system feel a bit slower, as you say.

    FS fragmentation seems to be a cause. I experienced this today on a system we were using for capacity planning. Certainly running a disk defrag utility might help.

    Shell extensions can be problematic, but the only time i've seen them really hurt is when the registry contains a pointer to an extension on a network share which is no longer available. Waiting for the share to fail resolution can really slow things down.

    People have mentioned the registry, but i don't think this should be a huge hit, especially in the single-user case. All reads and writes are O( log n ) so it can grow pretty big before hurting...

Conversation locked

This conversation has been locked by the site admins. No new comments can be made.