ideal number of swap partitions and sizes (slightly different from other posts)

Simon White yellowdog-general@lists.terrasoftsolutions.com
Wed Apr 24 11:07:00 2002


24-Apr-02 at 10:13, Ryan Mesler (kraylus@airmail.net) wrote :
> i noticed about a year and a half ago that linux supports multiple swap
> drives. since then i've always made a minimum of two swap partitions (using
> the ext2 filesystem).

Do you have two hard drives?

> i've noticed somewhat better performance when doing this on low end
> machines. but then again, i always had a doubt that it was probably wishful
> thinking and that possibly the performance gains i noticed were imaginary.

Probably wishful thinking, or some things which are sped up at the cost of
others being slowed.

> does anyone actually know for sure if there is indeed a performance gain.

Not unless you have 2 disks. 2 partitions on the same disk = same head
reading/writing the data = same amount of time to write to one or two
partitions, probably more for 2 partitions since likely to be more
physical head movement.

> which would be more beneficial for the system. what if i were to make one
> giant swap drive (like 1gb) rather than 4 smaller ones (256mb each). can
> anyone enlighten me? i've read many howto's but none have addressed these
> questions and unfortunately, most of the linux users in newsgroups...
> well... they're less than kind.

If you have several disks, it makes sense to have swap space on each disk,
so that you can have more than one head which is reading/writing at the
same time, but having just one big disk will benefit from having just one
swap partition. No point having 2.

Regards,

-- 
[Simon White. vim/mutt. simon@mtds.com. GIMPS:87.43% see www.mersenne.org]
UNIX is basically a simple operating system, but you have to be a genius
to understand the simplicity.  -- Dennis Ritchie
[Linux user #170823 http://counter.li.org. Home cooked signature rotator.]