If you are a PHP developer or a LAMP server admin you probably have already heard about the [Zend Platform]. After some test and configure/tunning step, we deployed this solution on a heavy loaded production server running with [Apache 2.x], [PHP 4.4.x], [MySQL Client 5.x].
You probably already ask you : "which filesystem can I use on my web servers or database server ?" Usually you will use the well know Ext3-fs but what about the others ?
I will just try to give you some clue about some other common filesystems. The filesystem aspect of your server is really important and your choice will vary with your running application. As exemple, a mail server will have more performances with a Reiserfs filesystem than with Ext3-fs.
I started to write this post many weeks ago and finally publish it even if it’s not totally finish. It is just a little feedback about tuning a full LAMP server with some user traffic and services load. Important thing to notice is that all stuff in this post is NOT THE SOLUTION. You will probably have to tune little more for adapt all this to your personal server usage, server load, development & architecture. So, use those tips as a kind of inspiration instead of an "how to". Don’t forget that when you do such tuning, take care to keep a backup of your previous configuration files.
We will try to tune the following server :
- Current OS : Debian GNU Linux Kernel 2.4.32 ipv4 + GRSEC
- 1Go RAM DDR
- Intel(R) Celeron(R) CPU 2.66GHz
- SWAP 512Mo
- 3Go on / and 226Go on /home
- Running services are Qmail, Bind9, mrtg, Apache 2.2.2, PHP 5.1.4, MySQL 5.0.21
I had to monitor the Raid 5 status of two PE 2650 with a PERC3/Di and running under a GNU Debian. You can get the CLI tool afacli from dell website. Originally it was only available for windows or red-hat and it was necessary to tweak this stuff using Alien software for converting rpm to deb packages.
nicolas@grimm:~$ wget http://linux.dell.com/files/aacraid/afaapps-2.6-0.tar.gz nicolas@grimm:~$ sudo tar -Pvzxf afaapps-2.6-0.tar.gz # Normally you should have a device afa0 created. If not, check that devicename = "aac" in the file /dev/MAKEDEV.afa then do the following step : cd /dev ./MAKEDEV.afa afa0
More information is available on the Dell website
Now that we have a running AFACLI we can do a little script for checking hourly our raid status. Main thing to know with afacli - as lot of other CLI tool - is the HELP command. First you will have to open your device with the command open afa0 then you could check your container list, disk list etc. Due to network constraint I could only use an SSH connection, so for schedule this script I use a special user named xfertuser on each box for doing an SSH KEY AUTH. When my user is logon the remote box, I execute some command on AFACLI and use a simple diff on last afacli log file and the new afacli log file. Then in last step Icheck the messages log for AACRAID error messages.
In my professionnal experience I have to manage many PC running with Windows XP. Those box are used for broadcasting some video flow and download lot of media files which aren’t managed by our software. Naturally, I had to find a solution for dynamically purge the lot of useless media files daily generated. As everyone working in system administration (I suppose...), I didn’t have lot of time for doing this job and our software developper couldn’t add the possibility to destroy old files (still due to lot of projects and short timeline...), so I decide to use the Windows schedule (AT) and doing a batch file.
As we had different software version - and for a maximum flexibility in case of any "kidding" evolution of this software - I take care to use arguments to my script. Here by I’ll describe all the process of this script that can be resume in five parts :
- Get and check our arguments
- Checking some dates (OS date format, maximum vailidity date)
- Parsing the directory to purge and get last access date of files
- Testing date and delete useless files
- Scheduling the batch file