Current Max Swap size? Performance issues
With all of the latest VM, again the question is asked... Best way to set up swap now..
For 2 GIG memory...
Channel 0 is RAID 1 SCSI
Channel 2 is RAID 1+0 SCSI
Hardware Raid
Shoudl it be?
2 GIG swap partition (Is this still the limit?)
Dual 2 GIG swaps on seperate channels?
Dual 2 GIG swap files on same channel?
(Assuming that the channel is different than the channel using the bulk of I/O)
Signature · 9 lines
"Catch the Magic of Linux..." -------------------------------------------------------- Michael Peddemors - Senior Consultant LinuxAdministration - Internet Services NetworkServices - Programming - Security Wizard IT Services http://www.wizard.ca Linux Support Specialist - http://www.linuxmagic.com -------------------------------------------------------- (604)589-0037 Beautiful British Columbia, Canada
Quoted 11 lines · Michael Peddemors
With all of the latest VM, again the question is asked... Best way to set up swap now..
For 2 GIG memory...
Channel 0 is RAID 1 SCSI
Channel 2 is RAID 1+0 SCSI
Hardware RaidShoudl it be?
2 GIG swap partition (Is this still the limit?)
Yes, still the limit. It turns out that this is not an on-disk format limit, but rather an in-memory structure limit, in case you cared. For non-x86 platforms, there is a different limit.
Quoted 4 lines
Dual 2 GIG swaps on seperate channels?
Dual 2 GIG swap files on same channel?
(Assuming that the channel is different than the channel using the bulk of I/O)
Well, if you have the hardware for it, obviously separate channels will be better, as long as you don't get a lot of I/O contention. If you put them on the same channel, but different disks, you still will get some speedup if the swaps are equal priority. If they are sharing the same disk, make sure you have different priorities for the swaps, so that one gets filled before the other, or you will get a LOT of seeking going on.
Cheers, Andreas
--
Andreas Dilger
http://sourceforge.net/projects/ext2resize/
http://www-mddsp.enel.ucalgary.ca/People/adilger/
Quoted 9 lines · Andreas Dilger
Quoted 8 lines · Michael Peddemors
With all of the latest VM, again the question is asked... Best way to set up swap now..
For 2 GIG memory...
Channel 0 is RAID 1 SCSI
Channel 2 is RAID 1+0 SCSI
Hardware Raid
Quoted 7 lines
Quoted 3 lines
Shoudl it be?
2 GIG swap partition (Is this still the limit?)
Yes, still the limit. It turns out that this is not an on-disk format limit, but rather an in-memory structure limit, in case you cared. For non-x86 platforms, there is a different limit.
Where? The limit should be about 64GB or so on x86. If it isn't it should be just a couple of lines to change it. Or is the limit the vmalloc of the swap_map?
I skimmed the code a while ago but I haven't had the time to patch mkswap and actually try it with something larger.
Eric
Quoted 10 lines · Eric W. Biederman
Quoted 5 lines · Andreas Dilger
Quoted 1 line
2 GIG swap partition (Is this still the limit?)
Yes, still the limit. It turns out that this is not an on-disk format limit, but rather an in-memory structure limit, in case you cared. For non-x86 platforms, there is a different limit.
Where? The limit should be about 64GB or so on x86. If it isn't it should be just a couple of lines to change it. Or is the limit the vmalloc of the
swap_map?
In my mm/swapfile.c code, I added comments about this, when I was adding support for LABELs in swapfiles. The new swapfile limits say:
/* The new swap format has a page count and a list of page
* numbers which overlap bad blocks on disk. We are limited
* to 2^32 pages by the on-disk format (info.last_page and
* page numbers in badpages are both unsigned ints, 16TiB for
* 4kiB pages). We are also limited by SWP_ENTRY() which
* varies by architecture (64GiB for ia32).
*/
maxpages = SWP_OFFSET(SWP_ENTRY(0,~0UL)) - 1;
and include/asm-i386/pgtable.h has:
#define SWP_TYPE(x) (((x).val >> 1) & 0x3f)
#define SWP_OFFSET(x) ((x).val >> 8)
#define SWP_ENTRY(type, offset) ((swp_entry_t){((type) << 1) | ((offset) << 8)})
So, we are limited to 2^24 pages of swap from a single swapfile, and 4kB pages (2^12), so 2^36 bytes of swap, which would be 64GB per swapfile.
Hmm, this means I don't know where the 2GB limit comes from. If we look at the vmalloc of maxpages, we have 2x maxpages, so 2^25, or 32MB allocated for a 64GB swapfile. I don't know if that would be a problem. For a 2GB swapfile, that would only be 1MB for the swap_map allocation.
Cheers, Andreas
--
Andreas Dilger
http://sourceforge.net/projects/ext2resize/
http://www-mddsp.enel.ucalgary.ca/People/adilger/