[squid-users] How does squid choose which cache_dir to use?

2007-08-20 Thread Nicole

 Hello
 I am testing FreeBSD 7.0-CURRENT and zfs.

 I am using:

cache_dir aufs /cache0 24000 32 128
cache_dir aufs /squidcache1 9 64 256
cache_dir aufs /squidcache2 9 64 256
cache_dir aufs /squidcache3 9 64 256

 Cache0= standard ufs/ffs filesystem slice of da0
 /squidcache1/2/3 = a whole disk 147G (da2/da2/da3) utilizing zfs. (basicly
in JBOD)

 (it's new, it's cool, but how does it work with squid...)

 Normally, (when all using ufs/ffs) all the squidcache1/2/3 dirs start filling
first and the cache0 dir fills slowest. However, with the 3 using zfs, cache0
is filling much faster. Is this indicitive of the 3 cache_dirs using zfs 
are somehow slower, so its using cache0 more?



 Thanks!

  Nicole







Re: [squid-users] How does squid choose which cache_dir to use?

2007-08-20 Thread Adrian Chadd
It'll choose the cache dir with the least pending disk ops, if you haven't
configured any other restriction (min/max object size.)

Look at the "store directory stats" page in the cache manager and see
what it says.


Adrian

On Mon, Aug 20, 2007, Nicole wrote:
> 
>  Hello
>  I am testing FreeBSD 7.0-CURRENT and zfs.
> 
>  I am using:
> 
> cache_dir aufs /cache0 24000 32 128
> cache_dir aufs /squidcache1 9 64 256
> cache_dir aufs /squidcache2 9 64 256
> cache_dir aufs /squidcache3 9 64 256
> 
>  Cache0= standard ufs/ffs filesystem slice of da0
>  /squidcache1/2/3 = a whole disk 147G (da2/da2/da3) utilizing zfs. (basicly
> in JBOD)
> 
>  (it's new, it's cool, but how does it work with squid...)
> 
>  Normally, (when all using ufs/ffs) all the squidcache1/2/3 dirs start filling
> first and the cache0 dir fills slowest. However, with the 3 using zfs, cache0
> is filling much faster. Is this indicitive of the 3 cache_dirs using zfs 
> are somehow slower, so its using cache0 more?
> 


Re: [squid-users] How does squid choose which cache_dir to use?

2007-08-21 Thread Henrik Nordstrom
On tis, 2007-08-21 at 14:55 +0800, Adrian Chadd wrote:
> It'll choose the cache dir with the least pending disk ops, if you haven't
> configured any other restriction (min/max object size.)

No, not with aufs. They internally all share the same queue.

With aufs it currently basically selects the cache_dir based on amount
of free space, or at least that's the idea..

> >  Normally, (when all using ufs/ffs) all the squidcache1/2/3 dirs start 
> > filling
> > first and the cache0 dir fills slowest. However, with the 3 using zfs, 
> > cache0
> > is filling much faster. Is this indicitive of the 3 cache_dirs using zfs 
> > are somehow slower, so its using cache0 more?

Odd.. the underlying filesystem should have little or no impact on how
Squid selects cache diretory.

Regards
Henrik



Re: [squid-users] How does squid choose which cache_dir to use?

2007-08-22 Thread Nicole

On 21-Aug-07 My Secret NSA Wiretap Overheard Henrik Nordstrom Saying  :
> On tis, 2007-08-21 at 14:55 +0800, Adrian Chadd wrote:
>> It'll choose the cache dir with the least pending disk ops, if you haven't
>> configured any other restriction (min/max object size.)
> 
> No, not with aufs. They internally all share the same queue.
> 
> With aufs it currently basically selects the cache_dir based on amount
> of free space, or at least that's the idea..
> 
>> >  Normally, (when all using ufs/ffs) all the squidcache1/2/3 dirs start
>> >  filling
>> > first and the cache0 dir fills slowest. However, with the 3 using zfs,
>> > cache0
>> > is filling much faster. Is this indicitive of the 3 cache_dirs using zfs 
>> > are somehow slower, so its using cache0 more?
> 
> Odd.. the underlying filesystem should have little or no impact on how
> Squid selects cache diretory.
> 
> Regards
> Henrik

 Waah. As time goes on, it's getting even stranger. Anything I can test for or
