why swap at all?
Quoted 10 lines · Buddy Lumpkin
Quoted 8 lines
Quoted 4 lines
3) once physical memory is full, file system I/O will only benefit from reads that incur a minor fault. All other file system operations are bound by the rate you can reclaim pages from physical memory.
No, typically we can reclaim memory very quickly and the operations are bound by the speed of the block device.
Quoted 9 lines
So if all physical memory is full with either pagecache or anonymous memory, where are you going to put these operations that are bound by the speed of the block device?
You have to evict pages at the same rate your reading them in or writing to the filesystem else you have nowhere to put them. This means that the rate you can access the filesystem is governed by the rate you can evict pages from memory.
... and the speed of the block device. The minimum of the two actually. Usually we can reclaim memory *much* faster than the block device can fill it. Didn't you read what I had said?
Quoted 7 lines
Couple that with the fact that there are many pte's pointing at the same physical page (shared page) in many cases where many processes are running on the system. Because all of the references to that page must be removed before the page can be evicted, there are some absolute limitations in the rate that pages can be evicted from memory as the number of processes running on the system and the total amount of memory increases.
This is still many orders of magnitude faster than filling the page from disk, and you typically don't reclaim much of mapped memory anyway.
We are sort of spamming lkml now so let's get this finished up.
If you want to talk about memory management basics, there should be some more helpful lists.
Quoted 11 lines
Quoted 10 lines
Couple that with the fact that there are many pte's pointing at the same physical page (shared page) in many cases where many processes
are running
on the system. Because all of the references to that page must be removed before the page can be evicted, there are some absolute limitations in the
rate that pages can be evicted from memory as the number of processes running on the system and the total amount of memory increases.
Quoted 2 lines
This is still many orders of magnitude faster than filling the page from disk, and you typically don't reclaim much of mapped memory anyway.
This discussion went broke-minded again. Your still picturing that single IDE hard drive in your workstation and im talking about big iron, large databases, etc.. where the total amount of aggregate disk I/O is completely limited by the rate you can evict pages from the pagecache.
Picture 6 to 7 fibre channel cards with over 70% utilization during peak usage times connected to a large EMC storage array with 64GB of non-volatile cache.
--Buddy
Quoted 19 lines · Buddy Lumpkin
Quoted 14 lines
Quoted 11 lines
Couple that with the fact that there are many pte's pointing at the same physical page (shared page) in many cases where many processes
are running
on the system. Because all of the references to that page must be removed before the page can be evicted, there are some absolute limitations in the rate that pages can be evicted from memory as the number of processes running on the system and the total amount of memory increases.Quoted 4 lines
This is still many orders of magnitude faster than filling the page from disk, and you typically don't reclaim much of mapped memory anyway.
Quoted 6 lines
This discussion went broke-minded again. Your still picturing that single IDE hard drive in your workstation and im talking about big iron, large databases, etc.. where the total amount of aggregate disk I/O is completely limited by the rate you can evict pages from the pagecache.
The eviction speed should not be a limitation, unless the machine is ill-configured. Some pages aren't dirty, and can be dropped instantly. That is way faster than any storage solution.
Other pages have to be written out (to swap, or to some file because it is a pending write.) This is not a problem, because io out is as fast as io in. If you have big iron with a superfast array - sure, your io comes in at tremendous speed. But swap and other writes go out at the same tremendous speed too. So no problem.
Now if you have a big-iron machine with filesystems on a fast array and swap on a single slow disk then you're in trouble. But that is a bad setup, not a kernel problem.
Helge Hafting