LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Hardware (https://www.linuxquestions.org/questions/linux-hardware-18/)
-   -   Partitioning scheme for performance (https://www.linuxquestions.org/questions/linux-hardware-18/partitioning-scheme-for-performance-102317/)

Bruce Hill 10-09-2003 10:03 PM

Partitioning scheme for performance
 
Searching Google and some forums hasn't given me the specific answer to the questions that I have.

I have a SOHO network. Two PC's, and one laptop (if someone can repair the motherboard). There is a router which allows internet sharing and file sharing.

On the main workstation I have W2K for only the "have to" stuff, such as Photoshop, PageMaker, and Dreamweaver - until I learn how to do this work either in open source software or with Wine.

This workstation has two 60 GB Maxtor ATA/133 hard drives. It has a P4 2.4 GHz CPU and 1GB of Kingston DDR333. Yesterday I made 2 major hardware changes, one with the hard drives, so I reformatted. The Debian system was a mess anyway. I installed from the Woody Non-US with the bf24 kernel, and then upgraded to 2.4.22-3. Someone started helping me via email from another country, but after 3 months we were still configuring stuff from console, and now he's disappeared, so I'm on my own. There is no more Debian on the system, but I did save my kernel config and a build_kernel script, among other little goodies. Though I will have to install Debian again from the beginning, this will be better for my learning.

Now I need some advice from an old-timer.

So far I only partitioned the W2K parts with Disk Manager like this:
hda1 = W2K system C: = 3GB
hda2 = extended = 56GB
hda5 = data E: = 25GB
so hda still has about 30GB of usable free space

hdb1 = W2K Programs D: = 6GB
hdb2 = extended = 53GB
so hdb has about 53GB of free space

I separated the W2K operating system from the programs for better performance. I would like to do something similar when I install Debian, but I don't really understand exactly how to separate the file system, or how to size each partition. I have my own domain name, and would like this little network to maybe work as a mail server (must use SSL, which I think exim can handle) for just these 3 computers, if that is possible. We have ADSL 512kbps tx and 2Mbps rx.

Any help or at least a link in the right direction would be appreciated. I've read a lot of documentation, and espcially like Markus Welsch's examples for security partitions, but that only assumes the use of one hard drive, and I think it's for a server rather than a workstation.

Bruce Hill 10-10-2003 04:28 PM

bump

quatsch 10-10-2003 05:15 PM

I know next to nothing about this stuff. But fwiw:
the programs generally go somewhere under /usr so you might want to separate that from /. Also, I think that when you're running a server, a lot goes on in /var so that it's a good idea to have a separate partition for that as well. Finally, your swap should be on a different disk from your / and if possible at the beginnig of a hd, but since you have 1gig of ram, it might not make much of a differnence.

codec 10-10-2003 06:14 PM

Try ReiserFS. I am not a debian user, so I am not sure if my opinion would work.

Read the installation instructions of gentoo, it has simple introduction of file systems:
http://www.gentoo.org/doc/en/gentoo-x86-install.xml

Would be fine if you have UPS and has no unstable programs.

Bruce Hill 10-10-2003 07:18 PM

what I want is scheme for 2 physical hd's
 
Quote:

Originally posted by codec
Try ReiserFS. I am not a debian user, so I am not sure if my opinion would work.

Read the installation instructions of gentoo, it has simple introduction of file systems:
http://www.gentoo.org/doc/en/gentoo-x86-install.xml

Would be fine if you have UPS and has no unstable programs.

codec,

Thanks for the link. That is the most thorough and concise documentation
I have seen for open source software. If one can't install Gentoo from that,
one should stick with point and click mindnumbness! If I'd seen this doc
earlier, I may have chosen Gentoo over Debian. Now maybe I'll try Gentoo,
since this very verbose document seems to answer any questions.

However, I am installing Debian. I understand about the different filesystems,
at least a little, but that's not my question. Here it is:

I have 2 physical hard drives. To install Debian for optimal performance,
on which hard drive should I put the different filesystems? Just to keep
things easy for different posters, let's just assume something like this,
from Markus Welsch's "securing a Linux system":

Device Mount Point Boot Start End Blocks ID System
/dev/hda1 1 2231 17920476 5 Extended
/dev/hda5 / 1 151 1212844+ 83 Linux (ext3)
/dev/hda6 /boot * 152 157 48163+ 83 Linux (ext3)
/dev/hda7 /home 158 163 48163+ 83 Linux (ext3)
/dev/hda8 /tmp 164 182 152586 83 Linux (ReiserFS)
/dev/hda9 /usr 183 237 441756 83 Linux (ext3)
/dev/hda10 /usr/local 238 687 3614593+ 83 Linux (ext3)
/dev/hda11 /var/log 688 1118 3461976 83 Linux (ext3)
/dev/hda12 /var/spool/postfix 1119 1443 2610531 83 Linux (ext3)
/dev/hda13 /var/tmp 1444 1480 297171 83 Linux (ReiserFS)
/dev/hda14 1481 1546 530113+ 82 Linux swap

The above would be Linux filesystem examples, but what I need is advice as
to where they should be located using 2 physical hard drives.

Col Panic 10-10-2003 07:38 PM

What we do for dual boot systems very much like you describe is the following

First disk
10gig NTFS for windows. 3 isn't enough because of that HUGE XP swap file
512m Linux Swap for the linux swap file (over 512 is pointless regardless of the amount of ram)
20 gig FAT32 shared (mounted as FAT-Shared in Linux)
The rest as a FAT32 partition used for application swap (DVD Burning, CD Ripping, Photoshop etc.)

Second disk
1 gig Journalized (mounted as /)
3 gig's Journalized (mounted as /root)
10 to 20 gigs Journalized (mounted as /home) depending on number of users.
the remainder is partitioned as needed for temporary backups, server storage, virtual Optical drives etc.

this system was in place before I go there, and It seems to work great for small workgroup file sharing and administration.

Bruce Hill 10-10-2003 08:01 PM

we're getting closer :+)
 
Thanks Col Panic,

The Windoze system is Windoze 2000 (W2K), not XP. It is formatted FAT32, and 3GB is plenty for that so long as you're not adding applications and data to that drive.

Could you explain a little further what you mean by application swap (DVD Burning, CD Ripping, Photoshop etc.)? Do you mean to run these applications exclusively on another FAT32 partition?

Col Panic 10-10-2003 08:11 PM

Re: we're getting closer :+)
 
Quote:

Originally posted by Chinaman

Could you explain a little further what you mean by application swap (DVD Burning, CD Ripping, Photoshop etc.)? Do you mean to run these applications exclusively on another FAT32 partition?

Sure!
Applications that use HUGE amounts of ram (Think editing a 60000mb analog video or a 24 track sound file scheme with each track at a raw 2 gigs ) commonly use their own swap file. You set this parameter in the applications settings and it uses free space in that location as a volatile memory area. This is pretty common in professional/industrial multimedia editing, but some common applications like Photoshop,Cool Edit and Adobe Premier do the same thing. The amount set back seems a bit extreme, but IMHO it's better than repartitioning the disk in 2 years because app data has changed and things are bigger than they used to be.

Bruce Hill 10-10-2003 09:00 PM

Quote:

Originally posted by Col Panic
Sure!
Applications that use HUGE amounts of ram (Think editing a 60000mb analog video or a 24 track sound file scheme with each track at a raw 2 gigs ) commonly use their own swap file. You set this parameter in the applications settings and it uses free space in that location as a volatile memory area. This is pretty common in professional/industrial multimedia editing, but some common applications like Photoshop,Cool Edit and Adobe Premier do the same thing. The amount set back seems a bit extreme, but IMHO it's better than repartitioning the disk in 2 years because app data has changed and things are bigger than they used to be.

Thanks, Col Panic.

I thought that's what you meant. I use Photoshop extensively, and for that app Adobe calls it a "scratch disk." Mine is usually set at about 3GB. I will take your advice and set a huge application swap for all such apps to use. I don't know about the other apps you mentioned, but Photoshop deletes that temp file when you close the app. This prevents wasting disk space on temp files. Also, if you use a separate part, these temp files don't fragment your drive. This is good information, because I bought a DVD+/-RW drive in May and will be doing some video editing in the near future. Haven't decided upon software yet, as I am trying desperately to migrate from Windoze to open source. The drive came with some software, but I haven't installed it yet. I'd rather wait until I have Debain running well and just learn open source, rather than using any more proprietary software. NB: If I'd learned Gimp, Scribus and HTML rather than Photoshop, PageMaker, and Dreamweaver; there would be no issues with me making a total transition now.

It was suggested to me to set up Debian to mount /tmp as tmpfs, rather than as a filesystem. I think that is so that this will not write data to the disk that you don't need later, and this would disappear after a restart (or whatever). Any experience or opinion on that?

Col Panic 10-10-2003 11:34 PM

I agree. You have 2 good sized hard drives, that you will never fill with just user data, and you can repartion free space easily.

Tmpfs is great if you have alot of ram (1 gig >= alot I think lol) but it will cause more swap hits if you have kde or gnome slowly eating your ram and don't reboot often. I'm not sure you can mount it until after the CLI loads though. Used to use it on an old SPARC 4 that compiled alot of C programs and had a whopping 128m of ram (good old days) but we just did it 'on the fly' before a compile. Look it up as it seems a goods idea in your case.

sboddy 10-11-2003 07:17 PM

Re: what I want is scheme for 2 physical hd's
 
Quote:

Originally posted by Chinaman
I have 2 physical hard drives. To install Debian for optimal performance,
on which hard drive should I put the different filesystems? Just to keep
things easy for different posters, let's just assume something like this,
from Markus Welsch's "securing a Linux system":

Device Mount Point Boot Start End Blocks ID System
/dev/hda1 1 2231 17920476 5 Extended
/dev/hda5 / 1 151 1212844+ 83 Linux (ext3)
/dev/hda6 /boot * 152 157 48163+ 83 Linux (ext3)
/dev/hda7 /home 158 163 48163+ 83 Linux (ext3)
/dev/hda8 /tmp 164 182 152586 83 Linux (ReiserFS)
/dev/hda9 /usr 183 237 441756 83 Linux (ext3)
/dev/hda10 /usr/local 238 687 3614593+ 83 Linux (ext3)
/dev/hda11 /var/log 688 1118 3461976 83 Linux (ext3)
/dev/hda12 /var/spool/postfix 1119 1443 2610531 83 Linux (ext3)
/dev/hda13 /var/tmp 1444 1480 297171 83 Linux (ReiserFS)
/dev/hda14 1481 1546 530113+ 82 Linux swap

The above would be Linux filesystem examples, but what I need is advice as
to where they should be located using 2 physical hard drives.

Go on then, I'll give it a poke! However, this is completely unscientific, and would be different depending on current and future use.

From what I've read this is chiefly a workstation doing small time server stuff. Assuming this, and if I was going with this partitioning breakdown, I'd go (in order of hdx and hd[a-d]#):

disk 1:
/boot [Primary]
/
<swap>
/var/log
/var/spool/postfix
/var/tmp

disk 2:
/usr
/usr/local
/home
/tmp

BTW Where's the /var partition? There's quite a few other significant directories under /var, and with this breakdown, this is going onto your / partition!!!

Now to try and explain my reasoning! :p

/boot only gets significant use at boot time, so it's a no brainer to pair up with swap. Similarly / is chiefly used to get the system up. Yes it does get used at run time, but the big stuff is going to be in /usr (assuming your distro puts KDE/Gnome/OOo etc under /usr). By putting the / partition next to the swap partition, any time the drive heads do have to seek between the two partitions, the seek time is minimised. The same rational went into the /var sub-directories. There's hardly anything in my /var/tmp (although yours may differ), so very infrequent accesses, hence it's furthest away from swap. I'm assuming your postfix daemon will be handling relatively light traffic, so it's spool dir is next one in. And finally, log has low but regular throughput, so it's closest to swap.

The exact order for disk 2 depends on where your distro installs software. Having not installed Debian, I don't know where the majority of software is installed. My recommendation is that the main software repositry sits before /home, followed by /tmp. Here I've assumed /usr/local. Again this is so that seek times between a binary starting, and accessing your personal data is minimised, and that from accessing your data, it can then quickly seek to the place to put temporary working files. All this whilst having quick access to the swap partition on the first disk.

If you have no other IDE devices installed, then put each disk as a master device on its own IDE channel. If however there are other IDE devices, put all the slow ones on the second channel, and put both disks on the first. In either case disk 1 should be hda.

Again the disclaimer... I haven't tested this, I'm working on quite a few assumptions and variables, but this is a (hopefully) educated shot at a good layout.

Regards
Steve

Bruce Hill 10-11-2003 11:42 PM

Thanks Steve. I would have to ask Markus Welsch where the /var partition is located, as I copied that directly from his website http://www.markus-welsch.de/linux/se...hapter_01.html
I have read a pretty good bit of his stuff on securing a *nix system, and he seems to have a good application of knowledge.

It is my assumption that his setup is for a mail server, and that he would leave the /var directory in the default location, with only those other paths of /var in different places, though I don't know. I am new to Linux, and still learning.


All times are GMT -5. The time now is 06:44 AM.