look for?

/dev/da0s1h 39G4.0G 31G11%/cache0
squidcache1134G3.5G130G 3%/squidcache1
squidcache2134G 28G106G21%/squidcache2
squidcache3134G 14G120G11%/squidcache3

-

Server: squid/2.6.STABLE14
Date: Thu, 23 Aug 2007 02:43:15 GMT
Content-Type: text/plain
Expires: Thu, 23 Aug 2007 02:43:15 GMT
Last-Modified: Thu, 23 Aug 2007 02:43:15 GMT
X-Cache: MISS from 
Via: 1.0 server:80 (squid/2.6.STABLE14)
Connection: close

Squid Object Cache: Version 2.6.STABLE14
Start Time: Wed, 22 Aug 2007 08:38:14 GMT
Current Time:   Thu, 23 Aug 2007 02:43:15 GMT
Connection information for squid:
Number of clients accessing cache:  2
Number of HTTP requests received:   3145661
Number of ICP messages received:1082778
Number of ICP messages sent:1089324
Number of queued ICP replies:   0
Request failure ratio:   0.00
Average HTTP requests per minute since start:   2899.2
Average ICP messages per minute since start:2001.9
Select loop called: 56871913 times, 1.145 ms avg
Cache information for squid:
Request Hit Ratios: 5min: 80.0%, 60min: 78.0%
Byte Hit Ratios:5min: 85.6%, 60min: 84.4%
Request Memory Hit Ratios:  5min: 18.4%, 60min: 18.7%
Request Disk Hit Ratios:5min: 67.0%, 60min: 67.6%
Storage Swap size:  -824803418 KB
Storage Mem size:   1024024 KB
Mean Object Size:   -508.60 KB
Requests given to unlinkd:  0
Median Service Times (seconds)  5 min60 min:
HTTP Requests (All):   0.02317  0.02317
Cache Misses:  0.03622  0.03829
Cache Hits:0.01955  0.01955
Near Hits: 0.05046  0.05046
Not-Modified Replies:  0.02069  0.02190
DNS Lookups:   0.0  0.0
ICP Queries:   0.00085  0.00080
Resource usage for squid:
UP Time:65100.397 seconds
CPU Time:   3659.457 seconds
CPU Usage:  5.62%
CPU Usage, 5 minute avg:6.65%
CPU Usage, 60 minute avg:   6.54%
Process Data Segment Size via sbrk(): 0 KB
Maximum Resident Size: 2426132 KB
Page faults with physical i/o: 0
Memory accounted for:
Total accounted:   1286613 KB
memPoolAlloc calls: 471286106
memPoolFree calls: 465111419
File descriptor usage for squid:
Maximum number of file descriptors:   8192
Largest file desc currently in use: 44
Number of file desc currently in use:   33
Files queued for open:   0
Available number of file descriptors: 8159
Reserved number of file descriptors:   100
Store Disk files open:   2
IO loop method: kqueue
Internal Data Structures:
1627350 StoreEntries
 41335 StoreEntries with MemObjects
 41332 Hot Object Cache Items
1621724 on-disk objects
HTTP/1.0 200 OK

Server: squid/2.6.STABLE14
Date: Thu, 23 Aug 2007 02:43:15 GMT
Content-Type: text/plain
Expires: Thu, 23 Aug 2007 02:43:15 GMT
Last-Modified: Thu, 23 Aug 2007 02:43:15 GMT
X-Cache: MISS from 
Via: 1.0 server:80 (squid/2.6.STABLE14)
Connection: close

Store Directory Statistics:
Store Entries  : 1627350
Maximum Swap Size  : 301056000 KB
Current Store Swap Size: -824803418 KB
Current Capacity   : -273% used, 374% free

Store Directory #0 (aufs): /cache0
FS Block Size 2048 Bytes
First level subdirectories: 32
Second level subdirectories: 128
Maximum Size: 24576000 KB
Current Size: 4084006 KB
Percent Used: 16.62%
Current load metric: 100 / 1000
Filemap bits in use: 240838 of 1048576 (23%)
Filesystem Space in use: 4201740/40393146 KB (10%)
Filesystem Inodes in use: 244969/5228542 (5%)
Flags:
Accepted object sizes: 0 - (unlimited) bytes
Removal policy: lru
LRU reference age: 1.46 days

