←back to thread

Why is Windows so slow?

(games.greggman.com)
337 points kristianp | 1 comments | | HN request time: 0s | source
Show context
hristov ◴[] No.3368965[source]
Interestingly enough Joel Spolsky mentioned something related to the directory listing problem more than 10 years ago. See:

http://www.joelonsoftware.com/articles/fog0000000319.html

In Joel's opinion it is an algorithm problem. He thinks that there is an O(n^2) algorithm in there somewhere causing trouble. And since one does not notice the O(n^2) unless there are hundreds of files in a directory it has not been fixed.

I believe that is probably the problem with Windows in general. Perhaps there are a lot of bad algorithms hidden in the enormous and incredibly complex Windows code base and they are not getting fixed because Microsoft has not devoted resources to fixing them.

Linux on the other hand benefits from the "many eyes" phenomenon of open source and when anyone smart enough notices slowness in Linux they can simply look in the code and find and remove any obviously slow algorithms. I am not sure all open source software benefits from this but if any open source software does, it must certainly be Linux as it is one of the most widely used and discussed pieces of OS software.

Now this is total guesswork on my part but it seems the most logical conclusion. And by the way, I am dual booting Windows and Linux and keep noticing all kinds weird slowness in Windows. Windows keeps writing to disk all the time even though my 6 GB of RAM should be sufficient, while in Linux I barely hear the sound of the hard drive.

replies(4): >>3369011 #>>3369062 #>>3369098 #>>3369928 #
prewett ◴[] No.3369062[source]
Along the same line, I've never understood Windows' propensity to swap out the kernel. I might have tons of free memory and half my kernel is swapped out. In fact, I've never figured out how to get it not swapped out, no matter how much memory I put in.
replies(1): >>3369153 #
jstclair ◴[] No.3369153[source]
You could try this (from an elevated command-prompt), but the general consensus is that it has a small (if any) effect:

reg add "HKLM\System\CurrentControlSet\Control\Session Manager\Memory Management" -v DisablePagingExecutive -d 0x0 -t REG_DWORD -f

Disable it with: reg add "HKLM\System\CurrentControlSet\Control\Session Manager\Memory Management" -v DisablePagingExecutive -d 0x1 -t REG_DWORD -f

More discussion here: http://serverfault.com/questions/12150/does-the-disablepagin...

The easiest way (if you have enough memory) is just disable the paging file.

replies(1): >>3370381 #
1. gospelwut ◴[] No.3370381[source]
Since we're talking about optimization, if you're on a SSD you should disable prefetching--which is essentially a technique for older (read: shittier) computers.