Artikel getaggt mit location

Linux – Speed up your filesystem by upto 50 %

Every time a file is read from your Linux ext3 partition it writes back a attribute to the file detailing the last access time. There are very few programs that actually use this to operate and it slows everything down.

Disabling atime and diratime on your Linux ext3 file systems can improve disk performance up to 40%!

WARNING: If you are using programs such as tmpwatch, mutt, or mail-notify this configuration change could cause those programs that make specific use of atime not to work.

  1. Start a terminal.
  2. Switch to root using the “su -” command.
  3. Backup your fstab – “cp /etc/fstab /etc/fstab.old”.
  4. Open your /etc/fstab in the editor of your choice (nano, kate or gedit recommended). This can be done by issuing the command “nano /etc/fstab”, “kate /etc/fstab”, or “gedit /etc/fstab”.
  5. Locate the partitions that contain your / and /home file systems, as well as any other file system you want to optimize. Examples include /dev/hda2 and /dev/hda3, or /dev/sda2 and /dev/sda3.
  6. In the fourth section (just before the two numbers at the end of the line) you will see the options section of the fstab.
  7. Enter “,noatime,nodiratime” after the existing options for each partition you wish to optimize.
  8. Save the fstab file.
  9. Reboot.

Enjoy your newly optimized Linux ext3 file system.

Tags: , , , ,

Simple PHP redirect Script.

Php redirection is the easiest way of setting up a redirection on a page that no longer exists or taking users to a page that you want them to view when they go to a certain page.

The things that must be given importance while PHP redirecting are browser compatibility and compactness of the code itself.

<?php

header( ‘Location: http://www.yoursite.com/new_page.html’ ) ;

?>

Change the code on the redirect page to be simply this. You need to replace the URL above with the URL you wish to direct to.

Be sure that you do not have any text sent to the browser before this, or it will not work. Your safest bet is to simply remove all content from the page but the redirect code

Tags: , , , ,