3 ms·
So `fork` is still expensive?
by netheril96 11y ago
So `fork` is still expensive?
- ygra 11y agoI think I read somewhere else that they use a better implementation here. Cygwin and SUA being user-mode pieces were limited to a slow fork, but in kernel mode they can emulate things properly.
- viraptor 11y agoDoes the fork performance really matter these days anymore? I mean comparing from one side to the speed of loading the app itself, fork is usually super cheap; on the other comparing to per-process async event handling, it's so slow pretty much nobody uses it this way for network apps anymore. What's the use case for a fast fork today?
- ulber 11y agoOne example: The HyPer in-memory database from TUM uses fork to provide fast snapshots for running OLAP queries on fresh data. [1]: http://hyper-db.de http://hyper-db.de
- poooogles 11y agoRedis uses fork to save to disk.
- viraptor 11y agoDoes fork on windows actually block parent for a long time, or does it only delay the child? I thought it was the latter, which shouldn't affect Redis. (but I may be wrong)
- jibsen 11y agoI don't know if it is due to various fork implementations being slow on Windows, but programs that spawn a lot of subprocesses like build tools can be really slow [1]. I would love to see some numbers for those from Bash on Windows. [1]: https://gist.github.com/jibsen/7ebeddde3bc2bfd421b96ae53a824ad9 https://gist.github.com/jibsen/7ebeddde3bc2bfd421b96ae53a824...
- baq 11y agonote that they say 'no documented way'.