Friday, October 7, 2011

The u32 filter


The u32 filter

Overview

The u32 filter allows you to match on any bit field within a packet, so it is in some ways the most powerful filter provided by the Linux traffic control engine. It is also the most complex, and by far the hardest to use. To explain it I will start with a bit of a tutorial.

Thursday, October 6, 2011

U32 tips tricks

Chaining u32 example

# Root rule, for Gigabit interface
tc class add dev ${IFACE} parent 1: classid 1:2 htb rate 950Mbit ceil 950Mbit quantum 1514

# For "other" mac addresses
tc class add dev ${IFACE} parent 1:2 classid 1:3 htb rate 680Mbit ceil 950Mbit quantum 1514
tc qdisc add dev ${IFACE} handle 3: parent 1:3 bfifo limit 3000000

# For "our" mac address
tc class add dev ${IFACE} parent 1:2 classid 1:10 htb rate 260Mbit ceil 260Mbit quantum 1514
tc qdisc add dev ${IFACE} handle 10: parent 1:10 bfifo limit 3000000

# High priority for specific MAC
tc class add dev ${IFACE} parent 1:10 classid 1:20 htb rate 200Mbit ceil 260Mbit quantum 1514
tc qdisc add dev ${IFACE} handle 20: parent 1:20 bfifo limit 3000000

#Create handle 1:

tc filter add dev ${IFACE} protocol ip pref 10 parent 1: u32
tc filter add dev ${IFACE} protocol ip pref 10 parent 1: handle 1: u32 divisor 1

# Filter all traffic to specific MAC to handle 1
tc filter add dev ${IFACE} protocol ip pref 10 parent 1: u32 ht 800:: match u16 0x0800 0xFFFF at -2 match u32 0x23af02ca 0xFFFFFFFF at -12 match u16 0x0004 0xFFFF at -14 link 1:

# Filter traffic of handle 1 (it means to specific MAC)
tc filter add dev ${IFACE} protocol ip pref 10 parent 1: u32 ht 1: match ip sport 22 0xff flowid 1:20
tc filter add dev ${IFACE} protocol ip pref 10 parent 1: u32 ht 1: match ip dport 22 0xff flowid 1:20
tc filter add dev ${IFACE} protocol ip pref 10 parent 1: u32 ht 1: match ip sport 53 0xff flowid 1:20
tc filter add dev ${IFACE} protocol ip pref 10 parent 1: u32 ht 1: match ip dport 53 0xff flowid 1:20
tc filter add dev ${IFACE} protocol ip pref 10 parent 1: u32 ht 1: match ip sport 80 0xff flowid 1:20

# Low priority class for specific MAC
tc class add dev ${IFACE} parent 1:10 classid 1:30 htb rate 60Mbit ceil 260Mbit quantum 1514
tc qdisc add dev ${IFACE} handle 30: parent 1:30 bfifo limit 300000
tc filter add dev ${IFACE} protocol ip pref 100 parent 1: u32 ht 1: match ip dst 0.0.0.0/0 flowid 1:30

#DEFAULT FOR ALL REMAINING
tc filter add dev ${IFACE} protocol ip pref 1000 parent 1: u32 match ip dst 0.0.0.0/0 flowid 1:3

traffic shaping with linux

Examples

This is by no means comprehensive. I may add to this when I get more of a chance. There are Wonder Shaper or the ADSL Bandwidth Management HOWTO. (though I feel that they are inadequate or employ the wrong strategies).

tc, qdiscs, classes, filters, oh my!

tc, the traffic control tool, is used to configure the Linux kernel to accomplish the shaping, scheduling, policing, and dropping of packets.
Each interface by default has a root qdisc. By default, it uses pfifo_fast algorhythm (in our case, it will be configured to use HTB). Think of the root qdisc as the main container that everything resides. Inside the root qdisc, we can classify various types of traffic into classes and attach them to the root handle. After the classes have been defined, filters are used to match and redirect the packets into the right classes.

Wednesday, September 28, 2011

Perbedaan Subdomain, Addon Domain, dan Park Domain


