View Single Post
  #6   (View Single Post)  
Old 22nd July 2008
TerryP's Avatar
TerryP TerryP is offline
Arp Constable
 
Join Date: May 2008
Location: USofA
Posts: 1,547
Default

Quote:
Originally Posted by ijk View Post
what would be ideal partition size for freebsd7 runing on a 250gb hardrive.
The server would be runing apache php and mysql and runing some busy sites with 100000 plus members.
Particularly what should be the size of /var
also of particularly interest would be what would be good sizes to use for /tmp /root etc as disc space I donot this is going to be a problem
will be leaving most of the remaining space for /usr
thanks
This all depends on what you need to store.


By default 8% of allocated space is 'reserved' and you really do not wan to cut FreeBSD file systems down to the wire: not enough free space == reduced performance.


Since you've got a lot of room, planning to have 15% margin for performance reasons, plus 40~50% of the remaining disk space free on your partitions in case of surges in required space probably wouldn't be a bad idea.


The size of / needs to be large enough for your needs, remember every thing not moved onto another 'mount' is stored on /; my laptop runs 512mb / without problems but I *have* filled it to the brim on occasion. The size of /tmp should be able to hold the largest files you intend to place there, for example I often extract backups in /tmp/SomePrivateDir or /root -- which ever offers more space.


I would suggest a /usr partition of at least 2GB in order to handle the load of /usr and associated files. Remember /usr/ports, /usr/obj, /usr/src and /usr/local are stored on it. The standard contents of /usr alone should consume around 500~600MB not counting the aforementioned directories.


Assuming your storing the websites files in /var, you need it to be _at least_ big enough to hold all of your sites files and their databases. Loving margin for error, something like:

(disk quota + database quota) * 1.7.


would probably be suitable. The greater margins are always helpful and can cause less trouble later when todays constants (e..g sites * quota) change to tomorrows over time spent fixing it ;-).



You can off load most parts of the file system at will, for example you could mount /usr/ read only, then mount another partition on it read write as /usr/ports. (I've never tried this but I see no reason why it should not work!). If you have disk space, you can always create a small partition for a /home and make /usr/home a symlink to it. My file server has like a 400MB partition for /home, just enough free space that I can store larger files their in a 'pinch' without (as much of) the freedom for an attacker to bloat free space on /usr should the account be compromised ;-)





DISCLAIMER: I am not a professional user of FreeBSD, just my families computer geek.
__________________
My Journal

Thou shalt check the array bounds of all strings (indeed, all arrays), for surely where thou typest ``foo'' someone someday shall type ``supercalifragilisticexpialidocious''.
Reply With Quote