4 ms·
If the content is ephemeral then it doesn't make sense to keep it on disk, and as long as Chrome doesn't lock the memory range, the OS will swap it to disk anyw
by jarfil 7y ago
If the content is ephemeral then it doesn't make sense to keep it on disk, and as long as Chrome doesn't lock the memory range, the OS will swap it to disk anyway if it needs the RAM for something else.
- codedokode 7y agoWhen 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.
- nl 7y agoWhen 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.
- jarfil 7y agoSwapping 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.
- codedokode 7y agoIt 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.