4 ms·
If you mean IOCP API that requires you to hold memory hostage for it, then no, NT sucks at it. The idea behind that API only works well if there is no switch be
by zzzcpan 8y ago
If you mean IOCP API that requires you to hold memory hostage for it, then no, NT sucks at it. The idea behind that API only works well if there is no switch between kernel space and user space. Otherwise you can emulate that awful API with threads on unix-like systems, it will perform the same.
Don't get me wrong though, caching/file serving in nginx was always very hacky. And blowing latency by blocking on filesystem and yet relying on vfs cache underneath is just one side effect of that.
- acdha 8y ago> If you mean IOCP API that requires you to hold memory hostage for it, then no, NT sucks at it. “hold memory hostage” really doesn't help make your point. It's inflammatory wording one step above spelling it Micro$oft and it makes it sound like you don't understand the engineering trade-offs which the Microsoft engineers made. It'd be much better if you explained _why_ you disagree with their choice and especially whether there are differences in the type of work which you've used it for which might explain that opinion.
- brian-armstrong 8y agoThe preferred nomenclature is "Micro$haft".
- acdha 8y agoI remember Slashdot in 1997, too, and would like to avoid repeating it. HN is poorer for substance-free jokes.
- smt88 8y agoI've found reddit to be substantive, sometimes on par with HN, but filled with jokes. Depending on the subreddit, you may be able to scratch your itch there.
- 2038AD 8y agoI've found most jokes on reddit seem to be attempts to get upvotes. Then again I'm not a fan of the upvote system generally. One thing I dislike is that downvoted comments are hidden. It equates disagreement with spam and discourages people from expressing genuine beliefs and reactions. I was going to make sure I haven't downvoted anything here but I can't find if there's a way to check.
- orf 8y agoI get the feeling you've had a bad experience with the API and that colours your opinion of the overall design of IOCP. It's really quite well thought out. Also in my experience it handles slightly more concurrent connections with a fair bit less CPU usage. There are some weird and not very nice parts + limitations to the API that makes it pretty hard to write cross-platform things with it, granted.
- johncolanduoni 8y agoThe memory is either held hostage in your buffer or the kernel’s. For that matter, if you’re making a blocking read/write call the memory is just as much a hostage.