I am considering installing CentOS 4.4, and am interested in how best to set up. I have been using FC2 and helping administer a Debian machine for a few years, but do not consider myself a Linux guru. My current set up uses a /swap partition which is 2x my memory size mem = 256 MB $ sudo /sbin/fdisk -l /dev/hda6 76506 77545 524128+ 82 Linux swap I'm interested in the use of a file for swap, as I hear that there is now no speed penalty for that. I use ext3 for my partitions. I'm also interested in whether it be reasonable/desirable to make /home, /tmp, and /var be on a separate partition. I have heard arguments on both sides, some claiming that with ext3 the system won't become unbootable because of /tmp filling up. Anyone care to weigh in? Mike -- p="p=%c%s%c;main(){printf(p,34,p,34);}";main(){printf(p,34,p,34);} Oppose globalization and One World Governments like the UN. This message made from 100% recycled bits. You have found the bank of Larn. I can explain it for you, but I can't understand it for you. I speak only for myself, and I am unanimous in that!
> My current set up uses a /swap partition which is 2x my memory > size> mem = 256 MB > $ sudo /sbin/fdisk -l > /dev/hda6 76506 77545 524128+ 82 Linux swapFor low memory systems, this logic is okay, but as your memory grows, you don't need to keep doubling the size for swap. For example, on a system with 2Gigs of ram, there's no reason to have 4G of swap space.> I'm interested in the use of a file for swap, as I hear that there > is now no speed penalty for that. I use ext3 for my partitions.Using swap by itself is generally a speed penalty. Using a file for it can be done, but it's not really something I'd do.> > I'm also interested in whether it be reasonable/desirable to > make /home, /tmp, and /var be on a separate partition. I have heard > arguments on both sides, some claiming that with ext3 the system > won't become unbootable because of /tmp filling up.This depends entirely on the tasks required of the box. Putting /tmp on a separate partition can allow you to mount it noexec, which can help with security, and filling up /tmp won't fill the rest of the disk. /home on a separate partition can be a good thing for major upgrades or re-installs, as you can do a completely clean install and format the system without nuking user data. /var is the most task dependent because this is where the webroot and database files live by default. Splitting /var and subdirs out based on task can be beneficial. -- During times of universal deceit, telling the truth becomes a revolutionary act. George Orwell
Mike McCarty wrote:> I am considering installing CentOS 4.4, and am interested in > how best to set up. I have been using FC2 and helping administer > a Debian machine for a few years, but do not consider myself a > Linux guru. > > My current set up uses a /swap partition which is 2x my memory > sizeThis is a completely false premise that has no basis in Linux or even in verions of Solaris after SunOS4. Only SunOS4 *REQUIRED* swap be twice the amount of RAM due to how its VM was implemented. The best of part of this is that this is actually a part of the 'knowledge' that the LPI examinations will examine you on. With regards to swap, on servers you want to tune things such that swap is NEVER used but do create some swap space to handle edge cases. On desktops, create as much swap as you wish to handle firefox, thunderbird or whatever memory hungry GTK application you have. Of course, the more RAM you have, the merrier.> > I'm also interested in whether it be reasonable/desirable to > make /home, /tmp, and /var be on a separate partition. I have heard > arguments on both sides, some claiming that with ext3 the system > won't become unbootable because of /tmp filling up.ext3 reserves blocks and inodes for root so it is true that /tmp filling up will not prevent boot up to an extent. You might find it necessary to make sure /var is not filled up if it prevents any critical services from starting. Putting /home on a separate partition makes it easier to upgrade the OS without having to move data around. If it were possible to make / read only, I would definitely put /tmp on a separate partition and just use ext2 for it. I would therefore put at least /home and /var on separate partitions if it were a server where /home had data. If not, /var will be on its own. If it were my home desktop, /home definitely gets its own partition.
I'm going to be different from most. I don't believe in using swap at all. I have my swap starting equal to my ram and as i go up i REDUCE the swap. My vm.swappiness is always set to zero as swapping to disk is many times slower than keeping it in ram. Mike McCarty wrote:> I am considering installing CentOS 4.4, and am interested in > how best to set up. I have been using FC2 and helping administer > a Debian machine for a few years, but do not consider myself a > Linux guru. > > My current set up uses a /swap partition which is 2x my memory > size > > mem = 256 MB > > $ sudo /sbin/fdisk -l > /dev/hda6 76506 77545 524128+ 82 Linux swap > > I'm interested in the use of a file for swap, as I hear that there > is now no speed penalty for that. I use ext3 for my partitions. > > I'm also interested in whether it be reasonable/desirable to > make /home, /tmp, and /var be on a separate partition. I have heard > arguments on both sides, some claiming that with ext3 the system > won't become unbootable because of /tmp filling up. > > Anyone care to weigh in? > > Mike-- My "Foundation" verse: Isa 54:17 No weapon that is formed against thee shall prosper; and every tongue that shall rise against thee in judgment thou shalt condemn. This is the heritage of the servants of the LORD, and their righteousness is of me, saith the LORD. -- carpe ductum -- "Grab the tape" CDTT (Certified Duct Tape Technician) Linux user #322099 Machines: 206822 256638 276825 http://counter.li.org/
Message: 24 Date: Mon, 26 Feb 2007 21:39:47 -0600 From: Mike McCarty <Mike.McCarty at sbcglobal.net> Subject: Re: [CentOS] Swap Considerations To: CentOS mailing list <centos at centos.org> Message-ID: <45E3A803.8030802 at sbcglobal.net> Content-Type: text/plain; charset=ISO-8859-1; format=flowed>Of course. But I'm a laid-off engineer. If you like, I'd gladly take >donations for more RAM. In the meantime, this machine remains 256M.Mike: Sorry you are unemployed! If you are an IEEE member, you can look on the web site for jobs. If not, look on monster(s).com Suggest when you are not looking for a job, you download the PDF files for the RHEL manuals, from the CentOS web site, at this URL: http://www.centos.org/docs/4/ and look through them. They will answer many of your questions and give you much guidance! I never worked with UNIX when I was employed, and there is a "learning curve", but, it's well worth it. My Linux partitions on this home desktop box (dual boot with Win XP) look something like this: swap is 1020 MB (512 MB of RAM) /opt is vfat 1028 MB (to transfer data between Win XP and Linux safely) /boot is ext3 102 MB /home is ext3 4001 MB /tmp is ext3 1028 MB / is ext3 4997 MB I believe you should backup the data in /home (tar -cvf backup.tar /home/mike) for example) and then burn that to a CD and then do a "clean" install of CentOS 4.4 and then restore your data and browser and e-mail. I believe that unless the box you install to has unsupported HW, it is going to work for you, out of the box, without any problems. It takes me awhile to restore to Evolution (my e-mail client) and then a few minutes to restore my Bookmarks and Cookies to Firefox and I'm ready to go. CentOS is a very good, solid, distribution, like the upstream distro. It is not perfect, but it is much more solid and stable and secure than many distros and I doubt that I will stray from CentOS again. HTH, Lanny
Mike McCarty wrote: [snip]> I'm interested in the use of a file for swap, as I hear that there > is now no speed penalty for that. I use ext3 for my partitions.I'm still waiting for some commentary on use of a file for swap. Mike -- p="p=%c%s%c;main(){printf(p,34,p,34);}";main(){printf(p,34,p,34);} Oppose globalization and One World Governments like the UN. This message made from 100% recycled bits. You have found the bank of Larn. I can explain it for you, but I can't understand it for you. I speak only for myself, and I am unanimous in that!