Gentoo Archives: gentoo-amd64

From: Duncan <1i5t5.duncan@×××.net>
To: gentoo-amd64@l.g.o
Subject: [gentoo-amd64] Re: Late in the game Windows dual-boot question
Date: Mon, 01 May 2006 12:12:13
Message-Id: pan.2006.05.01.12.09.42.610071@cox.net
In Reply to: Re: [gentoo-amd64] Late in the game Windows dual-boot question by Peter Humphrey
1 Peter Humphrey posted <200605011141.50417.prh@××××××××××.uk>, excerpted
2 below, on Mon, 01 May 2006 11:41:50 +0100:
3
4 > On Sunday 30 April 2006 16:51, Mark Knecht wrote:
5 >
6 >> 2) When I built the machine I had 512MB in the machine so a 1GB swap
7 >> seemed fine. I have since updated to 1GB so the swap seemed a bit small
8 >> anyway.
9 >
10 > I've read somewhere that more than 1 GB swap would be wasted.
11
12 I believe that's no longer correct -- under certain circumstances, anyway.
13
14 Back with kernel 2.2 IIRC, a swap partition over 128MB was wasted as that
15 was the biggest the kernel would make use of anyway. Further, there was
16 (still is IIRC tho I could be wrong) a limit of I think it was 8 swap
17 partitions (I believe it's 16, now, but without the size limitation, or
18 more specifically, with a size limitation that's well outside reasonable
19 levels -- 2 TB or some such <g>), which @ 128MB a piece indeed total a gig.
20
21 I know after I set up my 4x4G swap (a bit of boasting... I've worked
22 hard to get this system so I deserve it... 4 SATA drives, each with
23 identical partitions for RAID, with a 4 gig swap partition on each one,
24 all set at the same swap priority so the kernel automatically stripes them
25 for much faster access -- it's /much/ faster than single-disk swap access,
26 especially when the same disk holds everything else and you are doing
27 active I/O on it at the same time it's swapping!), with a gig of memory, I
28 had it using over a gig of swap a few times, and once, when I had a
29 runaway program gobbling RAM, I let it go to about 15 gigs of swap before
30 I killed it before the kernel decided to activate the OOM-killer.
31
32 As it happens, I've since upgraded to 8 gig of memory and I've never even
33 had that full yet since the upgrade (I've had it up to about 7 gig,
34 including cache and /tmp mounted as a six gig max tmpfs, so the portage
35 temp dir stuff never even touches hard disk -- only memory), so haven't
36 gone into swap at all since then. If and when I do, however, I have a
37 full 16 gig of swap to play with, 24 gig total, mem plus swap, and it's
38 still 4x4 striped, so going that deep into swap isn't going to bring the
39 system to its knees to the point it would on a single disk system.
40
41 All that said, as I've mentioned a couple times now, on a single disk
42 system, there's a /huge/ cost in terms of access speed, to access swap.
43 Given the cost, practically speaking, it's rather likely one wouldn't
44 /want/ much more than a gig of single-disk swap. To utilize more than
45 that at the raw disk hardware byte per second thruput we are talking...
46 it's simply not all that practical, even if one /does/ need the memory.
47 The disk thrashing and latencies involved just don't lend themselves to a
48 smooth operating system or experience in any way shape or form, no matter
49 how you look at it, if the data's over a gig and the hardware is a single
50 spindle hard drive. Given that, use of more than a gig of swap is going
51 to be more theoretical than practical in any case.
52
53 OTOH, with the size of today's drives, often a hundred gigabyte or more
54 need not even be partitioned, let alone ever used, and if that's the case,
55 throwing a few gigs at a swap partition, just so the system and system
56 operator have the flexibility to use it if it's ever needed, certainly
57 doesn't hurt. With a dual boot system and a drive < a couple hundred gig,
58 it's possible there's not the room to spare I was talking above, but
59 something reasonable, 2-4 gig, might still be possible, if one wants it.
60
61 --
62 Duncan - List replies preferred. No HTML msgs.
63 "Every nonfree program has a lord, a master --
64 and if you use the program, he is your master." Richard Stallman in
65 http://www.linuxdevcenter.com/pub/a/linux/2004/12/22/rms_interview.html
66
67
68 --
69 gentoo-amd64@g.o mailing list

Replies

Subject Author
Re: [gentoo-amd64] Re: Late in the game Windows dual-boot question Mark Knecht <markknecht@×××××.com>
Re: [gentoo-amd64] Re: Late in the game Windows dual-boot question Peter Humphrey <prh@××××××××××.uk>