Live data from Hacker News

Why is Windows so slow?

games.greggman.com

21–30 of 159 posts

Re: Why is Windows so slow?

#21
post #2

Someone posted the question on StackOverflow and it got closed as "not constructive". Is there a way to browse the "not constructive" questions on SO? They seem to be all the best ones.

http://data.stackexchange.com/

It's an online SQL tool for analyzing the stackoverflow data dump (last update was Sept 2011; they're quarterly http://blog.stackoverflow.com/category/cc-wiki-dump/). It's very cool, but curiously hard to find. There's a "[data-explorer]" tag at meta.stackoverflow: http://meta.stackoverflow.com/questions/tagged/data-explorer

The PostHistory table probably records why posts were closed.

Re: Why is Windows so slow?

#22
post #5
post #2

Someone posted the question on StackOverflow and it got closed as "not constructive". Is there a way to browse the "not constructive" questions on SO? They seem to be all the best ones.

Well, this article seems to be asking "why is the Windows file system so slow?" and generally complaining. A better name for the article might be "Windows FS performance sucks" or similarly polemical title. There are parts of Windows that are implemented just the same as Linux, and parts that are faster. Some parts are slower, notably the file system. But there's more to Windows than just the file system. So, I'd say…

Well that's the question isn't it? Is it just the filesystem, or is the speed of CL.EXE an issue too? What about the VS build system?

It sounds like you simply don't know enough about the issue to judge whether it's constructive.

Re: Why is Windows so slow?

#23
post #13

Hmm.. I've had an opposite experience on an atom netbook. Tried Windows Vista and Ubuntu on a netbook. The Windows netbook worked great while Ubuntu regularly would crash. Ubuntu on the netbook was unusable. Now probably I did something wrong? But just installed the latest version with default settings. Anyway I returned the netbook.

Were you running compiles on it??

Re: Why is Windows so slow?

#24

Wow, so if you want to test file system speeds, you do it by listing files - I know this just an example, but perhaps it has something to do with the speed of the terminal ? There are a plethora of disk benchmarking tools - I doubt that they consistently show 40x differences. Hooves -> horses, and all that.

Maybe I'm misunderstanding (or he's since changed his post), but:

    dir /s > c:\list.txt
is piping it into a file. Where does the speed of the terminal affect that (in any significant fashion)? I know what you're getting at - tar --verbose can slow things down for me by sometimes a factor of 2 (for huge tarballs), but I don't think it's an issue in this situation.

Re: Why is Windows so slow?

#25

Wow, so if you want to test file system speeds, you do it by listing files - I know this just an example, but perhaps it has something to do with the speed of the terminal ? There are a plethora of disk benchmarking tools - I doubt that they consistently show 40x differences. Hooves -> horses, and all that.

Huh? He redirected the output to a file, so terminal speed doesn't really factor in here.

Re: Why is Windows so slow?

#26
post #10

I don't know this poster, but I am pretty familiar with the problem he's encountering, as I am the person most responsible for the Chrome build for Linux. I (and others) have put a lot of effort into making the Linux Chrome build fast. Some examples are multiple new implementations of the build system ( http://neugierig.org/software/chromium/notes/2011/02/ninja.h... ), experimentation with the gold linker (e.g. measu…

When developing on Windows it pays significant dividends to manage your include files. There are a number of files provided as part of Visual Studio and/or the Windows SDK that bring in a tremendous amount of large other files.

Unlike with Linux it's quite difficult to perform piecemeal inclusion of system header files because of the years of accumulated dependencies that exist. If you want to use the OS APIs for opening files, or creating/using critical sections, or managing pipes, you will either find yourself forward declaring everything under the moon or including Windows.h which alone, even with symbols like VC_EXTRALEAN and WIN32_LEAN_AND_MEAN, will noticeably impact your build time.

DirectX header files are similarly massive too. Even header files that seem relatively benign (the Dinkumware STL file that MS uses, for example) end up bringing in a ton of code. Try this -- create a file that contains only:

    #include 
Preprocess it with GCC (g++ -E foo.cpp -o foo.i) and MSVC (cl -P foo.cpp) and compare the results -- the MSVC 2010 version is seven times the size of the GCC 4.6 (Ubuntu 11.10) version!

Re: Why is Windows so slow?

#27
post #14

Here is a link from the comments: NTFS Performance Hacks - http://oreilly.com/pub/a/windows/2005/02/08/NTFS_Hacks.html

Not sure about the other things, but this

The default cluster size on NTFS volumes is 4K, which is fine if your files are typically small and generally remain the same size. But if your files are generally much larger or tend to grow over time as applications modify them, try increasing the cluster size on your drives to 16K or even 32K to compensate. That will reduce the amount of space you are wasting on your drives and will allow files to open slightly faster.

is wrong. When you increase cluster size you will definitely not "reduce the amount of space you are wasting". 100B file will still occupy the whole 16KB ( so you will waste 15.9KB on it instead of 3.9KB with 4KB clusters.

Also I would be very careful with taking advice like that from an article which is 6 years old (before introduction of Win7 or XP SP3!)

Re: Why is Windows so slow?

#28
post #2

Someone posted the question on StackOverflow and it got closed as "not constructive". Is there a way to browse the "not constructive" questions on SO? They seem to be all the best ones.

closed questions are still there. Only the deleted ones are gone ( but accessible to those with more than 10k reputation)

Re: Why is Windows so slow?

#29
post #10

I don't know this poster, but I am pretty familiar with the problem he's encountering, as I am the person most responsible for the Chrome build for Linux. I (and others) have put a lot of effort into making the Linux Chrome build fast. Some examples are multiple new implementations of the build system ( http://neugierig.org/software/chromium/notes/2011/02/ninja.h... ), experimentation with the gold linker (e.g. measu…

Chrome on Linux is awesome. At some point in the past year I stopped having to use command line options to keep it in memory as it defaults to that. Brilliant and slick, I love it. Chrome's performance and syncing is the reason I was able to transition almost entirely over to Linux from Mac this year with very little workflow disruption.

[deleted]

Re: Why is Windows so slow?

#30
post #12

Earlier quoted context omitted.

Why should he run the ls command on ntfs rather then a native file system? In all it was a "windows vs linux" test and not a fileystem test. Testing the same filesystem wouldn't make sense here

Presumably to find out whether the difference lies with the filesystem or somewhere else? If Linux is still much faster, even with the same filesystem, you have eliminated one variable.

Doing some profiling and system/kernel level analysis would be much saner, imo. What's the sense in measuring how some non-native filesystem behaves? In the end you'll be benchmarking how good is fuse-ntfs vs. in-kernel-ext4 and figuring it's slower... I say, profile some code and see how much time is spent in filesystem calls.
Post reply on HN