RE: [squid-users] Squid limits and hardware spec

2005-03-01 Thread William Stucke
Marji said; -

> maximum_object_size 200 MB
> Mean Object Size: 22.54 KB

Compare this with the “conventional wisdom” of an average object size of
13 - 15 KB.

Large images, software downloads and CDs are all increasing the average
object size. I run a small ( 27 GB, non squid) proxy with an average object
size of 24 KB.


Kind regards,

William Stucke
ZAnet Internet Services (Pty) Ltd
+27 11 465 0700
[EMAIL PROTECTED]



Re: [squid-users] Squid limits and hardware spec

2005-01-15 Thread Daniel Navarro
Hi all,

Also concerned about my performance I think you could
consider bandwidth limits, I found a good bandwidth
monitorin utility for linux I use on Fedora Club 3.

bwm-ng

cheers, Daniel Navarro
Maracay, Venezuela
www.csaragua.com/ecodiver

 --- Martin Marji Cermak <[EMAIL PROTECTED]> escribió: 
> Hello Ow at Neuromancer :-) and all Squid guys,
> I promised to post here my Squid results.
> 
> I am trying to find out what a single Squid box can
> do - I have 3200 
> unique IPs and 240 HTTP requests per second during
> peek time.
> I hande this load with one box, using WCCP to get
> the traffic to Squid 
> (so it is a transparet proxy - the evil thing :-).
> 
> My goal is to achive maximum BYTE hit ratio.
> 
> USED HARDWARE:
> server:IBM x305
> Processor: P4 2.8GHz
> Memory:4 GB (you can switch the swap off)
> Hardisk:   2 x 36GB 10 RPM, 2 x 73 15 RPM scsi
> disks
> Controler: IBM 71P8594 Kendall Card Option
>  adapter>
> Hardisk for logs: IDE 7200, DMA
> Ethernet card: Broadcom TG3
> 
> OS: Linux Debian/woody, kernel 2.4.25, tproxy, wccp
> 
> Unfortunately, I do not have enough clients to reach
> the box limits.
> But I can see that my median HIT time triples during
> peak time, which 
> probably means a disk bottleneck. But it will be the
> log disk, because I 
> use an IDE disk for log (with log_mime_header on, so
> I get an 500 MB 
> acccess.log per hour). And also the DNS server (see
> below) - DNS 
> responses are longer during peak time.
> 
> I know it is not good to combine different disk (15
> rpm and 10 rpm), but 
> I had no choice.
> 
> Maximum performance I have achived (MRTG stats gaind
> by SNMP from squid):
> 
> Client HTTP Requests per second: 220
> Server Requests per second: 210
> Server In 1600 kBytes/s
>(amount of traffic read from origin WWW servers)
> System load: 3, occasionally rises to 10 and I don't
> know why
> HTTP Out: 2000 kBytes/s
>(amount of traffic written to clients)
> HTTP Hits per second: 110
> Squid generated Error Pages: 2 errors per second
> Total accounted memory in GRI: 830 MB
> Storage disk size: 164 GB
> Storage Mem Size: 200 MB
> HTTP I/O Number of Reads: 300 reads/sec
> Number of Clients Accessing Cache: 3200
>(unique IPs since Squid started)
> HTTP all service time: 150 ms
> HTTP miss service time: 490 ms
> HTTP Near Miss Service Time: 8 ms
> HTTP hit service time: 30 ms (average is 10 ms)
> Byte Hit Ratio: 20% (heap LFUDA)
> Request Hit Ratio: 64% (49% average)
> Disks: 800 writes per second
> Log disk (IDE - the bottleneck): 500 writes per sec
> DNS service time: 70 ms (bottleneck)
> 
> Configuration (squid.conf)
> maximum_object_size 200 MB
> cache_mem 200 MB
> cache_replacement_policy heap LFUDA
> log_mime_hdrs on
> store_avg_object_size 22 KB
> store_dir_select_algorithm round-robin
>(if least-load, it does not distribute the load
> properly)
> cache_dir aufs /squidcache/cache1 28000 60 256
> cache_dir aufs /squidcache/cache2 56000 60 256
> cache_dir aufs /squidcache/cache3 28000 60 256
> cache_dir aufs /squidcache/cache4 56000 60 256
> 
> 
> Please notice that I encoutered a DNS issue.
> Squid generated more requests per second (500?) than
> the DNS server was 
> able to accept (200?). My coleague administrator had
> to recompile it and 
> icrease the number. From this point, the squid
> performance has been 
> better in peak time. The HIT service time does not
> tripple, but double 
> only during peak time.
> 
> 
> Another important think:
> I had to renice all standard linux maintenance
> programs, e.g. in 
> /etc/crontab:
>/usr/bin/nice -n 19 run-parts --report
> /etc/cron.daily
> 
> these tasks had negative impact to Squid.
> Especially: /etc/cron.daily/standard
>  and /etc/cron.daily/find
> (see /etc/checksecurity.conf
>   and /etc/updatedb.conf
> - don't let find crawl through cache dirs)
> 
> 
> Some stats from my cachemgr page follow.
> I did not take them in the real peak time,
> unfortunately, but it was 
> close to :-)
> 
> 
> I am happy to post more details if someone is
> interested in.
> 
> Best regards,
> have a nice weekend,
> 
> Marji
> 
> 
> 
> 
> Connection information for squid:
>   Number of clients accessing cache:  2925
>   Number of HTTP requests received:   13830996
>   Number of ICP messages received:0
>   Number of ICP messages sent:0
>   Number of queued ICP replies:   0
>   Request failure ratio:   0.00
>   Average HTTP requests per minute since start:
> 5128.4
>   Average ICP messages per minute since start:0.0
>   Select loop called: 38791775 times, 4.171 ms avg
> Cache information for squid:
>   Request Hit Ratios: 5min: 54.0%, 60min: 52.2%
>   Byte Hit Ratios:5min: 23.5%, 60min: 24.7%
>   Request Memory Hit Ratios:  5min: 4.9%, 60min: 6.5%
>   Request Disk Hit Ratios:5min: 25.2%, 60min: 26.2%
>   Storage Swap size:  16133865

