logoalt Hacker News

nialv7 • today at 4:06 PM • 4 replies • view on HN

NT kernel in fact doesn't have good performance. process creation is especially slow (many orders of magnitude compared to linux) until very recently. IIRC windows' file system operations are also a lot slower than linux.


Replies

okanat • today at 6:02 PM

The performance of the process creation isn't a bug but an intended tradeoff. NT is slower because its process creation does more (checks for permissions, reloads binary, does relocation from scratch for DLLs, basically what fork + exec does but a bit more).

Many Unix systems didn't have threads but relied purely on multiprocessing. Threads on Linux is still a hack on top of the process API: clone.

On the other hand NT came with threads from the first release to do multitasking. It doesn't have fork because NT developers didn't want to add the hacky fork syscall for cloning the process / its memory area.

toast0 • today at 5:50 PM

My understanding is most of the windows file system suck is from the ever present synchronous anti-virus hooks on every read and write. If you disable that, it gets a lot better: I don't know how competitive it is, but it's decent. Unix/Linux file perf would suck if you forced synchronous anti-virus hooks as well.

Procees creation in NT is slow, but many applications can be designed to avoid it. Process creation is a bottleneck on Unix/Linux as well, the bottleneck is just usually not a big deal until you're trying to fork thousands of times per second... Then you have to do the same work you'd have done on NT to avoid forking.

dblohm7 • today at 4:58 PM

> process creation is especially slow

Again, that's not an issue with the NT kernel itself; most of that time is due to the Win32 layer which jumps through extraordinary hoops to support its app model, which essentially is an emulation of 16-bit Windows.

regularfry • today at 4:37 PM

Wasn't process creation being slow an explicit design choice? I seem to recall that it was a tradeoff for better in-process threads but I might well be misremembering.