6 ms·
I think it is possible. Typical web process memory size is about 30-500 Mb. Writing 500 Mb sequentially on a spinning HDD takes 5 to 10 seconds, and probably yo
by codedokode 4y ago
I think it is possible. Typical web process memory size is about 30-500 Mb. Writing 500 Mb sequentially on a spinning HDD takes 5 to 10 seconds, and probably you can discard a lot before saving (like JIT code, JS bytecode, CSS dependency trees, HTTP caches, localstorage etc.), and 500 Mb pages are rare.
For comparison, if you don't unload the page completely, and system gets into swapping then there will be random access pattern with speed about 400 Kb/s on a HDD. So it is faster to unload 500 Mb sequentially than swap out/in 5 Mb.
- Tostino 4y agoThis is why getting away from optimizing all our software around the disk being the major bottleneck will be a great thing for computing. So many optimizations become possible when your storage isn't in the hot path.
- andai 4y agoAre you really using a spinny disk? Most SSDs can do 500mb in a second or two.
- codedokode 4y agoI considered the worst case, obviously with SSD you can unload pages even faster if you are fine with reducing its lifetime.
- eric__cartman 4y agoIf you're developing a widely used web browser you have to take into account the people booting from a hard drive made in 2009.