Re: [squid-users] Squid limits and hardware spec

2005-01-14 Thread Henrik Nordstrom
On Fri, 14 Jan 2005, Martin Marji Cermak wrote:
probably means a disk bottleneck. But it will be the log disk, because I use 
an IDE disk for log (with log_mime_header on, so I get an 500 MB acccess.log 
per hour).
I seriously dout IDE would be a source of a bottleneck here.. Reasonably 
modern IDE easily gives transfer rates at least in the range of 
30MB/second. Just make sure DMA is enabled (usually is, but use hdparm to 
make sure).

What IDE is poor on compared to SCSI is seeks, but there is barely any 
seeks in access.log writing.

Very interesting stats btw.
Regards
Henrik


Re: [squid-users] Squid limits and hardware spec

2005-01-14 Thread Martin Marji Cermak
Hello Ow at Neuromancer :-) and all Squid guys,
I promised to post here my Squid results.
I am trying to find out what a single Squid box can do - I have 3200 
unique IPs and 240 HTTP requests per second during peek time.
I hande this load with one box, using WCCP to get the traffic to Squid 
(so it is a transparet proxy - the evil thing :-).

My goal is to achive maximum BYTE hit ratio.
USED HARDWARE:
server:IBM x305
Processor: P4 2.8GHz
Memory:4 GB (you can switch the swap off)
Hardisk:   2 x 36GB 10 RPM, 2 x 73 15 RPM scsi disks
Controler: IBM 71P8594 Kendall Card Option
   
Hardisk for logs: IDE 7200, DMA
Ethernet card: Broadcom TG3
OS: Linux Debian/woody, kernel 2.4.25, tproxy, wccp
Unfortunately, I do not have enough clients to reach the box limits.
But I can see that my median HIT time triples during peak time, which 
probably means a disk bottleneck. But it will be the log disk, because I 
use an IDE disk for log (with log_mime_header on, so I get an 500 MB 
acccess.log per hour). And also the DNS server (see below) - DNS 
responses are longer during peak time.

I know it is not good to combine different disk (15 rpm and 10 rpm), but 
I had no choice.

Maximum performance I have achived (MRTG stats gaind by SNMP from squid):
Client HTTP Requests per second: 220
Server Requests per second: 210
Server In   1600 kBytes/s
  (amount of traffic read from origin WWW servers)
System load: 3, occasionally rises to 10 and I don't know why
HTTP Out: 2000 kBytes/s
  (amount of traffic written to clients)
HTTP Hits per second: 110
Squid generated Error Pages: 2 errors per second
Total accounted memory in GRI: 830 MB
Storage disk size: 164 GB
Storage Mem Size: 200 MB
HTTP I/O Number of Reads: 300 reads/sec
Number of Clients Accessing Cache: 3200
  (unique IPs since Squid started)
HTTP all service time: 150 ms
HTTP miss service time: 490 ms
HTTP Near Miss Service Time: 8 ms
HTTP hit service time: 30 ms (average is 10 ms)
Byte Hit Ratio: 20% (heap LFUDA)
Request Hit Ratio: 64% (49% average)
Disks: 800 writes per second
Log disk (IDE - the bottleneck): 500 writes per sec
DNS service time: 70 ms (bottleneck)
Configuration (squid.conf)
maximum_object_size 200 MB
cache_mem 200 MB
cache_replacement_policy heap LFUDA
log_mime_hdrs on
store_avg_object_size 22 KB
store_dir_select_algorithm round-robin
  (if least-load, it does not distribute the load properly)
cache_dir aufs /squidcache/cache1 28000 60 256
cache_dir aufs /squidcache/cache2 56000 60 256
cache_dir aufs /squidcache/cache3 28000 60 256
cache_dir aufs /squidcache/cache4 56000 60 256
Please notice that I encoutered a DNS issue.
Squid generated more requests per second (500?) than the DNS server was 
able to accept (200?). My coleague administrator had to recompile it and 
icrease the number. From this point, the squid performance has been 
better in peak time. The HIT service time does not tripple, but double 
only during peak time.

Another important think:
I had to renice all standard linux maintenance programs, e.g. in 
/etc/crontab:
  /usr/bin/nice -n 19 run-parts --report /etc/cron.daily

these tasks had negative impact to Squid.
Especially: /etc/cron.daily/standard
and /etc/cron.daily/find
(see /etc/checksecurity.conf
 and /etc/updatedb.conf
- don't let find crawl through cache dirs)
Some stats from my cachemgr page follow.
I did not take them in the real peak time, unfortunately, but it was 
close to :-)

I am happy to post more details if someone is interested in.
Best regards,
have a nice weekend,
Marji

