* Current Max Swap size? Performance issues @ 2001-11-16 22:02 Michael Peddemors 2001-11-16 23:33 ` Andreas Dilger 0 siblings, 1 reply; 4+ messages in thread From: Michael Peddemors @ 2001-11-16 22:02 UTC (permalink / raw) To: linux-kernel 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) -- "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 ^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: Current Max Swap size? Performance issues 2001-11-16 22:02 Current Max Swap size? Performance issues Michael Peddemors @ 2001-11-16 23:33 ` Andreas Dilger 2001-11-18 6:28 ` Eric W. Biederman 0 siblings, 1 reply; 4+ messages in thread From: Andreas Dilger @ 2001-11-16 23:33 UTC (permalink / raw) To: Michael Peddemors; +Cc: linux-kernel On Nov 16, 2001 14:02 -0800, Michael Peddemors wrote: > 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?) 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. > 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/ ^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: Current Max Swap size? Performance issues 2001-11-16 23:33 ` Andreas Dilger @ 2001-11-18 6:28 ` Eric W. Biederman 2001-11-19 9:48 ` Andreas Dilger 0 siblings, 1 reply; 4+ messages in thread From: Eric W. Biederman @ 2001-11-18 6:28 UTC (permalink / raw) To: Andreas Dilger; +Cc: Michael Peddemors, linux-kernel Andreas Dilger <adilger@turbolabs.com> writes: > On Nov 16, 2001 14:02 -0800, Michael Peddemors wrote: > > 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?) > > 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 ^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: Current Max Swap size? Performance issues 2001-11-18 6:28 ` Eric W. Biederman @ 2001-11-19 9:48 ` Andreas Dilger 0 siblings, 0 replies; 4+ messages in thread From: Andreas Dilger @ 2001-11-19 9:48 UTC (permalink / raw) To: Eric W. Biederman; +Cc: Michael Peddemors, linux-kernel On Nov 17, 2001 23:28 -0700, Eric W. Biederman wrote: > Andreas Dilger <adilger@turbolabs.com> writes: > > > 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/ ^ permalink raw reply [flat|nested] 4+ messages in thread
end of thread, other threads:[~2001-11-19 9:50 UTC | newest] Thread overview: 4+ messages (download: mbox.gz follow: Atom feed -- links below jump to the message on this page -- 2001-11-16 22:02 Current Max Swap size? Performance issues Michael Peddemors 2001-11-16 23:33 ` Andreas Dilger 2001-11-18 6:28 ` Eric W. Biederman 2001-11-19 9:48 ` Andreas Dilger
This is a public inbox, see mirroring instructions for how to clone and mirror all data and code used for this inbox