Banyak yang sering menanyakan perbedaan antara Subdomain, Addon Domain, dan Park Domain. Perbedaan antara subdomain, Addon Domain, dan Park Domain sangat jelas sehingga tidak akan membingungkan jika sudah mengerti. Subdomain
Subdomain adalah bagian dari domain utama dan bisa dibuat sebebas mungkin tanpa perlu membeli lagi domain.

Subomain sering digunakan untuk membedakan fungsi atau bagian dari web. Kita ambil contoh saja dari web dapurhosting.com. Dapurhosting.com adalah nama domain dan memiliki beberapa subdomain:
  • blog.dapurhosting.com, blog adalah subdomain yang kami gunakan untuk sebagai web blog kami.
  • secure.dapurhosting.com, secure merupakah bagian dari domain dapurhosting.com dimana akses ke sana telah diberikan fitur secure (SSL) dan digunakan untuk member area.
  • faq.dapurhosting.com, digunakan untuk Frequent Ask Question kami.
nama domainNama Domain Murah
Register nama domain murah, .COM hanya Rp 85.000 dan bisa digunakan di Blogspot. Tersedia juga domain perusahaan, sekolah, pemerintahan.

Addon domain
Addon domain adalah domain yang ditambahkan ke hosting domain utama dan diarahkan ke sub-direktori sebuah website sehingga domain tersebut akan menampilkan isi web dari sub-direktori itu.
Addon domain digunakan kalau ingin menampilkan beberapa web dalam satu hosting.  Dengan fitur ini anda hanya perlu membeli nama domain lagi dan ditambahkan ke hosting anda dan anda akan mempunyai 2 web yang aktif dengan isi berbeda.
Parked domain adalah domain yang diparkirkan ke atas domain utama sehingga pada saat domain tersebut diakses akan menampilkan web domain utama.
Diharapkan dengan artikel ini anda dapat membedakan Subdomain, addon Domain, dan Park Domain.

30x Faster WP-Super Cache Site Speed


I haven't had time to post much the past year, so I wanted to make up for that by publishing an article on a topic that would blow your mind and be something that you could actually start using and really get some benefit out of it. This is one of those articles that the majority of web hosting companies would love to see in paperback, so they could burn it. Now ask yourself, if a webhost makes money based on how much memory, bandwidth, and data used by a customer, what would they not want their customers to do? That's right, they do not want their customers to learn how to minimize and drastically reduce these moneymakers. They get giddy when you complain about slow-site-speed, or that it takes a long time for your site to load, because they have exactly the right answer- upgrade your memory, bandwidth, and data by purchasing a more expensive plan.

Using ReiserFS and Linux


 Introduction

In this article, I'll show you how to get ReiserFS running under a typical Linux distribution. I'll also share lots of technical information on a variety of topics, such as performance considerations and more. Since I'll be covering installation first, I recommend that you read this article in its entirety before following the installation instructions. That way, you'll have all the technical notes in the back of your head as you start getting ReiserFS running on your systems, allowing you to make any necessary adjustments along the way.

Reiser file system for linux


2005-11-17: These are just my personal notes on Reiser file system under linux. Sections of this web page:
useful links
loop-mounting ReiserFS on a linux file


Reiser file system links

linkcomments
namesys.com Includes Reiser v4 file system. See also Reiser4 Transaction Design Document. It seems that SuSE linux 9.0 has Reiser version 3.6. This is probably true also for SuSE linux 9.1. (These observations come from the reiserfs kernel module source in each case.)
See also Getting started with Reiser4 (including FTP URLs for kernel and user-space source) and the reiser fs source download.
reiserfs 2005-5-25: Tutorial at linux planet on 2001-1-22.
Reiser structure 2005-5-25: The structure of the Reiser file system by Florian Buchholz. Now this is more like it! This is the kind of detail I was looking for. Unfortunately, it only deals with Reiser version 3.6. See also Florian's Forensics page.

Using ReiserFS with Linux