Connection information for squid:
Number of clients accessing cache:  2925
Number of HTTP requests received:   13830996
Number of ICP messages received:0
Number of ICP messages sent:0
Number of queued ICP replies:   0
Request failure ratio:   0.00
Average HTTP requests per minute since start:   5128.4
Average ICP messages per minute since start:0.0
Select loop called: 38791775 times, 4.171 ms avg
Cache information for squid:
Request Hit Ratios: 5min: 54.0%, 60min: 52.2%
Byte Hit Ratios:5min: 23.5%, 60min: 24.7%
Request Memory Hit Ratios:  5min: 4.9%, 60min: 6.5%
Request Disk Hit Ratios:5min: 25.2%, 60min: 26.2%
Storage Swap size:  161338652 KB
Storage Mem size:   204820 KB
Mean Object Size:   22.54 KB
Requests given to unlinkd:  0
Median Service Times (seconds)  5 min60 min:
HTTP Requests (All):   0.08265  0.10281
Cache Misses:  0.46965  0.46965
Cache Hits:0.01309  0.01164
Near Hits: 0.42149  0.42149
Not-Modified Replies:  0.00678  0.00562
DNS Lookups:   0.01609  0.01464
ICP Queries:   0.0  0.0
Resource usage for squid:
UP Time:161816.436 seconds
CPU Time:   12170

Re: [squid-users] Squid limits and hardware spec

2004-12-23 Thread Henrik Nordstrom
On Mon, 22 Nov 2004, Martin Marji Cermak wrote:
1) What are the Sqids's limits?
(I got to 100 client HTTP request/seconds so far)
This very much depends on
  - the hardware where Suqid runs
  - the type of clients you have
  - configuration
Reasonable values range from 80-250 request/second for Internet proxying.
2) What hardware would you recommend for its maximal performance?
A single fast cpu, plenty of memory, and several harddrives (at least 3 
for cache).

3) What maximum_object_size whould you use, considering I want to save as 
much bandwidth as possible?
Relatively large in such case.
Regards
Henrik


Re: [squid-users] Squid limits and hardware spec

2004-12-03 Thread Matus UHLAR - fantomas
> >YOu might also want to change your L1 directories, for a 90GB cache,
> >only having 16 L1 directories may be overkill.

On 02.12 21:22, Martin Marji Cermak wrote:
> Thank you, you are right.
> At the moment I have
>   cache_dir aufs /cache 92000 16 256
> because I have 3 x 36GB SCSI disk behind a RAID0 (strip) contoller 
> (seems to be just one disk).
> Yes, I know, raid is bad, but a RAID 0 controller is the only controller 
> I have had since today :-)

Many RAID controllers can be used as simple IDE or SCSI controller.
Did you try using those disks this way?

> So I am going to connect there 3 disks to the new controller (no RAID) 
> tomorrow with this settings:
> 
>   cache_dir aufs /cache1 3 60 256
>   cache_dir aufs /cache2 3 60 256
>   cache_dir aufs /cache3 3 60 256
> 
> (3 is roughly 80% of the 36 GB disk, so I am right, right?)

yes, I have exactly these numbers on 36GB disks, however 

> I am just sorry about my actual, full 92 GB cache - when I remove the 
> three disks from the strip, I will have to reformate them and start with 
> empty caches (it took more than 3 days to fill up this 92 GB cache).

you should get more disks - effective cache should be able to store 1
week's traffic. In such case, your setting of 50MB files max could be just
good for you (just check one week logs, what's the maximum file size
fetched more than once. That may not be the same file but can help you).

> The only way how to save some cached data is:
> - change my actual cache_dir aufs /cache 92000 16 256
> to cache_dir aufs /cache 3 16 256
> and start Squid. It removes 62 GB from the cache.

yes, that is probably the only way. But it will take some time.

> >Just out of curiousity, what is your cache's filesystem? Ext3? reiserfs?

> I had reiserfs (with noatime) but it seemed too slow. I changed it to 
> ext3 (noatime), which was supposed to be quicker according to the 
> "Squid, the definitive guide" book, there are benchmarks and ext3 has 
> much better throughput.

hmm??? I always thought reiserfs or xfs are much better than ext2/ext3 for
this use (many small files)

> Finally, I decided my Squid box is going to be stable (good hardware, 
> UPS) and decided for ext2 with noatime.

note that in case of crash the fsck may tahe ages, 

> >Do you expect to have more _large_ files or more small files? I use
> >reiserfs. (anticipate more small files caches)
> I do not know. I will have to get some stats, somehow. Is this info 
> stored somewhere in Squid cachemgr info pages by any chances?

cachemgr will give you the mean object size, it will be 10 to 15kB and
this will proabbly tell you that for one 50MB file you have thousands of 1
kB files :)

> >>cache_mem 200 MB

>  14:11:52 up 1 day,  5:35,  1 user,  load average: 2.04, 2.17, 2.25
> 45 processes: 41 sleeping, 4 running, 0 zombie, 0 stopped
> CPU states:  25.9% user,  74.1% system,   0.0% nice,   0.0% idle
> Mem:   1551284K total,  1520332K used,30952K free,   109912K buffers
> Swap:   979956K total, 6200K used,   973756K free,   478308K cached
> 
>   PID USER PRI  NI  SIZE  RSS SHARE STAT %CPU %MEM   TIME COMMAND
> 13742 root  15   0  689M 687M  4020 R90.0 45.4 377:58 squid
> 15497 root  16   0   940  940   748 R 8.4  0.0   0:02 top
> 13754 root   9   0  689M 687M  4020 S 0.4 45.4   0:20 squid

that means 200MB is acurate with your old setting (do I remember right
that you user 40GB of disk space?)

-- 
Matus UHLAR - fantomas, [EMAIL PROTECTED] ; http://www.fantomas.sk/
Warning: I wish NOT to receive e-mail advertising to this address.
Varovanie: na tuto adresu chcem NEDOSTAVAT akukolvek reklamnu postu.
"One World. One Web. One Program." - Microsoft promotional advertisement
"Ein Volk, ein Reich, ein Fuhrer!" - Adolf Hitler