Store

Re: [squid-users] How does squid choose which cache_dir to use?

2007-08-22 Thread Adrian Chadd
On Wed, Aug 22, 2007, Nicole wrote:

> > Odd.. the underlying filesystem should have little or no impact on how
> > Squid selects cache diretory.
> > 
> > Regards
> > Henrik
> 
>  Waah. As time goes on, it's getting even stranger. Anything I can test for or
> look for?
> 
> /dev/da0s1h 39G4.0G 31G11%/cache0
> squidcache1134G3.5G130G 3%/squidcache1
> squidcache2134G 28G106G21%/squidcache2
> squidcache3134G 14G120G11%/squidcache3

Graph the operations per-disk. Gather data and report back. :)



Adrian



Re: [squid-users] How does squid choose which cache_dir to use?

2007-08-22 Thread Nicole

On 23-Aug-07 My Secret NSA Wiretap Overheard Adrian Chadd Saying  :
> On Wed, Aug 22, 2007, Nicole wrote:
> 
>> > Odd.. the underlying filesystem should have little or no impact on how
>> > Squid selects cache diretory.
>> > 
>> > Regards
>> > Henrik
>> 
>>  Waah. As time goes on, it's getting even stranger. Anything I can test for
>>  or
>> look for?
>> 
>> /dev/da0s1h 39G4.0G 31G11%/cache0
>> squidcache1134G3.5G130G 3%/squidcache1
>> squidcache2134G 28G106G21%/squidcache2
>> squidcache3134G 14G120G11%/squidcache3
> 
> Graph the operations per-disk. Gather data and report back. :)
> 
> 
> Adrian


  Any instructions on how to do so would be very handy? :)


  Nicole






Re: [squid-users] How does squid choose which cache_dir to use?

2007-08-23 Thread Adrian Chadd
On Wed, Aug 22, 2007, Nicole wrote:

>   Any instructions on how to do so would be very handy? :)

Munin will do it. It at least graphs seperate disks out of the box
under Linux.




Adrian



Re: [squid-users] How does squid choose which cache_dir to use? -Oy

2007-08-23 Thread Nicole

On 23-Aug-07 My Secret NSA Wiretap Overheard Adrian Chadd Saying  :
> On Wed, Aug 22, 2007, Nicole wrote:
> 
>> > Odd.. the underlying filesystem should have little or no impact on how
>> > Squid selects cache directory.
>> > 
>> > Regards
>> > Henrik
>> 
>>  Waah. As time goes on, it's getting even stranger. Anything I can test for
>>  or
>> look for?
>> 
>> /dev/da0s1h 39G4.0G 31G11%/cache0
>> squidcache1134G3.5G130G 3%/squidcache1
>> squidcache2134G 28G106G21%/squidcache2
>> squidcache3134G 14G120G11%/squidcache3
> 
> Graph the operations per-disk. Gather data and report back. :)
> 
> 
> 
> Adrian

 It seems the problem may be with my test unit. I am very new to ZFS and after
looking around I found that my zfs disks were reporting errors. So it is
possible this is why squid was "avoiding" them. 

 Also I have checked out munin. If anyone has a copy of some setup scripts etc
that they can share, I would greatly appreciate it!

  Thanks!

  Nicole



--
 |\ __ /|   (`\
 | o_o  |__  ) )   
//  \\ 
  -  [EMAIL PROTECTED]  -  Powered by FreeBSD  -
--
 "The term "daemons" is a Judeo-Christian pejorative.
 Such processes will now be known as "spiritual guides"
  - Politicaly Correct UNIX Page





Re: [squid-users] How does squid choose which cache_dir to use? -Oy

2007-08-23 Thread Adrian Chadd
On Thu, Aug 23, 2007, Nicole wrote:

>  It seems the problem may be with my test unit. I am very new to ZFS and after
> looking around I found that my zfs disks were reporting errors. So it is
> possible this is why squid was "avoiding" them. 

Ouch!

>  Also I have checked out munin. If anyone has a copy of some setup scripts etc
> that they can share, I would greatly appreciate it!

Hm, I know the ubuntu, debian and fedora munin packages come with
a useful set of defaults - the only additions I made were to enable
SMART disk statistics (specifically temperature and error rates.)




Adrian