File systems and hard drives have always been fascinating to me, ever since I invested way too much money in a large (at the time) 80MB drive for the computer I was using in the early 90s. There's just something neat about blasting big chunks of data back and forth across your bus, reading and writing thousands of files, and doing benchmarks.
Maybe you don't share my infatuation of hard drives and the software that keeps track of files and directories, but you're probably at least a bit interested in keeping your data safe, using your drives efficiently, and squeezing as much performance as possible from your system's meager I/O subsystem.
Yeah, I called it meager. Unless you've got an enormous budget for exotic hardware, your disk I/O subsystem has advanced very little compared to things like your CPU, RAM, and video card. Moore's famous law doesn't apply here, just micro magnetism and advanced manufacturing processes.
Of the commonly used operating systems, Linux® has the most support for different file systems. In this respect, Linux diverges from other UNIX® systems, which have traditionally supported their native file system and the ISO-9660 file system used on standard CD-ROMs. My Fedora Core 4 system has loadable kernel modules for about two dozen kinds of file systems. They exist primarily to provide compatibility. You can plug in a disk from nearly any other system and manipulate it from within Linux. But what if you're adding another disk to your Linux system and don't need to let it speak with Windows®, QNX, Mac OS X, or Minix?
You'll need to know at least a little about some of the common Linux file systems, such as ext2 (second extended file system), ext3 (third extended file system), and ReiserFS 4 (an interesting advanced file system with many exotic features that can improve your system's file handling).

Before you start
If you're not lucky enough to be running a Linux distribution that comes with support for Reiser4 (such as Arch, Linspire, or SUSE), you're going to have to do something that might be painful: rebuild your kernel. Since rebuilding your kernel would be a tutorial of its own, you'll have to find a how-to document for your distribution that leads you through the steps required to rebuild the kernel.
Before you actually start compiling your brand new Linux kernel, you'll also have to visit the Reiser4 home page at Namesys (see Resources) and download the Reiser4 patches appropriate for your kernel. These patches come with instructions for applying them before you configure and compile the kernel.
So you'll be able to create and manipulate Reiser4 file systems, make sure the reiser4progs package is installed. Again, if your distribution doesn't have the resier4progs, see the Namesys site for downloads (see Resources).
If you want to experiment with Reiser4 easily, an excellent Gentoo Linux Live CD is available with Reiser4 support. See the Resources section for a link.

