Articles

Internet: Tuning Apache for Maximum Performance

digg delicious technorati blinklist furl reddit

Apache is an open-source HTTP server implementation. It is the most popular web server on the Internet; the December 2005 Web Server Survey conducted by Netcraft [1] shows that about 70% of the web sites on Internet are using Apache.

Apache server performance can be improved by adding additional hardware resources such as RAM, faster CPU, etc. But most of the time, the same result can be achieved by custom configuration of the server. This article looks into getting maximum performance out of Apache with the existing hardware resources, specifically on Linux systems. Of course, it is assumed that there is enough hardware resources – especially enough RAM that the server isn’t swapping frequently. First two sections look into various Compile-Time and Run-Time configuration options. The Run-Time section assumes that Apache is compiled with prefork [1] MPM. HTTP compression and caching is discussed next. Finally, using separate servers for serving static and dynamic contents is covered. Basic knowledge of compiling and configuring Apache and Linux are assumed.

Continue Reading…

Posted by Administrator on Mar 03, 2008

Headless Compaq desktop (boot without a keyboard attached)

digg delicious technorati blinklist furl reddit

Searching for the old Compaq nof1.exe utility (A utility to change a Compaq Desktop to boot without a keyboard attached) I came across the following tip:

1. Set a power on password (under security in the BIOS settings) 2. Go back into security menu and select the new item that appears just below power on password, it’s called password settings or suchlike. 3. Enable Network server mode

Your machine will now boot happily without a keyboard, and in case you wonder also without asking for the password you just set.

The keyboard, if anyone does plug one in, is disabled except during power up when you can still press F10 for setup. Doing so will then lead to a prompt for the password.

I tried the above tip and it works perfectly, for correctness: the “password settings” option in the BIOS is called password options instead of “password settings”.

Posted by Administrator on Jan 14, 2008

Install FreeBSD 7.0 on a ZFS partition

digg delicious technorati blinklist furl reddit

ZFS is an exciting new file system developed by Sun and recently ported to FreeBSD. Many people are excited by the possibilities of ZFS (including us) as it promises to simplify a great many things. It offers:

  • increased reliability through checksums, multiple copies of data and self-healing RAID
  • elimination of that dreaded “oh, if only I’d made the /var partition larger” feeling. Partitions can now be resized at any time and in fact can each be allocated up to the full size of the storage media.
  • built-in compression and encryption
  • built-in NFS file sharing
  • clean, easy to use toolset for creating storage pools, volumes and much more
  • snapshots and rollbacks for backups
Continue Reading…

Posted by Administrator on Jan 01, 2008

Rotating Rails Log Files

digg delicious technorati blinklist furl reddit

taken from: NullIsLove

One of the chores I dislike most is cleaning up and clearing out the log files in my Rails applications. On some of my higher profile sites, I get a lot of spiders probing my applications for security holes. They don’t succeed (knock on wood) but they do fill up my log files with errors.

I finally decided to get smart and get lazy (the two best traits a programmer can have), and I set up automatic log rotation on all of my Rails applications. The idea behind log rotation is simple: make a back up of the current log file, continue logging into a new or cleared log file, and discard log files that are older than a certain date.

Your webserver probably already rotates its own log files. For Apache, they are probably located in /etc/httpd/logs and they are probably rotated weekly. These logs store everything Apache does. Simple webserver stats and traffic analysis tools make use of these log files to show who visits a site when and what pages are viewed.

While it is possible to configure your Rails application to log to your Apache log files, I do not think it is a good practice. It’s much better to give each Rails application its own log file—it will be easier to find important Rails errors, it will keep your Apache logs cleaner and Rails is set up to keep its own logs by default. Fortunately, on a Linux server the built-in logrotate program will make the process super-easy. After the jump, I’ll walk you through the steps to get it set up.

Continue Reading…

Posted by Administrator on Nov 28, 2007

Network cloning a FreeBSD system

digg delicious technorati blinklist furl reddit

On this website I found the following tip:

Cloning a FreeBSD system

Simplifying by assuming a single partition, a secure network, and ucspi-tcp already installed on ORIG

Install fresh hard disk in CLONE, and boot from a FreeBSD rescue floppy.

Rather than installing, go to the “configure” submenu and do “fdisk” and “slice.” Use W Q instead of just Q to quit each one. Install a boot manager just as if you were building a new system.

Go back to the main menu and choose “fixit,” then “live filesystem on CD-ROM.”

Continue Reading…

Posted by Administrator on Nov 28, 2007