Re: [squid-users] Squid limits and hardware spec

2004-12-02 Thread Martin Marji Cermak
Hello, Guys!
OK, now I have:
  maximum_object_size 200 MB
That means your cache will store up to 200MB of each file. 

You can even store ISO files if your users download Linux ISOs. Just
need to up that 200MB to say 800MB.
Yes, this would be nice if there were just one linux distro and so all 
Linux people would download just, say, 8 Linux images :-)

Setting this to 800 MB would be interesting when you have, say, a cache 
bigger than 500 GB, at least. If I have a cache below 100 GB and I do 
not know too much about the traffic which my users download, the LFUDA 
algorithm does not let an ISO in the cache too long :-)

YOu might also want to change your L1 directories, for a 90GB cache,
only having 16 L1 directories may be overkill.
Thank you, you are right.
At the moment I have
  cache_dir aufs /cache 92000 16 256
because I have 3 x 36GB SCSI disk behind a RAID0 (strip) contoller 
(seems to be just one disk).
Yes, I know, raid is bad, but a RAID 0 controller is the only controller 
I have had since today :-)
So I am going to connect there 3 disks to the new controller (no RAID) 
tomorrow with this settings:

  cache_dir aufs /cache1 3 60 256
  cache_dir aufs /cache2 3 60 256
  cache_dir aufs /cache3 3 60 256
(3 is roughly 80% of the 36 GB disk, so I am right, right?)
I am just sorry about my actual, full 92 GB cache - when I remove the 
three disks from the strip, I will have to reformate them and start with 
empty caches (it took more than 3 days to fill up this 92 GB cache).

The only way how to save some cached data is:
- change my actual cache_dir aufs /cache 92000 16 256
to cache_dir aufs /cache 3 16 256
and start Squid. It removes 62 GB from the cache.
Switch the Squid off. Copy the entire cache to a temporary disk (yes, it 
will take hours, I already tried. Probably better to use tar, without a 
compresion).
Change the controller, format the tree SCSI disks, mount them and copy 
and untar the backuped cache to one of them.

Change configuration - 3x cache_dir. Initialize with 'squid -z'.
Start squid and trada, I have 30 GB cache of data.
Ow, thank you for the L1 algorithm.

Just out of curiousity, what is your cache's filesystem? Ext3? reiserfs?
I had reiserfs (with noatime) but it seemed too slow. I changed it to 
ext3 (noatime), which was supposed to be quicker according to the 
"Squid, the definitive guide" book, there are benchmarks and ext3 has 
much better throughput.
Finally, I decided my Squid box is going to be stable (good hardware, 
UPS) and decided for ext2 with noatime.

Do you expect to have more _large_ files or more small files? I use
reiserfs. (anticipate more small files caches)
I do not know. I will have to get some stats, somehow. Is this info 
stored somewhere in Squid cachemgr info pages by any chances?
Oh, sorry, you mentioned I can do it by querying the cache. I will have 
a look at it (and post it here with other conclusions :-)


cache_mem 200 MB
How much of memory do yo have??
for a 90GB cache, and assuming 10MB RAM per 1GB cache, you better have
like 900MB RAM
1 GB. I am find, as you can see from my top:
 14:11:52 up 1 day,  5:35,  1 user,  load average: 2.04, 2.17, 2.25
45 processes: 41 sleeping, 4 running, 0 zombie, 0 stopped
CPU states:  25.9% user,  74.1% system,   0.0% nice,   0.0% idle
Mem:   1551284K total,  1520332K used,30952K free,   109912K buffers
Swap:   979956K total, 6200K used,   973756K free,   478308K cached
  PID USER PRI  NI  SIZE  RSS SHARE STAT %CPU %MEM   TIME COMMAND
13742 root  15   0  689M 687M  4020 R90.0 45.4 377:58 squid
15497 root  16   0   940  940   748 R 8.4  0.0   0:02 top
13754 root   9   0  689M 687M  4020 S 0.4 45.4   0:20 squid

So, I am 
supposed to have my Squid in a good shape :-), stable and running 
without stopping/crashing.
The "thousands" means approx. 3500 users at the moment.
OK.. and they're all accessing 1 cache? Wow.
Yes, but they are not active at the same time. My peaks are:
200 client HTTP requests/sec. Server in: 1.6MB/sec. Client out: 2MB/sec
Have a nice day,
If you post back the results, I sure will.
So have it. I will (post them :-)
Marji


Re: [squid-users] Squid limits and hardware spec

2004-12-02 Thread Ow Mun Heng
On Thu, 2004-12-02 at 16:04, Matus UHLAR - fantomas wrote:
> > >On Mon, 2004-11-29 at 11:32, Martin Marji Cermak wrote:
> > >
> > >>Hello guys,
> > >>I have been playing with Squid under a heavy load and there are some 
> > >>stats.
> > >>I am trying to maximise the "Byte Hit Ratio" value. I got 13% average, 
> > >>but I am not happy about this number - I want it higher (how to do it?). 
> > >>There are thousands of ADSL clients using the cache and I want to know 
> > >>what the Squid limits are.
> > >>
> > >>USED HARDWARE:
> > >>Processor: P4 1.8GHz
> > >>Memory:1 GB
> > >>Hardisk:   40 GB IDE 7200rpm
> > >>Controler: Serverworks Chipset
> > >>Ethernet card: Broadcom TG3
> > >
> > >>ACHIEVED PERFORMANCE:
> > >>Byte Hit Ratio: 13% (TOO LOW !!!)
> 
> > Ow Mun Heng wrote: You want to save bandwidth or you want speed??
> 
> On 02.12 13:13, Martin Marji Cermak wrote: Yes, I want to Save bandwidth.
> 
> In such case you probably need: bigger cache (add new disk probably) lower
> - maximum_object_size cache_replacement_policy heap LFUDA
> 
> explanations below
> 
> > >>USED CONFIGURATION: maximum_object_size 51200 KB (SHOULD I MAKE IT
> > >>HIGHER ???)
> > >
> > >I made mine to cache up to 40MB only. If you really want to have more
> > >byte hit ratio, then by all means, up the max_obj_size.
> > 
> > OK, now I have: maximum_object_size 200 MB
> 
> I increased maximum_object_Size from 20MB (last time I verified what files
> were repeatedly fetched they were under 20 MB) to 32 MB and the byte hit
> ratio decreased.

