partitioning revisited

2001-08-09 Thread Keith O'Connell
Hi,

I have just build a machine, and am ready to start putting the stable
on it. This is the first time I have built one from scratch, and it has
made me think in detail about what I am doing as I put it all together.
Now as I am newish to Linux I thought you might indulge me her. On two
other boxes I have here I have potato running fine, but as I think
about it there may be a better set-up. To help me get to the enlightened
approach could I pick the panel brains on the following?

1: I recently read that logical partitions were better than primary
because of the size limits on the directories. I didn't quit understand
this. On this laptop I have 4 primary partitions, with the 4th holding 4
logical. Is this unwise? Should I just have one big logical partition?

2: In my other machines I have 128 Mb memory, so I have had a 128 Mb
swap file. In my new machine I have taken advantage of the low price and
put 512 Mb in it. This set me thinking, and I cannot reconcile the
following I have been told or read;

a: With 512 Mb ram you don't need a swap file
b: You must have a swap file 2x ram
c: Over 128 Mb ram you must have a swap file of there same size
d: A swap file cannot be over 128 Mb
e: A swap file cannot be over 256 Mb
f: A swap file cannot be over 512 Mb
g: Swap files must be in multiple of 128 Mb
h: Swap files are an irrelevance on modern machines

My questions are not from a lack of research, rather I have found out
too much which is contradictory. I would like some guidance in sorting
the what from the chaff here

Keith

-- 
+--+
| Keith O'Connell  | That which does not kill |
| Maidstone, Kent (UK) |  us, usually still hurts. |
| [EMAIL PROTECTED]   |   That's just life, I'm afraid   |
+--+



partitioning revisited

2001-08-09 Thread Keith O'Connell
Hi,

I have just build a machine, and am ready to start putting the stable
on it. This is the first time I have built one from scratch, and it has
made me think in detail about what I am doing as I put it all together.
Now as I am newish to Linux I thought you might indulge me her. On two
other boxes I have here I have potato running fine, but as I think
about it there may be a better set-up. To help me get to the enlightened
approach could I pick the panel brains on the following?

1: I recently read that logical partitions were better than primary
because of the size limits on the directories. I didn't quit understand
this. On this laptop I have 4 primary partitions, with the 4th holding 4
logical. Is this unwise? Should I just have one big logical partition?

2: In my other machines I have 128 Mb memory, so I have had a 128 Mb
swap file. In my new machine I have taken advantage of the low price and
put 512 Mb in it. This set me thinking, and I cannot reconcile the
following I have been told or read;

a: With 512 Mb ram you don't need a swap file
b: You must have a swap file 2x ram
c: Over 128 Mb ram you must have a swap file of there same
size
d: A swap file cannot be over 128 Mb
e: A swap file cannot be over 256 Mb
f: A swap file cannot be over 512 Mb
g: Swap files must be in multiple of 128 Mb
h: Swap files are an irrelevance on modern machines

My questions are not from a lack of research, rather I have found out
too much which is contradictory. I would like some guidance in sorting
the what from the chaff here

Keith

-- 
+--+
| Keith O'Connell  | That which does not kill |
| Maidstone, Kent (UK) |  us, usually still hurts. |
| [EMAIL PROTECTED]   |   That's just life, I'm afraid   |
+--+



Re: partitioning revisited

2001-08-09 Thread Sebastiaan
High, 
On Thu, 9 Aug 2001, Keith O'Connell wrote:

 Hi,
 
 I have just build a machine, and am ready to start putting the stable
 on it. This is the first time I have built one from scratch, and it has
 made me think in detail about what I am doing as I put it all together.
 Now as I am newish to Linux I thought you might indulge me her. On two
 other boxes I have here I have potato running fine, but as I think
 about it there may be a better set-up. To help me get to the enlightened
 approach could I pick the panel brains on the following?
 
 1: I recently read that logical partitions were better than primary
 because of the size limits on the directories. I didn't quit understand
 this. On this laptop I have 4 primary partitions, with the 4th holding 4
 logical. Is this unwise? Should I just have one big logical partition?
 