Linux file systems
Back in the early days of Linux (late 1993, in fact), only one file system was supported by the kernel, a port of the rather minimal Minix file system. This had several shortcomings, including 14-character filenames and a mere 64MB as the maximum file system size. It didn't even support the full set of UNIX file system attributes, specifically the full set of creation, modification, and access time stamps required for a conforming POSIX (Portable Operating System Interface) file system.
Because of the limitations of the Minix file system, work on a replacement file system began and resulted in the addition of a Virtual Filesystem (VFS) abstraction layer, which would make it easier to write file systems for Linux. Using the new VFS, the Minix file system was extended to allow longer filenames and larger file systems (up to two gigabytes). This became the extended file system (ext), but it still had several limitations.
The solution was the ext2, which is still used on many systems, and was the default Linux file system for quite a while. The ext2 file system was improved by the addition of journalling, which created the ext3 file system as its successor.
Before any of the other journaled file systems were usable under Linux, ReiserFS (also known as the Reiser3 file system) was the first advanced file system for Linux that had support for journalling and more efficient disk usage. Its successor, Reiser4, is a complete redesign and rewrite, focusing on extensibility, security, and performance, while maintaining your data safely and efficiently. Reiser4 isn't integrated with the Linux 2.6 kernel yet, which is usually a sign of possible instability or other reasons to tread carefully. Remember to always back up your important data, regardless of which file system you're using.
Let's take a quick look at the ext2, ext3, and Reiser4 file systems.
The traditional: ext2
The ext2 file system, Linux's default file system, is a traditional UNIX file system (that is, based on Berkeley's Fast Filesystem, FFS). It has a maximum filename length of 255 characters and a theoretical maximum file system size of four terabytes. (Linux's block device driver limits this to "just" 2047 gigabytes; let me know when I can buy a single hard drive with that much storage space).
Because of its ubiquity, ext2 drivers have been created for Windows and Mac OS X, letting you read and write an ext2 file system directly from those operating systems, making it an excellent format for shared devices, such as portable hard drives.
The ext2 file system supports all of the standard UNIX features:
  • Owner user ID and group ID.
  • Mode bits controlling user, group, and other permissions and operating system flags.
  • Storage for entry creation, modification, and access times (although most systems run with access time tracking turned off to improve performance at the cost of pure POSIX 1003.1 compatibility).
The major drawback for ext2 file systems is that hard drives have become much larger since it was originally designed. A system crash or power failure requires a file system check with fsck, which takes ages on modern disks with lots of directories and files.
Traditional, but journaled: ext3
The ext3 file system for Linux is the new default file system for most popular distributions. Compared to ext2, it adds:
  • A metadata journal, to ensure that your file system structures are always in a valid state. This (mostly) removes the need for a lengthy fsck session after a system crash or power failure.
  • Hashed tree directory indexes, to speed up access times for large directories.
  • Online file system resizing and the ability to upgrade to ext3 from ext2 without reformatting the drive.
  • Larger maximum file and file system sizes (two and 32 terabytes, respectively).
Although ext3 isn't as fast, or scalable, as its competitors (such as Reiser3 or SGI's excellent XFS), its compatibility with ext2 makes it attractive because of the large number of mature ext2 maintenance and administration utilities.
The Batmobile option: Reiser4
While the Reiser3 file system gained some popularity because of its speed and journalling support (it's the default file system for a number of Linux distributions, even today), its designer wasn't satisfied. The Reiser4 rewrite grew out of this and added some additional interesting features:
  • Efficient journalling through wandering logs.
  • Efficient support of small files, in terms of disk space and speed.
  • Fast handling of very large directories with hundreds of millions of files (yes, millions of files in a single directory without affecting performance).
  • Flexible plug-in infrastructure at the source level, which allows easy addition of compression and encryption at some point in the future.
  • Atomic file system modification, ensuring that the on-disk file system is always in a valid state.
  • Dynamically optimized disk layout through allocate-on-flush.
  • Support for database-like file system transactions.
But wait, why did I call it the Batmobile option? Reiser4 supports lots of interesting features that you might never need to take advantage of and some that you can't even access, because Linux's VFS layer doesn't expose the functionality -- much like how the Batmobile has all kinds of features you're not going to need on your way to the office.

Getting started with Reiser4
Before you can do anything interesting with the Reiser4 file system, you'll need to format a partition with it. As you can see from Figure 1, I have a spare partition just waiting to be used for this purpose:

Figure 1. A partition waiting to be formatted
A partition waiting to be formatted
You need to create a new Reiser4 file system on this partition as well as get it mounted.
Creating a Reiser4 file system
To create the file system, you'll log in as root (or use the sudo command to masquerade as root) and use the mkfs.reiser4 command:
/sbin/mkfs.reiser4 -L myLabel /dev/hda1

This command creates a Reiser4 file system on the specified partition (/dev/hda1 in my case) with a label of "myLabel" and a random unique identifier, as seen in Figure 2.

Figure 2. Creating the Reiser4 file system
Creating the Reiser4 file system
A fresh, clean Reiser4 file system awaits us! Let's mount it, so you can actually use it.
Getting it mounted
To mount the new file system, you'll log in as root (or use the sudo command to masquerade as root) and use the mkdir and mount commands:
mkdir /mnt/reiser4
mount /dev/hda1 /mnt/reiser4

Use mkdir first to create a mount point, then use mount to mount the device containing the file system at the mount point you just created.
You can use the mount command without any arguments to get a list of the currently mounted file systems, which should now include your new Reiser4 file system (see Figure 3).

Figure 3. Mounted file systems, including Reiser4
Mounted filesystems, including Reiser4
Now that you've got your new file system mounted, you should make sure the system can mount this file system automatically.
Automatically mounting the file system
To let the system automatically mount your new Reiser4 volume, you need to describe it in the /etc/fstab file.
As root (or using sudo to masquerade as root), edit /etc/fstab using your favorite text editor and add the text from the following code at the bottom:
/dev/hda1    /mnt/reiser4    reiser4    defaults    0 0

In /etc/fstab, you'll want to use the appropriate device and mount point for your file system. After the device and mount point, you specify the file system type and file system options (defaults is usually best, unless you really know what you're doing and you can find good documentation for your file system). The last two options are for the "dump frequency" and "pass number on parallel fsck", which are needed for historical reasons.
You can test to see if you've edited /etc/fstab correctly by unmounting the file system and telling the mount command to mount everything automatically:
umount /mnt/resier4
mount -a

