Sampling Is Simple

Thursday, December 14, 2006
FileSystems in Squid

The cache_dir type in Squid has nothing to do with the underlying filesystem type, it defines the storage method / implementation.

Currently Squid has 4 different implementations:
ufs :- On top of a normal filesystem supporting directories and files.
aufs :- As "ufs", but using threads to implement non-blocking disk I/O
diskd :- As "ufs", but using a separate process to implement non-blocking disk I/O
coss :- An experimental "raw" filesystem, where all objects are stored in one big file.
Other storage methods are being worked upon

Kind of diskd is designed to work around the problem of blocking IO in a unix process. async ufs gets around this by using threads to complete disk IO. diskd uses external processes to complete disk IO.

Asyncufs works just that little bit faster, but only works on systems where threads can do async disk IO without blocking the main process. Systems with user-threads (eg FreeBSD) can not use this effectively. Diskd, being implemented as an external process, gets around this. If cache is slightly active, then the difference cannot be noticed. diskd/aufs are only useful when the cache is under high load.

In case it was not clear, asyncronous I/O (diskd/aufs) is beneficial for single drive configurations with "higher" request loads, in many cases allowing you to push about 100% more I/O thru the drive before latency creeps up too high.

For multiple drive configurations, it is almost a requirement to be able to use the I/O capacity of the extra drives. Without it, a multiple disk configuration is effectively limited to almost the speed of a single disk configuration. With asyncronous I/O, the disk I/O scales quite well (at least for the first few drives, other limits gets very apparent when you have more than ~3 drives).

posted by realme @ 4:38 PM   0 comments
Monday, December 11, 2006
What Is SQUID ??
Squid is :

- a full-featured Web proxy cache
- designed to run on Unix systems
- free, open-source software
- the result of many contributions by unpaid (and paid) volunteers
- licensed under the terms of the GNU General Public License

Squid supports :

Cache content:
1. proxying and caching of HTTP, FTP, and other URL's
2. proxying for SSL
3. caching of DNS lookups
Cache mechanism:
1. cache hierarchies, Cache Digests
2. ICP, HTCP, CARP, WCCP
3. transparent caching
4. HTTP server acceleration

Extra services:

extensive access controls, SNMP

Good For Caching :

1. Big memory cache space and high-speed network
2. Use the best disk access methods for the OS

Best choice of squid

1. FreeBSD+DISKD
2. (570 req/sec, avg. response time 6.4 sec)
3. Squid is good enough for TANet traffic using.
posted by realme @ 4:23 AM   0 comments
Thursday, December 07, 2006
Crontab

crontab (cron table)

Schedule a command to run at a later time

SYNTAX
crontab [ -u user ] file
crontab [ -u user ] { -l | -r | -e }

Key
-l List - display the current crontab entries.

-r Remove the current crontab.

-e Edit the current crontab using the editor specified by the
VISUAL or EDITOR environment variables.
After you exit from the editor, the modified crontab will be installed automatically.

Crontab is the program used to install, deinstall or list the tables used to drive the cron daemon in Vixie Cron.
Each user can have their own crontab, and though these are files in /var, they are not intended to be edited directly.

If the -u option is given, it specifies the name of the user whose crontab is to be tweaked. If this option is not given, crontab examines "your" crontab, i.e., the crontab of the person executing the command. Note that su can confuse crontab and that if you are running inside of su you should always use the -u option for safety's sake.


cron file is used to install a new crontab from some named file or standard input if the pseudo-filename `-' is given.

Each line in the cron table follows the following format: 7 fields left to right

FieldMeaning
1Minute (0-59)
2Hour (2-24)
3Day of month (1-31)
4 Month (1-12, Jan, Feb, ...)
5 Day of week (0-6) 0=Sunday, 1=Monday ...
or Sun, Mon, Tue, Wed, Thur, Fri
6User that the command will run as
7Command to execute

There are several ways of specifying multiple values in a field:

• The comma (',') operator specifies a list of values, for example: "1,3,4,7,8"
• The dash ('-') operator specifies a range of values, for example: "1-6", which is equivalent to "1,2,3,4,5,6"
• The asterisk ('*') operator specifies all possible values for a field. e.g. every hour or every day.

There is also an operator which some extended versions of cron support, the slash ('/') operator, which can be used to skip a given number of values. For example, "*/3" in the hour time field is equivalent to "0,3,6,9,12,15,18,21"; "*" specifies 'every hour' but the "/3" means that only the first, fourth, seventh...and such values given by "*" are used.

Cron will email to the user all output of the commands it runs, to silence this, redirect the output to a log file or to /dev/null

Example

Run /usr/bin/somecommand at 12.59 every day and supress the output (redirect to null)

59 12 * * * simon /usr/bin/somecommand >> /dev/null 2>&1

Permissions
If the allow file exists, then you must be listed therein in order to be allowed to use this command. If the allow file does not exist but the deny file does exist, then you must not be listed in the deny file in order to use this command. If neither of these files exists, then depending on site-dependent configuration parameters, only the super user will be allowed to use this command, or all users will be able to use this command.

"Wisdom is the power to put our time and our knowledge to the proper use" - Thomas J. Watson

posted by realme @ 1:04 AM   0 comments
Writing is Difficult things but Copy Paste is Easy one, so what do want to choose?? Up to You...
About Me

Name: realme
Home:
About Me:
See my complete profile
Previous Post
Archives
The Note

Life like A Bird, free for flaying around the word.

Links
Powered by

Free Blogger Templates

BLOGGER