dunno about this one

 2: In my other machines I have 128 Mb memory, so I have had a 128 Mb
 swap file. In my new machine I have taken advantage of the low price and
 put 512 Mb in it. This set me thinking, and I cannot reconcile the
 following I have been told or read;
These are just rules of thumb. I think it is the following:

 
 a: With 512 Mb ram you don't need a swap file
only if you are not a heavy user

 b: You must have a swap file 2x ram
true, until c: comes true
 c: Over 128 Mb ram you must have a swap file of there same size
true

 d: A swap file cannot be over 128 Mb
afaik, it can be
 e: A swap file cannot be over 256 Mb
afaik, it can be
 f: A swap file cannot be over 512 Mb
afaik, it can be
 g: Swap files must be in multiple of 128 Mb
I think it is wise that it is a multiple of your real memory. But, 1x ram
and 2x ram is a multiply (so it is not necesary to have a 128MB multiply)

 h: Swap files are an irrelevance on modern machines
perhaps.

BTW: Mb means Megabit, is should be MB.

Hope this enlighten things a bit.

Greetz,
Sebastiaan

 
 My questions are not from a lack of research, rather I have found out
 too much which is contradictory. I would like some guidance in sorting
 the what from the chaff here
 
 Keith
 
 -- 
 +--+
 | Keith O'Connell  | That which does not kill |
 | Maidstone, Kent (UK) |  us, usually still hurts. |
 | [EMAIL PROTECTED]   |   That's just life, I'm afraid   |
 +--+
 
 
 -- 
 To UNSUBSCRIBE, email to [EMAIL PROTECTED] 
 with a subject of unsubscribe. Trouble? Contact [EMAIL PROTECTED]
 



Re: partitioning revisited

2001-08-09 Thread George Karaolides

My $0.02's worth re. swap: 

Suppose you are consistently using 256MB of swap on your fairly up-to-date
machine.  That means you definitely need to buy and install 256MB RAM,
which is dirt cheap today.

Therefore, I think on a modern machine, the swap space should be equal to
the minimum amount of memory you will be adding next.  Monitor swap usage,
and as soon as it looks like you're consistently swapping, go out and buy
more dirt-cheap RAM.

On older machines with small amounts of memory you used to be swapping for
dear life with a multi-user multi-tasking OS like Linux,  which is
probably the origin of the swap=3xRAM rule.

Best regards,

George Karaolides   8, Costakis Pantelides St.,
tel:   +35 79 68 08 86   Strovolos, 
email: [EMAIL PROTECTED]   Nicosia CY 2057,
web:   www.karaolides.com  Republic  of Cyprus





Re: partitioning revisited

2001-08-09 Thread Karsten M. Self
on Thu, Aug 09, 2001 at 09:00:03AM +0100, Keith O'Connell ([EMAIL PROTECTED]) 
wrote:

 1: I recently read that logical partitions were better than primary
 because of the size limits on the directories. I didn't quit
 understand this. On this laptop I have 4 primary partitions, with the
 4th holding 4 logical. Is this unwise? Should I just have one big
 logical partition?

There's no benefit I'm aware of.  Some OSs may prefer only on primary
partition, or suffer other limitations, but most such issues are
historical only.

 2: In my other machines I have 128 Mb memory, so I have had a 128 Mb
 swap file. In my new machine I have taken advantage of the low price
 and put 512 Mb in it. This set me thinking, and I cannot reconcile the
 following I have been told or read;

I've got three general rules of thumb with swap:

  - Swapping sucks.
  - Running out of memory sucks more.
  - Repartitioning sucks most.

There's also a lot of obsolete data floating around about GNU/Linux in
general.

 a: With 512 Mb ram you don't need a swap file

If you're not swapping, this is true.

 b: You must have a swap file 2x ram

Not true.  But a good rule of thumb.

 c: Over 128 Mb ram you must have a swap file of there same
size

We'll bet back to this.

 d: A swap file cannot be over 128 Mb
 e: A swap file cannot be over 256 Mb
 f: A swap file cannot be over 512 Mb

From mkswap(8):

The maximum useful size of a swap area now depends on the
architecture.  It is roughly  2GiB on  i386,  PPC,  m68k, ARM, 1GiB
on sparc, 512MiB on mips, 128GiB on alpha and 3TiB on sparc64.

 g: Swap files must be in multiple of 128 Mb
 h: Swap files are an irrelevance on modern machines

Myths.

 My questions are not from a lack of research, rather I have found out
 too much which is contradictory. I would like some guidance in sorting
 the what from the chaff here

Simple truth on swap:  swapping is a kludge.  The benefit is your
program (or worse:  system) doesn't fall over because it runs out of
(expensive, fast) physical RAM.  The penalty is you sacrifice some disk
space, and a shitload of time, swapping data.  Swapping works reasonably
well on a tuned system because there are programs which aren't called
very often -- they can page out to disk, and stay there until they're
needed, at which point something else is swapped and the first program
gets some CPU cycles.  When this happens, you get the illusion of much
more physical memory than you've got.  When it happens a lot, your disks
grind endlessly and your maching is made of February molassas.

The old 2x RAM rule of thumb is still a pretty good one.  Everyone's got
more memory these days (and it's damned cheap for current
architectures), but programs and systems are getting bigger.  

I actually prefer to give my systems about 2x the maximum possible
memory as swap, even if this means they've got 3-4x memory.  Reason
being that it's far easier to add memory (drop the system, pop the case,
squeeze the sticks in) than it is to repartition (back up, verify, back
up again, verify again, repartition, reformat, restore, verify).  As for
sizing swap, I've got partitions variously of 132 MB, 128 MB, and 486
MB, on various systems.

Other considerations include distribution of swap.  On a SCSI system,
span spindles, if at all possible, preferably with swap on each physical
disk.  IDE offers fewer I/O benefits unless you have multiple
controllers, but spanning may help minimize head movement.  I'd
generally discourage use of swap files unless absolutely necessary.

Realize too the downsides are relatively bearable:  too little swap, and
you can't run really big (or lots of) apps.  Too much (and too little
memory), and you're going to be spending a lot of time exercising it.
Bad disk allocation -- you'll lose a touch of speed.  The world is
unlikely to end as a consequence.

-- 
Karsten M. Self kmself@ix.netcom.com  http://kmself.home.netcom.com/
 What part of Gestalt don't you understand? There is no K5 cabal
  http://gestalt-system.sourceforge.net/   http://www.kuro5hin.org
   Free Dmitry! Boycott Adobe! Repeal the DMCA!http://www.freesklyarov.org
Geek for Hirehttp://kmself.home.netcom.com/resume.html


pgpGum8o0hufF.pgp
Description: PGP signature


Re: partitioning revisited

2001-08-09 Thread Jimmy Richards
Hi Keith,

I will try and help as best I can with some of these questions,
and more!

First, I would like to recommend that you read the partitioning how-to
at   http://www.linuxdoc.org/HOWTO/mini/Partition/partition-4.html

On Thu, Aug 09, 2001 at 09:00:03AM +0100, Keith O'Connell wrote:
 Hi,
 
 I have just build a machine, and am ready to start putting the stable
 on it. This is the first time I have built one from scratch, and it has
 made me think in detail about what I am doing as I put it all together.
 Now as I am newish to Linux I thought you might indulge me her. On two
 other boxes I have here I have potato running fine, but as I think
 about it there may be a better set-up. To help me get to the enlightened
 approach could I pick the panel brains on the following?
 
 1: I recently read that logical partitions were better than primary
 because of the size limits on the directories. I didn't quit understand
 this. On this laptop I have 4 primary partitions, with the 4th holding 4
 logical. Is this unwise? Should I just have one big logical partition?

I, like Sebastiaan, am not sure about the limit of directory sizes
for primary paritions as opposed to logical's contained withing an
extended partition.
As for the layout of your partitions you should split them up
corresponding to the filesystems that they will contain. When everything
is put on one big partition data can start to get a little spread out
and disorganized. And lets say something strange happens and your system
is logging it. The logs could exhaust the available space, likely
hanging your system if the root filesystem is lumped together with all
filesystems. And if you have filesystem corruption, one directory
hierarchy can affect others. Splitting up partitions helps limit
systematic problems if corruption occurs on a directory.
Also, security can be a concern with one big parition. It's best not
not to put the root filesystem on the same filesystem as user
filesystems, as this may allow 'set user id'(SUID) programs to have more
of a potential to gain access to restricted areas. You should consider
mounting filesystems with the 'nosuid' option(specified in /etc/fstab)
anywhere that you think local or remote users might be up to no good.
For instance, if you are running an anonymous ftp server you might want
to give it it's own partition and mount that filesytem as 'nosuid'.
I got most of the above info from reading a book callied 'Maximum Linux
Security'.

 2: In my other machines I have 128 Mb memory, so I have had a 128 Mb
 swap file. In my new machine I have taken advantage of the low price and
 put 512 Mb in it. This set me thinking, and I cannot reconcile the
 following I have been told or read;
 
 a: With 512 Mb ram you don't need a swap file
 b: You must have a swap file 2x ram
 c: Over 128 Mb ram you must have a swap file of there same
 size
 d: A swap file cannot be over 128 Mb
 e: A swap file cannot be over 256 Mb
 f: A swap file cannot be over 512 Mb
 g: Swap files must be in multiple of 128 Mb
 h: Swap files are an irrelevance on modern machines

The amount of space you want to give for a swap partition depends on
a few system specific factors, imo. It depends on how much memory
you have, how large of programs you run and how many. I see that Karsten
seemed to have answered that how big a swap partition can be depends on
the machine architecture, and this same info is also contained the the
partitioning how-to at the url I gave. Where you place it can depend
upon a few things too. If you are not hardly ever giong to be making use
of swap, I suggest putting towards the rear of the drive. If you think
you are going to be using all your ram and hitting the swap occasionaly
and/or on a regular basis then I recommend putting it towards the front
of the drive, where access by the drive heads occurs pretty quickly, or
next to a partition where you believe a lot of drive activity occurs and
the drives heads are spending a lot of their time already, such as
/usr.

 My questions are not from a lack of research, rather I have found out
 too much which is contradictory. I would like some guidance in sorting
 the what from the chaff here
 
 Keith
 
 -- 
 +--+
 | Keith O'Connell  | That which does not kill |
 | Maidstone, Kent (UK) |  us, usually still hurts. |
 | [EMAIL PROTECTED]   |   That's just life, I'm afraid   |
 +--+
 
 
 -- 
 To UNSUBSCRIBE, email to [EMAIL PROTECTED] 
 with a subject of unsubscribe. Trouble? Contact [EMAIL PROTECTED]


All in all, I hope this and others who have responded have helped,

Jimmy Richards


Q: What did the instructor at the school for Kamikazi pilots say to his
students?

Re: partitioning revisited

2001-08-09 Thread Jimmy Richards
Oh,

A couple things I wanted to include that I forgot. Just thought
I would let you know that I have 512 MB's of ram and felt that I
wouldn't be using swap very much, so I made my swap partition 256 MB.
And, in case it's of any help, here is some info about my layout.
I just made an extended partition and all my logical partitions are
within it. I didn't use a primary myself.