Now when you use the mount command without any arguments, it should look exactly the same as it did before (Figure 3). Your new Reiser4 file system will automatically be mounted at boot time, along with the rest of your file systems.

Tweaking performance and behavior
Like most other Linux file systems, Reiser4 responds to some options that can improve its overall performance and modify its behavior. These options can be passed on the mount command line using the -o option, as seen in the following code:
mount -t reiser4 -o option1,option2,...,optionn /dev/hda1 /mnt/reiser4

Several file system options can be included in the command by separating them with commas.
So they're picked up at boot time, file system options can also be included in the /etc/fstab file:
/dev/hda1    /mnt/reiser4    reiser4    option1,option2,...,optionn    0 0

The most common options include:
  • defaults -- The default Linux file system settings. This is the same as specifying rw,suid,dev,exec,auto,nouser,async directly. The file system will be mounted in read-write mode, set-UID bits will be honored, character or block special devices on the file system are treated normally, binaries can be executed, the file system can be auto-mounted, and all I/O is done asynchronously, respectively.
  • noatime -- Don't update the access time field when files or directories are read. This isn't strictly POSIX behavior, but it can speed up file system operations significantly, especially on file systems with a large number of directories and files that are mostly read from instead of being written to.
  • noexec -- Don't run binaries from this file system. It's treated as a data-only file system, which can be handy if you don't entirely trust the source of the files or executables found there.
  • nosuid -- Ignore the set-user-ID and set-group-ID bits on files stored in this directory; again, a safety feature if you don't trust the source of the files.
  • ro -- The file system is mounted read-only. Attempts to write to a file or create a new file or directory will fail.
  • data=journal -- Instead of writing only file system metadata to the journal, all data is journaled before being written out to the file system. This ensures data integrity in the event of a disaster, but seriously reduces write performance.
Using the defaults is generally what you want, but adding noatime to the mix can safely help speed things up. The data=journal option might be a good idea for an important CVS server or a file system used for making backups, because having valid data is much more important than raw throughput.

Summary
Adding a file system to your Linux setup can be daunting, especially when you want to try out one of the many different file systems supported by Linux. Knowing about the features and design limitations of the popular file systems helps you to choose wisely.
Reiser4 should still be considered experimental (even though many people are using it without problems), because it hasn't been accepted into the Linux kernel yet. The folks at Namesys are working hard to make their code part of the kernel, so it's only a matter of time before distributions start appearing based on Reiser4.
After creating your new file system with the appropriate mkfs command, mounting it with the mount command (and adding it to the /etc/fstab file) allows you to begin working with the file system. After that, remember to always back up your important data regularly instead of when a hard drive fails.

Resources
Learn
http://www.ibm.com/developerworks/aix/library/au-unix-reiserFS/

Maximizing Performance


This article is a retrospective analysis and basic rundown about gaining performance in Arch Linux.

Contents

[hide]

What is fstab and why it's useful


fstab is a configuration file that contains information of all the partitions and storage devices in your computer. The file is located under /etc, so the full path to this file is /etc/fstab.
/etc/fstab contains information of where your partitions and storage devices should be mounted and how. If you can't access your Windows partition from Linux, aren't able to mount your CD or write to your floppy as a normal user, or have problems with your CD-RW, you probably have a misconfigured /etc/fstab file. So, you can usually fix your mounting problems by editing your fstab file.
/etc/fstab is just a plain text file, so you can open and edit it with any text editor you're familiar with. However, note that you must have the root privileges before editing fstab. So, in order to edit the file, you must either log in as root or use the su command to become root.

fstab

The /etc/fstab file contains static filesystem information. It defines how storage devices and partitions are to be mounted and integrated into the overall system. It is read by the mount command to determine which options to use when mounting a specific device or partition.