Well, if he really wants to save on bandwidth and have the cache big
enough, I don't see why having a max obj size of 200MB to be not good.

Then again, it depends on usage.

> 
> Yes, I work by an ISP where customers use to fetch very different files,
> that is expected. I don't know what situation you are in, but note that
> one 50MB file takes space of 50 1MB files and there is big probability
> that smaller files will be fetched more often.

True. One 50MB file = 50x hit ratio of 50 1MB file.

Thus, higher Byte_hit_ratio

> 
> > >>cache_dir aufs /cache 25000 16 256 (one ide disk, see the spec above)
> 
> > >This seems too low. I used 40GB of the 80GB drive
> 
> > OK, I changed it to cache_dir aufs /cache 92000 16 256
> 
> no no no, even if you have whole drive for the cache, you should note that
> there is some overhead in filesystems etc. I'm glad that I may use 3
> kB (which is a bit less than 29GB) on 36GB hdd. You probably should use:

Proper usage is to use ~70-80% MAX of the physical HD space being
allocated for the cache.


--
Ow Mun Heng
Gentoo/Linux on D600 1.4Ghz 
Neuromancer 16:11:04 up 6:21, 6 users, 0.57, 0.53, 0.46 



Re: [squid-users] Squid limits and hardware spec

2004-12-02 Thread Matus UHLAR - fantomas
> >On Mon, 2004-11-29 at 11:32, Martin Marji Cermak wrote:
> >
> >>Hello guys,
> >>I have been playing with Squid under a heavy load and there are some 
> >>stats.
> >>I am trying to maximise the "Byte Hit Ratio" value. I got 13% average, 
> >>but I am not happy about this number - I want it higher (how to do it?). 
> >>There are thousands of ADSL clients using the cache and I want to know 
> >>what the Squid limits are.
> >>
> >>USED HARDWARE:
> >>Processor: P4 1.8GHz
> >>Memory:1 GB
> >>Hardisk:   40 GB IDE 7200rpm
> >>Controler: Serverworks Chipset
> >>Ethernet card: Broadcom TG3
> >
> >>ACHIEVED PERFORMANCE:
> >>Byte Hit Ratio: 13% (TOO LOW !!!)

> Ow Mun Heng wrote: You want to save bandwidth or you want speed??

On 02.12 13:13, Martin Marji Cermak wrote: Yes, I want to Save bandwidth.

In such case you probably need: bigger cache (add new disk probably) lower
- maximum_object_size cache_replacement_policy heap LFUDA

explanations below

> >>USED CONFIGURATION: maximum_object_size 51200 KB (SHOULD I MAKE IT
> >>HIGHER ???)
> >
> >I made mine to cache up to 40MB only. If you really want to have more
> >byte hit ratio, then by all means, up the max_obj_size.
> 
> OK, now I have: maximum_object_size 200 MB

I increased maximum_object_Size from 20MB (last time I verified what files
were repeatedly fetched they were under 20 MB) to 32 MB and the byte hit
ratio decreased.

Yes, I work by an ISP where customers use to fetch very different files,
that is expected. I don't know what situation you are in, but note that
one 50MB file takes space of 50 1MB files and there is big probability
that smaller files will be fetched more often.

> >>cache_dir aufs /cache 25000 16 256 (one ide disk, see the spec above)

> >This seems too low. I used 40GB of the 80GB drive

> OK, I changed it to cache_dir aufs /cache 92000 16 256

no no no, even if you have whole drive for the cache, you should note that
there is some overhead in filesystems etc. I'm glad that I may use 3
kB (which is a bit less than 29GB) on 36GB hdd. You probably should use:

cache_dir aufs /cache 7 64 256

> >>cache_mem 8 MB
> >200 MB. More being cached to memory. Faster retrieval.
> Thank you, nice. I just hope it does not start swaping :-)

when I had 3 swap I used 300MB for memory cache, and had squid taking
850MB of RAM. I think you may use 100 or 128 M for memory cache and see
how much memory will squid take in few days or weeks.

> And another interesting thing:

> My median Byte Hit Ratio has reached 17% (200 MB max file, 95 GB cache).
> So I drecompiled squid with --enable-removal-policies and set:
>   cache_replacement_policy heap LFUDA
> It looks I can gain a couple of percent (LFUDA should have a bit better 
> Byte Hit Ratio than lfu).

This is a well known thing. See squid config, cache_replacement_policy
comments, you'll found out that LFUDA is the best for good byte ratio.

-- 
Matus UHLAR - fantomas, [EMAIL PROTECTED] ; http://www.fantomas.sk/
Warning: I wish NOT to receive e-mail advertising to this address.
Varovanie: na tuto adresu chcem NEDOSTAVAT akukolvek reklamnu postu.
There's a long-standing bug relating to the x86 architecture that
allows you to install Windows.   -- Matthew D. Fuller