Disk /dev/hdc: 255 heads, 63 sectors, 2495 cylinders
Units = cylinders of 16065 * 512 bytes

   Device BootStart   EndBlocks   Id  System
   /dev/hdc1 1  2495  200410565  Extended
   /dev/hdc5   * 1 3 24034+  83  Linux
   /dev/hdc6 412 72261   83  Linux
   /dev/hdc713  2035  16249716   83  Linux
   /dev/hdc8  2036  2243   1670728+  83  Linux
   /dev/hdc9  2244  2402   1277136   83  Linux
   /dev/hdc10 2403  2433248976   82  Linux swap
   /dev/hdc11 2434  2487433723+  83  Linux
   /dev/hdc12 2488  2495 64228+  83  Linux



   FilesystemSize  Used Avail Use% Mounted on
   /dev/hdc6  68M   43M   22M  66% /
   /dev/hdc5  23M  3.5M   19M  16% /boot
   /dev/hdc7  15G  5.1G   10G  34% /usr
   /dev/hdc8 1.6G  1.1G  547M  66% /var
   /dev/hdc9 1.2G   37M  1.1G   4% /home
   /dev/hdc11410M  181M  225M  45% /opt
   /dev/hdc12 61M  4.1M   56M   7% /tmp


HTH,

Jim Richards



Re: partitioning revisited

2001-08-09 Thread Mike Pfleger
On Thu, Aug 09, 2001 at 03:02:57AM -0700, Karsten M. Self wrote:
SNIP
   - Swapping sucks.
   - Running out of memory sucks more.
   - Repartitioning sucks most.
 
 There's also a lot of obsolete data floating around about GNU/Linux in
 general.

I have a question that seems appropriate here.  In the newer 2.4.x kernels
there's an issue with swap, correct?  I have noticed this with the last
2.4.6 kernel I built, and the 2.4.5 before that.  Some nasty javascript
would chew up a whack of memory, and then some swap would be used.  The
process would be killed eventually, but the swap was _not_ freed.  I had
to manually swapoff and swapon to free it, and this was only marginally
preferable to rebooting.

SNIP
  b: You must have a swap file 2x ram
 
 Not true.  But a good rule of thumb.
SNIP
 The old 2x RAM rule of thumb is still a pretty good one.  Everyone's got
 more memory these days (and it's damned cheap for current
 architectures), but programs and systems are getting bigger.  
 
 I actually prefer to give my systems about 2x the maximum possible
 memory as swap, even if this means they've got 3-4x memory.  Reason
 being that it's far easier to add memory (drop the system, pop the case,
 squeeze the sticks in) than it is to repartition (back up, verify, back
 up again, verify again, repartition, reformat, restore, verify).  As for
 sizing swap, I've got partitions variously of 132 MB, 128 MB, and 486
 MB, on various systems.

Again, how does this relate to the above swap feature in the 2.4.x kernels
that are AFAIK not yet fixed?  If this has been fixed, please let me know
as I have been checking the changelogs at kernel.org, and seen no mention
of swap issues being addressed in the last little while.

TIA,
-- 
Mike Pfleger

There's seventy brilliant people on earth.
Where are they hiding?
Yashar -Cabaret Voltaire (off of 2x45)



Re: partitioning revisited

2001-08-09 Thread Josh McKinney
On approximately Thu, Aug 09, 2001 at 01:22:57PM -0700, Mike Pfleger wrote:
 that are AFAIK not yet fixed?  If this has been fixed, please let me know
 as I have been checking the changelogs at kernel.org, and seen no mention
 of swap issues being addressed in the last little while.


Check out the latest ac kernel and the latest linus kernel also.  Linus has
been working on vm balancing as a top priority recently and the latest ac
has a patch to fix the swap=2*ram thing.  

Josh



Re: partitioning revisited

2001-08-09 Thread Mike Pfleger
On Thu, Aug 09, 2001 at 03:45:24PM -0500, Josh McKinney wrote:
SNIP
 Check out the latest ac kernel and the latest linus kernel also.  Linus has
 been working on vm balancing as a top priority recently and the latest ac
 has a patch to fix the swap=2*ram thing.  
 
 Josh

That's cool; Ill go and have a look once this backup is merrily doing its
own thing.  Thanks a bunch.

Cheers,
-- 
Mike Pfleger

There's seventy brilliant people on earth.
Where are they hiding?
Yashar -Cabaret Voltaire (off of 2x45)