Contents

[hide]

Net ethicque

If you're reading this document because you need help, and you walk away with the impression you can get it directly from the authors of this document, you are one of the idiots we are talking about. Don't ask usquestions. We'll just ignore you. We are here to show you how to get help from people who actually know about the software or hardware you're dealing with, but 99.9% of the time that will not be us. Unless you know for certain that one of the authors is an expert on what you're dealing with, leave us alone and everybody will be happier.

http://catb.org/~esr/faqs/smart-questions.html

Tuesday, September 27, 2011

What Your Computer Does While You Wait


This post takes a look at the speed – latency and throughput – of various subsystems in a modern commodity PC, an Intel Core 2 Duo at 3.0GHz. I hope to give a feel for the relative speed of each component and a cheatsheet for back-of-the-envelope performance calculations. I’ve tried to show real-world throughputs (the sources are posted as a comment) rather than theoretical maximums. Time units are nanoseconds (ns, 10-9 seconds), milliseconds (ms, 10-3 seconds), and seconds (s). Throughput units are in megabytes and gigabytes per second. Let’s start with CPU and memory, the north of the northbridge:

Calculate IOPS in a storage array


Takeaway: What drives storage performance? Is it the iSCSI/Fiber Channel choice? The answer might surprise you. Scott Lowe provides insight into IOPS.
When it comes to measuring a storage system’s overall performance, Input/Output Operations Per Second (IOPS) is still the most common metric in use. There are a number of factors that go into calculating the IOPS capability of an individual storage system.
In this article, I provide introductory information that goes into calculations that will help you figure out what your system can do. Specifically, I explain how individual storage components affect overall IOPS capability. I do not go into seriously convoluted mathematical formulas, but I do provide you with practical guidance and some formulas that might help you in your planning. Here are three notes to keep in mind when reading the article:

Analyzing I/O Performance In Linux


Monitoring and analyzing performance is an important task for any sysadmin. Disk I/O bottlenecks can bring applications to a crawl. What are IOPS?  Should I use SATA, SAS, or FC? How many spindles do I need? What RAID level should I use? Is my system read or write heavy? These are common questions for anyone embarking on an disk I/O analysis quest. Obligatory disclaimer: I do not consider myself an expert in storage or anything for that mater. This is just how I have done I/O analysis in the past. I welcome additions and corrections. I believe it’s also important to note that this analysis is geared toward random operations than sequential read/write workloads.

Understanding Disk I/O - when should you be worried?


If you’re old enough to remember floppy drives, you’ve heard the symptoms of a disk I/O bottleneck. For example, while Oregon Trail loaded the next scene, you’d hear the drive grinding away, reading data from the disk. The CPU would sit idle during this time, twiddling its fingers waiting for data. If that floppy drive was faster, you’d be running the Columbia River rapids by now.
It’s more difficult to detect an I/O bottleneck if the disk isn’t on your desktop. I’ll look at four important disk I/O questions for web apps:
  • Do you have an I/O bottleneck?
  • What impacts I/O performance?
  • What’s the best path to fixing an I/O bottleneck?
  • How do you monitor disk I/O?

Improving Hard Disk Performance with hdparam


Nowadays the IDE devices already have a high transfer rate (by UltraDMA technology), but there are still other ways to improve your hard-disks performance and we'll show how to do it with the hdparm utility.

1. Introduction

hdparm is an utility which provides us a powerful tunning control over HDs (HD PARaMeters) and this is what we'll be discussing in this document. Sometimes your HD is set not to use its maximum power as it could and that's why you may get anoyed with its performance. With hdparm we can magically change this to reach its maximum performance using all of its features.

Graphing Linux Disk I/O statistics with Munin


After discovering the level of insight you can gain into Linux systems with the "new" Disk I/O statistics as provided byiostat I wondered why there weren't any sane munin plugins which utilize this data, since this ought to be very easy task to accomplish.
Having a few days to kill (being down with stomach flu back then) I decided to write a plugin on my own. I'll provide an annotated example of what the data looks like and why having this kind of information is A Good Thing.

An example

Imagine you run a public server which offers data over HTTP, FTP and rsync. The utilization looks fine and there's ample room to grow. But one day, those crazy germans1 decide to release a new version of OpenSUSE and things suddenly look quite different.
1 No offense meant, it's just that me growing up with british & american media shows it's first signs ;).

Google Performance Tools


Version 0.5 (last updated Fri Mar 11 05:58:27 PST 2005) of the google-perftools has the following 4 tools:
* thread-caching malloc
* heap-checking using tcmalloc
* heap-profiling using tcmalloc
* CPU profiler
The tool claims "The fastest malloc we've seen; works particularly well with threads and STL. Also: thread-friendly heap-checker, heap-profiler, and cpu-profiler."  They work on Linux 9 and C++ programs.  In the README it claims that Google is porting it to Windows but no clear date when that will happen.  The tcmalloc library performance is impressive, and the CPU profiler works great, especially the display of the output.
To download, go to http://sourceforge.net/projects/goog-perftools.  To install, read the INSTALL file in the unzipped directory.  Here is the main section on installation.  If you are running on Linux 2.6.x kernel, there are RPMs ready to install (without having to compile):

squid cache dir


Squid-1.0 used 100 first-level directories for each 'cache_dir'. For very large caches, this meant between 5,000-10,000 files per directory, which isn't good for performance on any unix system. As well as the directory search times being slow, the amount of disk traffic due to directory operations was quite large (due to directory fragmentation (variable length filenames) each directory was about 100k in size).

Sunday, September 25, 2011

Hardware Detection in Linux - dmesg, lspci and lsusb Explained

Want to find out how you can see all the hardware connected to your system using the Linux command-line? Or want to find out where that USB storage drive is mounted? In this article, we take a look at a few commands that can help you troubleshoot and identify hardware on your system

Saturday, September 24, 2011

Make Windows XP Blazingly Fast

I've been using Windows since before "Windows for Workgroups 3.x" and have used most of the Windows releases since, on a wide variety of cheaper than cheap computers and platforms that are slower than slow. I'm always interested in new ways to maximize speed and over the years I've picked up quite a few little tips on how to max out your Windows PC. I am not fond of being forced to use MS, and am not a MS expert, so I hope all you Windows peeps will share your tips with us.. And some of these tips can crash your machine if you don't know what you are doing.

Windows Optimization – Intense Part II

This is part 2 of my Windows XP Optimization article: Make Windows XP Blazingly Fast.
The first article was meant as a detailed and thorough introduction to speeding up Windows-based PC's in a way that makes it easy to follow, without getting too specific. So make sure you read that first, and pay the most attention to freeing up RAM, CPU, and Disk IO speed by reducing the number of services and processes that are running, we will deal with defragmentation, hard-drive speed, Disk IO, Prefetching, and Pagefile/Registry Defragmentation now.
This article has some really really really great stuff for ya. It shows which tools (all but one completely free) are the best and you will use them for a long time, they are all very good. That is just a side benefit, as this article is really more of a step-by-step guide to optimizing your system that won't have to be repeated for at least a year. The result of course is a much more responsive PC.

Optimizing Servers and Processes for Speed with ionice, nice, ulimit

Ok, sup. I really felt I had to get this out of the way, because I have a whole stack of drafts waiting to be published, but I realized that not many people will benefit from all the advanced optimizations and tricks I'm writing unless they get a basic understanding of some of the tools I'm using. I decided to write a series of articles explaining how I optimize servers for speed because lately I've been getting a lot more people wanting to hire me to do that. I take on projects when I can but there is clearly a need out here on the net for some self-help. The momentum is swinging more and more towards VPS type of web hosting, and I would say that 99% of those customers are getting supremely ripped off, which goes against the foundation of the web.
Keep in mind that this blog and my research is only a hobby of mine, my job is primarily marketing and sales, so I'm not some licensed expert or anything, or even an unlicensed expert! haha. But it does bother me that those who are tech-savvy enough to run web-hosting companies are happily ripping people off. So this article details the main tools that are used to speed up and optimize your machine by delegating levels of priority to specific processes. Future articles will use these tools alot, so this is meant as an intro.