Re: [squid-users] Squid limits and hardware spec

2004-12-01 Thread Ow Mun Heng
On Thu, 2004-12-02 at 13:13, Martin Marji Cermak wrote:
> Ow Mun Heng wrote:
> > On Mon, 2004-11-29 at 11:32, Martin Marji Cermak wrote:

> >>USED CONFIGURATION:
> >>maximum_object_size 51200 KB (SHOULD I MAKE IT HIGHER ???)
> > 
> > I made mine to cache up to 40MB only. If you really want to have more
> > byte hit ratio, then by all means, up the max_obj_size.
> 
> OK, now I have:
>maximum_object_size 200 MB

That means your cache will store up to 200MB of each file. 

You can even store ISO files if your users download Linux ISOs. Just
need to up that 200MB to say 800MB.

> 
> >>cache_dir aufs /cache 25000 16 256
> >>   (one ide disk, see the spec above)
> > 
> > 
> > This seems too low. I used 40GB of the 80GB drive
> OK, I changed it to
>cache_dir aufs /cache 92000 16 256

YOu might also want to change your L1 directories, for a 90GB cache,
only having 16 L1 directories may be overkill.

How to calculate L1 Dir: (30GB Cache)
x=Size of cache dir in KB (i.e. 30GB=~30,000,000KB) y=Average object
size (just use 15KB z=Number of directories per first level directory

(((x / y) / 256) / 256) * 2 = # of directories

30,000,000 / 15 = 200 / 256 = 7812.5 / 256 = 30 * 2 = 60

cache_dir aufs /squidcache/cache1 3 60 256

Just out of curiousity, what is your cache's filesystem? Ext3? reiserfs?

Do you expect to have more _large_ files or more small files? I use
reiserfs. (anticipate more small files caches)

You can query the cache, but I can't rememeber what was the 'form' of
the query.

> 
> 
> >>cache_mem 8 MB
> > 200 MB. More being cached to memory. Faster retrieval.
> Thank you, nice. I just hope it does not start swaping :-)

How much of memory do yo have??

for a 90GB cache, and assuming 10MB RAM per 1GB cache, you better have
like 900MB RAM

> > 
> > Say.. do you have any experience running a load balanced squid? I'm
> > wondering, since it's transparent, what happens if Squid Goes down? (for
> > X Reasons?) What happens to your ADSL users? (in the thousands??)
> I am in a testing phase, trying to find out what can just one squid 
> handle - what are its limits. Then I will install a little Squid farm.
> 
> If Squid goes down, it drops all established connections. 
Yeah.. I figgured as much. My very own fear.

> So, I am 
> supposed to have my Squid in a good shape :-), stable and running 
> without stopping/crashing.
> The "thousands" means approx. 3500 users at the moment.
OK.. and they're all accessing 1 cache? Wow.


> 
> 
> > Are you logging a lot of things? If you are, your IDE disk may not be
> > able to sustain the throughput.
> Yes, you are righ, I was logging quite a lot. I modified the debug 
> module a bit (I can set a debug level for each module, e.g.:
>debug_options ALL,1;14,2;99,4
> ) so now I log only info I need

Good on you.

> I will report some stats to the list, when I have more info (after I run 
> squid in this configuration for more days).

Please do tell. I looking into how to implement squid in such an
environment.

I'm also looking into ultramonkey.org and linuxvirtualserver.org as a
means for load-balancing. But again, If not mistaken, the
Ultramonkey/LVS box will be the bottleneck/single point of failure.


> 
> Have a nice day,
If you post back the results, I sure will.

> Marji

--
Ow Mun Heng
Gentoo/Linux on D600 1.4Ghz 
Neuromancer 13:58:24 up 4:09, 7 users, 0.51, 0.43, 0.23 



Re: [squid-users] Squid limits and hardware spec

2004-12-01 Thread Martin Marji Cermak
Ow Mun Heng wrote:
On Mon, 2004-11-29 at 11:32, Martin Marji Cermak wrote:
Hello guys,
I have been playing with Squid under a heavy load and there are some stats.
I am trying to maximise the "Byte Hit Ratio" value. I got 13% average, 
but I am not happy about this number - I want it higher (how to do it?). 
There are thousands of ADSL clients using the cache and I want to know 
what the Squid limits are.

USED HARDWARE:
Processor: P4 1.8GHz
Memory:1 GB
Hardisk:   40 GB IDE 7200rpm
Controler: Serverworks Chipset
Ethernet card: Broadcom TG3

ACHIEVED PERFORMANCE:
Byte Hit Ratio: 13% (TOO LOW !!!)
You want to save bandwidth or you want speed?? 
Yes, I want to Save bandwidth.
USED CONFIGURATION:
maximum_object_size 51200 KB (SHOULD I MAKE IT HIGHER ???)
I made mine to cache up to 40MB only. If you really want to have more
byte hit ratio, then by all means, up the max_obj_size.
OK, now I have:
  maximum_object_size 200 MB
cache_dir aufs /cache 25000 16 256
  (one ide disk, see the spec above)

This seems too low. I used 40GB of the 80GB drive
OK, I changed it to
  cache_dir aufs /cache 92000 16 256

cache_mem 8 MB
200 MB. More being cached to memory. Faster retrieval.
Thank you, nice. I just hope it does not start swaping :-)
The Squid is configured as a transparet proxy, so:
httpd_accel_uses_host_header on
httpd_accel_with_proxy OFF (yes, transparent)
httpd_accel_port 80
httpd_accel_host virtual

