LinuxQuestions.org
Help answer threads with 0 replies.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Software
User Name
Password
Linux - Software This forum is for Software issues.
Having a problem installing a new program? Want to know which application is best for the job? Post your question in this forum.

Notices


Reply
  Search this Thread
Old 01-23-2011, 01:18 PM   #1
josmcc
LQ Newbie
 
Registered: Jun 2009
Posts: 4

Rep: Reputation: 0
Squid3 cache misses


I'm kind of new to squid. I've looked at the proxy server using squidclient and am getting

Median Service Times (seconds) 5 min 60 min:
HTTP Requests (All): 0.15048 0.15048
Cache Misses: 0.23230 0.19742
Cache Hits: 0.00000 0.00000
Near Hits: 0.00000 0.00000
Not-Modified Replies: 0.00000 0.00000
DNS Lookups: 0.04639 0.03223
ICP Queries: 0.00000 0.00000

Seems like a lot of cache misses is this normal?
I know there is stuff in the cache
Internal Data Structures:
546 StoreEntries
72 StoreEntries with MemObjects
71 Hot Object Cache Items
518 on-disk objects
It's wierd because misses looks like more than requests.
I don't know if I'm reading this right.This is just a proxy on a home network with about 6 clients connected.
 
Old 01-24-2011, 12:59 PM   #2
salasi
Senior Member
 
Registered: Jul 2007
Location: Directly above centre of the earth, UK
Distribution: SuSE, plus some hopping
Posts: 4,070

Rep: Reputation: 897Reputation: 897Reputation: 897Reputation: 897Reputation: 897Reputation: 897Reputation: 897
Quote:
Originally Posted by josmcc View Post
Cache Hits: 0.00000 0.00000
I'm not really aware of the format of the squidclient output (is it normalised in some way?), but if you have zero cache hits, squid isn't doing much for you, and may be making matters worse. Of course, if you never get any hits, misses will be rather high.

Of course, it is possible that requests and hits/misses count different types of things; maybe one request implies the fetch of several objects.
 
Old 01-25-2011, 01:26 AM   #3
josmcc
LQ Newbie
 
Registered: Jun 2009
Posts: 4

Original Poster
Rep: Reputation: 0
Below is a copy of the full output. Looks like I'm getting hits under "Cache information for squid" but it's showing up differently under "Median Service Time". I mainly use squid for content filtering with a redirector and a few blocklists, but I've been looking at the cache lately, to see if it's actually doing anything. I'm guessing from what I've been reading that this can be normal due to the webserver specifying not to cache the page.


Squid Object Cache: Version 3.1.10
Start Time: Mon, 24 Jan 2011 08:07:43 GMT
Current Time: Tue, 25 Jan 2011 07:18:33 GMT
Connection information for squid:
Number of clients accessing cache: 3
Number of HTTP requests received: 7252
Number of ICP messages received: 0
Number of ICP messages sent: 0
Number of queued ICP replies: 0
Number of HTCP messages received: 0
Number of HTCP messages sent: 0
Request failure ratio: 0.00
Average HTTP requests per minute since start: 5.2
Average ICP messages per minute since start: 0.0
Select loop called: 5941652 times, 14.045 ms avg
Cache information for squid:
Hits as % of all requests: 5min: 0.0%, 60min: 2.3%
Hits as % of bytes sent: 5min: 22.7%, 60min: 0.7%
Memory hits as % of hit requests: 5min: 0.0%, 60min: 0.0%
Disk hits as % of hit requests: 5min: 0.0%, 60min: 0.0%
Storage Swap size: 12936 KB
Storage Swap capacity: 2.5% used, 97.5% free
Storage Mem size: 8692 KB
Storage Mem capacity: 13.3% used, 86.7% free
Mean Object Size: 13.52 KB
Requests given to unlinkd: 0
Median Service Times (seconds) 5 min 60 min:
HTTP Requests (All): 0.02742 0.19742
Cache Misses: 0.28853 0.24524
Cache Hits: 0.00000 0.00000
Near Hits: 0.00000 0.20843
Not-Modified Replies: 0.00000 0.00000
DNS Lookups: 0.06963 0.14261
ICP Queries: 0.00000 0.00000
Resource usage for squid:
UP Time: 83449.844 seconds
CPU Time: 240.355 seconds
CPU Usage: 0.29%
CPU Usage, 5 minute avg: 0.29%
CPU Usage, 60 minute avg: 0.40%
Process Data Segment Size via sbrk(): 82652 KB
Maximum Resident Size: 0 KB
Page faults with physical i/o: 2
Memory usage for squid via mallinfo():
Total space in arena: 82784 KB
Ordinary blocks: 82507 KB 233 blks
Small blocks: 0 KB 0 blks
Holding blocks: 548 KB 2 blks
Free Small blocks: 0 KB
Free Ordinary blocks: 276 KB
Total in use: 83055 KB 100%
Total free: 276 KB 0%
Total size: 83332 KB
Memory accounted for:
Total accounted: 11770 KB 14%
memPool accounted: 11770 KB 14%
memPool unaccounted: 71561 KB 86%
memPoolAlloc calls: 1592400
memPoolFree calls: 1621796
File descriptor usage for squid:
Maximum number of file descriptors: 1024
Largest file desc currently in use: 62
Number of file desc currently in use: 41
Files queued for open: 0
Available number of file descriptors: 983
Reserved number of file descriptors: 100
Store Disk files open: 0
Internal Data Structures:
983 StoreEntries
952 StoreEntries with MemObjects
951 Hot Object Cache Items
957 on-disk objects
 
Old 02-04-2011, 08:31 AM   #4
damade
LQ Newbie
 
Registered: Feb 2011
Distribution: Red hat, Solaris, AIX, HP-UX, FreeBSD
Posts: 15

Rep: Reputation: 2
What you look first was not the hit/ratio !!!
was the median service time (time that squid takes to complete a request ) (averaged for 5 and 60 minutes)

Median Service Times (seconds) 5 min 60 min:
HTTP Requests (All): 0.15048 0.15048
Cache Misses: 0.23230 0.19742
Cache Hits: 0.00000 0.00000
Near Hits: 0.00000 0.00000
Not-Modified Replies: 0.00000 0.00000
DNS Lookups: 0.04639 0.03223
ICP Queries: 0.00000 0.00000


this is your hit/ratio

Hits as % of all requests: 5min: 0.0%, 60min: 2.3%
Hits as % of bytes sent: 5min: 22.7%, 60min: 0.7%

and its a very low rate. but it depends on the browsing behaviour of your clients .

damade
 
  


Reply



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
iptables SNAT misses some packets Ygrex Linux - Networking 17 04-17-2010 06:04 AM
DBUS server misses out some signals. abhijeetaks Programming 0 05-09-2009 12:04 AM
Way Too Many Cache Misses [squid] rozilla Linux - Networking 6 07-23-2008 04:13 PM
openSUSE 10: Samba failed to create the cache directory in /var/cache mianmajidali Linux - Server 0 05-09-2008 02:00 AM
Error: Caching enabled and local cache: //var/cache/yum/base/primary.xml.gz does... dr_zayus69 Linux - Software 2 07-06-2005 04:32 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - Software

All times are GMT -5. The time now is 06:31 PM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration