[Subject Prev][Subject Next][Thread Prev][Thread Next][Subject Index][Thread Index]

Re: SWAP SIZE - and other things; long one




On Mon, 13 Nov 2000, Ravi wrote:


> I would imagine so. I personally use something like, "disk throughput
multiplied by 15" -- the info of which I get by running "hdparm -tT"

to nitpick, to check disk throughput, you only need hdparm -t (-T times
transfer to buffer memory). seriously, is there any logic to this times
15? it translates as having enough swap space to continuously swap for 15
seconds - which sounds like a lot. if you have good disks, the throughput
may be of the order of 15 megabytes per second - leading to swap space of
around 250 meg - which i would say is a lot and may not be needed on a
typical linux machine. these days, ram prices are low enough that i would
always recommend using the swap only to avoid system problems when one
exceeds memory usage. there are perhaps two kinds of situations where it
is reasonable to configure and use swap (imo, of course) - excluding bsd
types, which need swap because of the os design. high end systems have
fast disks that are cheaper compared to their ram (which is really
expensive) and these disks may be nice raids with good access speeds. for
example, typical pc's may have buffer transfer rates of around 50 - 100
megabytes per second (this, of course, may be determined by running hdparm
-T). a nice scsi raid system can provide similar speed. in this situation,
swap space may be of use to effectively increase available memory. (of
course, in linux, swap is automatically raided - just create swap
partitions on multiple disks and the system will effctively use it like a
raided swap). the second situation is where the usage of the machine is
such that there tend to be many dormant applications loaded but used only
from time to time. in these situations, the dormant programs are happily
swapped out till they are used the next time.

sriram

ps: practising what i preached: after having talked about raid a couple of
months ago, i got my first chance to try linux raid. the box had 4*18 gb
scsi disks on an ultra2 scsi bus. each disk timed out at about 20
megabytes per second. since there was no need for redundancy on this
machine, i went for a raid 0 implementation (striping) with three disks,
and used the 4th for os and other general stuff (i did not want to mess
with root raid yet). throughput on the raid is about 99% of 3*20. ultra2
scsi is 80 megabytes per second, so the bus is not saturating yet. with
redhat 7.0, the whole operation was rather trivial. at install time, i
selected the three drives and clicked on make raid device. it gives only
choice of raid types of linear, level 0 (striping) or 1 (mirroring) or 5. 
the install took about 10 minutes including some 2-3 minutes to mkfs and
mkraid and when the machine came up, bang, i had my 60 gb mounted under
/var/ftp. interestingly, i noticed that a similar box with 2*9 gb disks
has faster disks - about 25 megabytes per second per disk. now, all i need
to do is get budget approval to buy that nice box with quad cpu, triple
power supply and six hot swap bays.... 

sriram

---
Visit our home page at: www.chennailug.org
Send e-mail to 'ilugc-request@xxxxxxxxxxxxxxxxxx' with 'unsubscribe' 
in either the subject or the body to unsubscribe from this list.