Say.. do you have any experience running a load balanced squid? I'm
wondering, since it's transparent, what happens if Squid Goes down? (for
X Reasons?) What happens to your ADSL users? (in the thousands??)
I am in a testing phase, trying to find out what can just one squid 
handle - what are its limits. Then I will install a little Squid farm.

If Squid goes down, it drops all established connections. So, I am 
supposed to have my Squid in a good shape :-), stable and running 
without stopping/crashing.
The "thousands" means approx. 3500 users at the moment.


Are you logging a lot of things? If you are, your IDE disk may not be
able to sustain the throughput.
Yes, you are righ, I was logging quite a lot. I modified the debug 
module a bit (I can set a debug level for each module, e.g.:
  debug_options ALL,1;14,2;99,4
) so now I log only info I need


And another interesting thing:
My median Byte Hit Ratio has reached 17% (200 MB max file, 95 GB cache).
So I drecompiled squid with --enable-removal-policies and set:
  cache_replacement_policy heap LFUDA
It looks I can gain a couple of percent (LFUDA should have a bit better 
Byte Hit Ratio than lfu).

I will report some stats to the list, when I have more info (after I run 
squid in this configuration for more days).

Have a nice day,
Marji


Re: [squid-users] Squid limits and hardware spec

2004-11-29 Thread Ow Mun Heng


On Mon, 2004-11-29 at 11:32, Martin Marji Cermak wrote:
> Hello guys,
> I have been playing with Squid under a heavy load and there are some stats.
> I am trying to maximise the "Byte Hit Ratio" value. I got 13% average, 
> but I am not happy about this number - I want it higher (how to do it?). 
> There are thousands of ADSL clients using the cache and I want to know 
> what the Squid limits are.
> 
> USED HARDWARE:
> Processor: P4 1.8GHz
> Memory:1 GB
> Hardisk:   40 GB IDE 7200rpm
> Controler: Serverworks Chipset
> Ethernet card: Broadcom TG3

I just built one but it's not connected/not a lot of users yet.

2.4G/512MB/80GB SATA 7200

> ACHIEVED PERFORMANCE:
> Byte Hit Ratio: 13% (TOO LOW !!!)

You want to save bandwidth or you want speed?? 

> USED CONFIGURATION:
> maximum_object_size 51200 KB (SHOULD I MAKE IT HIGHER ???)

I made mine to cache up to 40MB only. If you really want to have more
byte hit ratio, then by all means, up the max_obj_size.


> cache_dir aufs /cache 25000 16 256
>(one ide disk, see the spec above)

This seems too low. I used 40GB of the 80GB drive

> cache_mem 8 MB
200 MB. More being cached to memory. Faster retrieval.

> 
> The Squid is configured as a transparet proxy, so:
> httpd_accel_uses_host_header on
> httpd_accel_with_proxy OFF (yes, transparent)
> httpd_accel_port 80
> httpd_accel_host virtual

Say.. do you have any experience running a load balanced squid? I'm
wondering, since it's transparent, what happens if Squid Goes down? (for
X Reasons?) What happens to your ADSL users? (in the thousands??)

> Tell me if you are interested in other settings.

Are you logging a lot of things? If you are, your IDE disk may not be
able to sustain the throughput.

It's advised to reduce or eliminate the logs unless you really need it.





RE: [squid-users] Squid limits and hardware spec

2004-11-28 Thread You, Qinghong
You probably need more disk space for squid? 


thanks
Qinghong 
-Original Message-
From: Martin Marji Cermak [mailto:[EMAIL PROTECTED] 
Sent: Monday, November 29, 2004 2:32 PM
To: Squid-List
Subject: Re: [squid-users] Squid limits and hardware spec

Hello guys,
I have been playing with Squid under a heavy load and there are some
stats.
I am trying to maximise the "Byte Hit Ratio" value. I got 13% average, 
but I am not happy about this number - I want it higher (how to do it?).

There are thousands of ADSL clients using the cache and I want to know 
what the Squid limits are.

USED HARDWARE:
Processor: P4 1.8GHz
Memory:1 GB
Hardisk:   40 GB IDE 7200rpm
Controler: Serverworks Chipset
Ethernet card: Broadcom TG3

ACHIEVED PERFORMANCE:
Requests: 180 req/sec (peak), 60 req/sec (day average).
Server In: 1400 kBytes/sec (peak), 600 kBytes/sec (day average)
Request Hit Ratio: 37% day average
Byte Hit Ratio: 13% (TOO LOW !!!)
Average service time:
  - Cache Hits: 0.01 sec
  - Cache Miss: 0.5 sec
Mem Usage: 120 MBytes
CPU Usage: 50% (server is dedicated to Squid)
Server LOAD (gathered from uptime): 2.5 average, 3.7 peak
   (I saved some load by switching klogd off)

USED CONFIGURATION:
maximum_object_size 51200 KB (SHOULD I MAKE IT HIGHER ???)
cache_dir aufs /cache 25000 16 256
   (one ide disk, see the spec above)
cache_mem 8 MB

The Squid is configured as a transparet proxy, so:
httpd_accel_uses_host_header on
httpd_accel_with_proxy OFF (yes, transparent)
httpd_accel_port 80
httpd_accel_host virtual

Tell me if you are interested in other settings.


The bottleneck of the system is the disk at the moment, because it is 
only IDE. The average system load is 2.5, when I route more users to the

cache, load goes up close to 4 and the Cache Miss response time goes to 
1 sec.


Under this load, you cannot do anything else, e.g. gzip logfiles - it 
affects the actual Squid performance.
I noticed the klogd took 30% of CPU in peaks, because of the TPROXY 
module which logs a lot. I had the debug info switched off by a 
syslog.conf rule, so is was not being logged, but the module kept 
sending log messages to the log daemon so klogd took 30% of CPU anyway.
I switched the klogd off and the performance change was visible.

I am going to install a new box with SCSI disks so I will report to you 
how the performance will change.

Any ideas how to get higher Byte Hit Ratio from actual 13 % ?

Have a nice week, Marji


Martin Marji Cermak wrote:
> Hello Guys,
> I am going to run a Squid box for a lot of users.
> I want to handle as much users as possible (thousands - I work for a 
> small ISP).
> 
> Unfortunately, I am not sure what the Squid limits are and my boss
asked 
> me to specify the hardware I wanted him to buy.
> 
> 
> Please, answer my folowing questions:
> 
> 1) What are the Sqids's limits?
> (I got to 100 client HTTP request/seconds so far)
> 
> 2) What hardware would you recommend for its maximal performance?
> I am going to dedicate a Debian linux box for Squid, there will be no 
> other services.
> 
> 3) What maximum_object_size whould you use, considering I want to save

