View Single Post
  #2   (View Single Post)  
Old 17th August 2010
ocicat ocicat is offline
Administrator
 
Join Date: Apr 2008
Posts: 3,318
Default

Quote:
Originally Posted by IronForge View Post
Am I correct in presuming (since the Live USB section didn't mention) that following the /swap and /var size guidelines are impractical?
It is very easy to obsess & argue about partition sizing. The purpose of partitioning is to place an upper limit on runaway processes which might fill up the disk. By confining a process to a limited amount of the disk, it might fill up the partition, but hopefully not take the system down with it. Note that partitioning is not the same thing accomplished by chroot(8).

Note also that this is a classic interpretation of partitions -- running on a system which conceivably may be up for months at a time with a number of users connected running an unforeseen number of applications of even greater unforeseen quality.

Given that you are wanting to construct a USB system which may be up for only hours instead of months, you have more latitude in how the system "should" be partitioned, if it needs to be partitioned at all. After all, you are most likely going to be the only user.

jggimi will state that partitioning (especially for transient systems) may be unnecessary at all. Outside of swap, create one large "a" partition, & be done with it. You are already questioning the confinement provided by partitioning; with only one partition, growth is more fluid & not as constricted.

As for sizing swap & /var to the size of memory, the FAQ is focusing on retaining crash information for later diagnosis. It is up to you to decide whether you want to maintain such information. Yes, it can be educational, but you have also stated that the purpose of this USB install is to use public computers -- computers which aren't yours.

A controversial subject is whether swap is needed at all. Traditionally, swap was to be a backup for RAM which was very expensive at the time. Systems did not have hordes of RAM, so being able to use slower secondary storage (drive space) as overflow needed by hungry applications was seen as a reasonable compromise which allowed the system to keep running. Now that memory is abundant & cheap, it is questionable how useful swap is today. It can still be seen as insurance, but this comes out of what disk space is available -- which in this case is quite limited. You can watch how much swap is being used through applications such as systat(1) or top(1) I suspect that for systems sporting gigabytes of memory, swap is never used, but this is dependent upon what applications are being executed.

So given the limited amount of storage space available in a 4-8GB flash drive, I question whether you want to maintain space for crashes. I suspect you can get along just fine with setting swap to 32MB just to have some insurance. Going with no swap is simply gutsy.

When disk space becomes so important, you may also want to think about moving /tmp to RAM. Study mfs(8) & fstab(5) first. However, by moving /tmp into RAM within /etc/fstab, you are making an assumption that the configured amount of memory is available on all computers used. Think about this if you set this up in /etc/fstab.

Lastly with respect to having space for applications installed through packages, maximize the amount of space available to /usr if you are still creating individual partitions. I have one of the original 4GB Asus Eee netbooks, & although I have to think about what applications are really necessary, I have had OpenOffice (which is one of the largest applications in OpenBSD's ports tree...) installed.

As stated before, don't expect to get it all right the first time. Decide on what appears to be reasonable, & use it for awhile. After living with it, you will find nits that you want to change, & that is okay. Installation isn't that hard, & as long as you backup the important files, reinstalling shouldn't be very painful.
Reply With Quote