Thanks very much, Amos. I will do more math on the statistics i have captured, now having in mind what you said, just to have a better understanding of the behaviour of these proxies. As for the code diving, i'm not sure if i have the necessary skills. thanks, Carlos Defoe On Fri, Mar 29, 2013 at 10:27 AM, Amos Jeffries <squid3@xxxxxxxxxxxxx> wrote: > On 30/03/2013 12:48 a.m., Carlos Defoe wrote: >> >> Hello, >> >> I'm investigating cache manager statistics (60min). >> >> In one sample, i have: >> client_http.requests = 22.785904/sec >> client_http.hits = 6.354478/sec >> client_http.errors = 0.006388/sec >> server.http.requests = 16.956939/sec >> server.http.errors = 0.000000/sec >> aborted_requests = 0.094992/sec >> >> My thoughts: >> >> * client_http.requests means all the http request that arrives to squid; >> * client_http.hits means (approximately) the requests that have been >> completed without using Internet resource, only getting contents from >> the cache; >> * server.http.requests means the requests that are completed making >> access to webservers and downloading content; >> >> So, client_http.hits + server.http.requests =(should be) >> client_http.requests. >> >> But the result is only approximated (23,31 instead of 22,78). >> >> 1) How can i write a equation that fits "requests -> completions"? >> using those errors and aborted requests? i couldn't figure. > > > Unfortunately the recorded metrics are a bit rough and you can't write an > equation to calculate that with the existing details. Things are not as > simple as HTTP-in / HTTP-out used to be and the stats counters have not been > kept up with the feature changes very well. > > Squid performs translation from non-HTTP server protocols which arrive as > client HTTP requests but leave Squid as FTP or Gopher or TCP tunnels. > Squid also services cachemgr requests and error page embeded content which > arrive as client HTTP requests but never get near being a HIT *or* MISS. > Squid also performs re-tries on server errors so one client HTTP request > MISS can mean multiple server HTTP requests. > > * on top of all that, Squid accounting is a bit rough around what is a HIT > and how REFRESH are accounted for. > > So the best metrics to use are actually the client in/out totals and server > in/out totals for bandwidth. From these you can get a ratio of bandwidth > reduction or indication of problems. > > >> 2) In another proxy (one very busy, with bad performance), >> client_http.hits + server.http.requests doesn't go near >> client_http.requests: >> >> client_http.requests = 66.597198/sec >> client_http.hits = 8.075425/sec >> client_http.errors = 0.132439/sec >> server.http.requests = 19.327989/sec >> server.http.errors = 0.000000/sec >> aborted_requests = 0.733549/sec >> >> In this case, i think most of the requests (66 - (19+8)) are being >> lost, as this proxy server is in realy bad performance and it's >> hardware is not capable to serve all the requests. But those lost >> requests, where have >> they gone (in statistics)? > > > Good question. Like to go code diving to find out? > > Amos