> as much bandwidth as possible?
> (I have   : "maximum_object_size  51200 KB"  at the moment,
> together with : "cache_diraufs /cache 25000 16 256"
> and I got close to 15% Byte Hit Ratio)
> 
> 
> Thank you, guys,
> Marji


Re: [squid-users] Squid limits and hardware spec

2004-11-28 Thread Martin Marji Cermak
Hello guys,
I have been playing with Squid under a heavy load and there are some stats.
I am trying to maximise the "Byte Hit Ratio" value. I got 13% average, 
but I am not happy about this number - I want it higher (how to do it?). 
There are thousands of ADSL clients using the cache and I want to know 
what the Squid limits are.

USED HARDWARE:
Processor: P4 1.8GHz
Memory:1 GB
Hardisk:   40 GB IDE 7200rpm
Controler: Serverworks Chipset
Ethernet card: Broadcom TG3
ACHIEVED PERFORMANCE:
Requests: 180 req/sec (peak), 60 req/sec (day average).
Server In: 1400 kBytes/sec (peak), 600 kBytes/sec (day average)
Request Hit Ratio: 37% day average
Byte Hit Ratio: 13% (TOO LOW !!!)
Average service time:
 - Cache Hits: 0.01 sec
 - Cache Miss: 0.5 sec
Mem Usage: 120 MBytes
CPU Usage: 50% (server is dedicated to Squid)
Server LOAD (gathered from uptime): 2.5 average, 3.7 peak
  (I saved some load by switching klogd off)
USED CONFIGURATION:
maximum_object_size 51200 KB (SHOULD I MAKE IT HIGHER ???)
cache_dir aufs /cache 25000 16 256
  (one ide disk, see the spec above)
cache_mem 8 MB
The Squid is configured as a transparet proxy, so:
httpd_accel_uses_host_header on
httpd_accel_with_proxy OFF (yes, transparent)
httpd_accel_port 80
httpd_accel_host virtual
Tell me if you are interested in other settings.
The bottleneck of the system is the disk at the moment, because it is 
only IDE. The average system load is 2.5, when I route more users to the 
cache, load goes up close to 4 and the Cache Miss response time goes to 
1 sec.

Under this load, you cannot do anything else, e.g. gzip logfiles - it 
affects the actual Squid performance.
I noticed the klogd took 30% of CPU in peaks, because of the TPROXY 
module which logs a lot. I had the debug info switched off by a 
syslog.conf rule, so is was not being logged, but the module kept 
sending log messages to the log daemon so klogd took 30% of CPU anyway.
I switched the klogd off and the performance change was visible.

I am going to install a new box with SCSI disks so I will report to you 
how the performance will change.

Any ideas how to get higher Byte Hit Ratio from actual 13 % ?
Have a nice week, Marji
Martin Marji Cermak wrote:
Hello Guys,
I am going to run a Squid box for a lot of users.
I want to handle as much users as possible (thousands - I work for a 
small ISP).

Unfortunately, I am not sure what the Squid limits are and my boss asked 
me to specify the hardware I wanted him to buy.

Please, answer my folowing questions:
1) What are the Sqids's limits?
(I got to 100 client HTTP request/seconds so far)
2) What hardware would you recommend for its maximal performance?
I am going to dedicate a Debian linux box for Squid, there will be no 
other services.

3) What maximum_object_size whould you use, considering I want to save 
as much bandwidth as possible?
(I have   : "maximum_object_size  51200 KB"  at the moment,
together with : "cache_diraufs /cache 25000 16 256"
and I got close to 15% Byte Hit Ratio)

Thank you, guys,
Marji


Re: [squid-users] Squid limits and hardware spec

2004-11-21 Thread Ow Mun Heng
On Mon, 2004-11-22 at 10:07, Martin Marji Cermak wrote:
> 3) What maximum_object_size whould you use, considering I want to save 
> as much bandwidth as possible?
> (I have   : "maximum_object_size  51200 KB"  at the moment,
> together with : "cache_diraufs /cache 25000 16 256"
> and I got close to 15% Byte Hit Ratio)


I've just built such a box on a P4 2.4 /512MB ram.

Max_obj_size 40 M (Apple Movie Trailers)
cache_dir aufs 300 60 256 (SATA reiserfs)

Not fully tested yet. 

-- 
Ow Mun Heng
Gentoo/Linux on D600 1.4Ghz 
CPU kernel 2.6.9-gentoo-r1 
Neuromancer 15:27:13 up 6:08, 7 users, load average: 0.79, 0.45, 0.44