[sf-lug] Apache & UBU configurations
Ramin K
ramin-list at badapple.net
Fri Mar 18 16:59:58 PDT 2011
On 3/18/2011 4:01 PM, Eric W. Rasmussen wrote:
> I am running an Asus laptop with an i5 Intel, 8Gb RAM, and 640Gb HDD.
> This machine is exclusively for personal use... no other users.
>
> 1st. What size do you think my SWAP should be and at what priority? Note
> that I am also vm'ing OSX and WIN7 with 2Gb RAM each and sometimes
> simultaneously. I don't hibernate so I was thinking that 2Gb with a
> [vm.swappiness=10] would be fine. Thoughts?
With 640GB, I'd go ahead and set 8GB of swap in case I ever did want to
hibernate. If you're sure you'll never need it, 2GB sounds good to me.
> 2nd. What size should my /root partition be? It looks like I am at 4.5Gb
> of 15Gb as I speak. Maybe the following question might bring some
> clarity to my goals.
/ depends on what other partitions you have. On servers I'm a fan of /
/tmp /home and /var with /var accounting for 80-90% of the space. On a
home server I do the same with a larger /home though I usually toss
music, movies, etc into /var and share via Samba to keep them out of my
personal home dir.
> 3rd. I need to run a LAMP server for local web development. Under Win
> this was easy using WAMP2. But under Linux I am seeing that working with
> the /var/www/ directory is kind of a pain. I have read that I might want
> to install a separate partition for /var. If so, what is a good size for
> multiple sites (I was thinking 10Gb). If I could have a /home/user/www
> directory so that read/write permissions aren't a problem and it is
> easily accessible, that would be even better. Thoughts?
Don't forget Mysql ends up in /var/lib/mysql as well. However it is easy
to point Apache to your homedir with a vhost I don't recommend moving
Mysql around unless you have some experience since it can be a little
hard to troubleshoot or cause updates to fail in certain distros. 10GB
for /var is reasonable though I'd lean towards 20GB if you do a lot of
development and large data sets in Mysql.
Two things you should do to your Mysql instances are add these lines to
your my.cnf under [mysqld].
max_binlog_size = 100M
expire_logs_days = 10
This will keep binary logs from filling your /var partition. I don't
recommend turn off log_bin as having them can help Mysql recover in
certain cases.
Not very laptop central, but hopefully some of this is useful for you.
Ramin
More information about the sf-lug
mailing list