Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

When I watched high-resolution videos on Youtube with Chrome, its process could take about 400 Mb of memory or even more and swap out other processes.

> and as long as Chrome doesn't lock the memory range, the OS will swap it to disk anyway

Swapping in/out is random access and is very slow (< 1 Mb/sec) compared to linear reading/writing unless you have SSD.



Swapping contiguous regions is sequential, and Windows will preemptively write non-locked regions to disk so it can instantly discard them when needed. You can force this behavior by dropping working sets, which has the effect of "converting" used RAM to cached pagefile.

Of course if you're actively using a program, it will swap out other processes, that's the whole idea.


It doesn't make sense to swap out other programs just to load video that will be immediately discarded after displaying. It makes more sense to have limited download and playback buffers and store most of video data on the disk.


When I watched high-resolution videos on Youtube with Chrome, its process could take about 400 Mb of memory or even more and swap out other processes.

I've noticed you've said this twice in this thread like it's a bad thing. This is exactly the behaviour I'd expect and want.

If I'm watching a video I'd want the system to do everything possible to make it as smooth as possible.




Consider applying for YC's Summer 2026 batch! Applications are open till May 4

Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: