April 19, 2024, 07:46:35 PM

News : LinuxSolved.com Linux Help Community Forum..


Author Topic: Slow squid performance  (Read 18602 times)

Offline jullyanna

  • Linux Noob !
  • *
  • Posts: 5
Slow squid performance
« on: April 22, 2007, 11:41:05 AM »
Hello
New to this forum
Hope every one fine and enjoing the .......................

Here my problem is i am using squid  cache on dsl 256k

working i see it in logs

But it is  is slower then direct isp proxy

To be more clear when my client use my  cache in proxy it slow down the browsing
And if use isp proxy it is four or five time faster
I think it must be revesed
I tried single also cache_peer
my squid.conf
==============Isp proxy
cache_peer proxy.abc.com parent 8080 3130 weight=10 no-query round-robin no-digest no-net#db-exchange no-delay
cache_peer proxy.xyz.com parent 8080 0 weight=60 no-query round-robin no-digest no-netdb-exchange no-delay
acl all src 0.0.0.0/0.0.0.0
never_direct allow all 



cache_mem 128 MB
cache_dir diskd /usr/local/squid/var/cache 30000 16 256 Q1=72 Q2=64

cache_store_log none
acl manager proto cache_object
acl localhost src 127.0.0.1/255.255.255.255
#here your  network
acl lan src 192.168.1.0/255.255.255.0
acl SSL_ports port 443 563
acl Safe_ports port 80 21 443 563 70 210 1025-65535
acl Safe_ports port 280
acl Safe_ports port 488
acl Safe_ports port 591
acl Safe_ports port 777
acl CONNECT method CONNECT
refresh_pattern . 9999 99% 99990 override-expire reload-into-ims override-lastmod
refresh_pattern ^gopher: 1440 0% 1440
refresh_pattern ^ftp: 1440 90% 10080
                                                                               
#refresh_pattern         .                 480   50%   22160
                                                                               
#reference_age 3 months
quick_abort_min 16 KB
quick_abort_max 16 KB
quick_abort_pct 95
                                                                               
negative_ttl 0 minutes
positive_dns_ttl 24 hours
negative_dns_ttl 1 minutes
range_offset_limit 0 KB
connect_timeout 120 minutes
peer_connect_timeout  600 seconds
read_timeout 15 minutes
request_timeout 60 seconds
client_lifetime 1 day
pconn_timeout 120 seconds
                                                                               
shutdown_lifetime 30 seconds

http_access allow manager localhost
http_access deny manager
http_access deny !Safe_ports
http_access deny CONNECT !SSL_ports
http_access allow lan
http_access deny all
icp_access allow all
miss_access allow all
cache_mgr mmmm@hotmail.com
visible_hostname fast.com
unique_hostname fast.com
cache_effective_user squid
cache_effective_group squid
httpd_accel_host vertual
httpd_accel_port 80
httpd_accel_with_proxy on
httpd_accel_uses_host_header on
http_port 8080
http_port 3128
#icp_port 3130

=======================
cache log
2007/04/21 00:54:12| storeDirWriteCleanLogs: Starting...
2007/04/21 00:54:12|   Finished.  Wrote 150 entries.
2007/04/21 00:54:12|   Took 0.0 seconds (337837.8 entries/sec).
2007/04/21 00:54:12| logfileRotate: /usr/local/squid/var/logs/access.log
2007/04/21 00:54:12| helperOpenServers: Starting 5 'dnsserver' processes
2007/04/21 10:48:53| urlParse: Illegal hostname '.yahoo.com'
2007/04/21 14:48:41| parseHttpRequest: Unsupported method 'ZCONNECT'
2007/04/21 14:48:41| clientReadRequest: FD 31 Invalid Request
2007/04/21 14:48:41| parseHttpRequest: Unsupported method 'on:'
2007/04/21 14:48:41| clientReadRequest: FD 31 Invalid Request
2007/04/21 17:34:41| CACHEMGR: <unknown>@127.0.0.1 requesting 'menu'
2007/04/21 17:34:46| CACHEMGR: <unknown>@127.0.0.1 requesting 'server_list'

nat and every thing has been done properly as in NAT  discused in forum

Offline Ricky

  • LST CareTaker
  • Specially Skilled
  • *****
  • Posts: 2381
Re: Slow squid performance
« Reply #1 on: April 22, 2007, 02:33:58 PM »
You seems to have a lots of tweak done yourself before asking in the forum.

give me sometime so that I can examine your config and can sort out the most possible issue.

Thank you!!

Offline Ricky

  • LST CareTaker
  • Specially Skilled
  • *****
  • Posts: 2381
Re: Slow squid performance
« Reply #2 on: April 22, 2007, 08:16:36 PM »
I think the problem starts right from the begining. You have specified
Quote
cache_peer proxy.abc.com parent 8080 3130 weight=10 no-query round-robin no-digest no-net#db-exchange no-delay

first of all you are saying that you want "round-robin" but then you are giving "weight=10" also.  Secondly, you are saying "no-query" but on the other hand you are giving "ICP / UDP port as 3130" ..
Little confusing ?

I think you should start fresh with minimalistic configuration ie.
follow my quick how to on squid configuration & tell me what are your current observations.
else is just fine.. and seems (as I said earlier..) you tried a to tweak already :)


Offline jullyanna

  • Linux Noob !
  • *
  • Posts: 5
Re: Slow squid performance
« Reply #3 on: April 23, 2007, 06:46:23 AM »
Thanks for HELP

first #icp_port 3130
It is uncomented so not working
 if remove the weight  it runs roundrobin fast  and even before completing the page it jumps to other

other thing i first tried that as on your first HOWTO
the result is same
even to day i  remove the weight
In this case the access.log shows that they are only using first peer and never go second
I also try with out round robin the same thing happen
and with both commands weight and round robin it work with both
and in all setchuations but slow in all way
The same thing happen
works faster with direct isp in client pc  and work slow wia squid
here the diagram of lan
lan and clients are in same hub server address is used as proxy in clients with one NC
browsing with server system pc redhat 9.0 browsing is very good with or without isp proxy /
Thanks

Offline Ricky

  • LST CareTaker
  • Specially Skilled
  • *****
  • Posts: 2381
Re: Slow squid performance
« Reply #4 on: April 23, 2007, 09:54:39 AM »
I was talking about 3130 port which you have mentioned in cache_peer. its there actually telling proxy to use that port to determine parent cache's availibility & authenticity. Try removing that from cache_peer directive.

May I also get 10-20 lines of access.log !

Offline jullyanna

  • Linux Noob !
  • *
  • Posts: 5
Re: Slow squid performance
« Reply #5 on: April 23, 2007, 02:12:50 PM »
1177337701.832    116 192.168.1.101 TCP_MISS/200 4748 GET http://rcm-images.amazon.com/images/P/B0008237AA.01._SL110_.jpg - NONE/- image/jpeg
1177337701.869    219 192.168.1.4 TCP_MISS/200 5095 GET http://sjc-static12.sjc.youtube.com/vi/INC-7xUaTLA/3.jpg - NONE/- image/jpeg
1177337709.310     30 192.168.1.4 TCP_IMS_HIT/304 213 GET http://www.youtube.com/img/icn_add_over_20x20.gif - NONE/- image/gif
1177337719.478    357 192.168.1.4 TCP_MISS/200 322 GET http://video.google.com/s? - ROUNDROBIN_PARENT/proxy.abc.com text/html
1177337719.678    368 192.168.1.4 TCP_MISS/200 322 GET http://video.google.com/s? - ROUNDROBIN_PARENT/proxy.xyz.com text/html
1177337734.014    805 192.168.1.101 TCP_MISS/200 5337 GET http://3.adbrite.com/mb/text_group.php? - ROUNDROBIN_PARENT/proxy.abc.com text/html
1177337735.682   1638 192.168.1.101 TCP_MISS/000 7142 CONNECT www.paypal.com:443 - ROUNDROBIN_PARENT/proxy.abc.com -
1177337736.995   5414 192.168.1.101 TCP_MISS/200 13555 GET http://www.question911.com/linkout.php? - NONE/- text/html
1177337755.846    792 192.168.1.4 TCP_MISS/200 4385 GET http://www.youtube.com/set_awesome? - ROUNDROBIN_PARENT/proxy.abc.com text/xml
1177337760.447    892 192.168.1.4 TCP_MISS/200 321 GET http://video.google.com/s? - ROUNDROBIN_PARENT/proxy.xyz.com text/html

1177337962.800    864 192.168.1.4 TCP_MISS/200 3829 GET http://sjl-static6.sjl.youtube.com/vi/H0kFVYYif1U/2.jpg - NONE/- image/jpeg
1177337962.876    925 192.168.1.4 TCP_MISS/200 3175 GET http://img.youtube.com/vi/bAarPkCdX1A/2.jpg - NONE/- image/jpeg
1177337962.972   1588 192.168.1.4 TCP_MISS/200 2776 GET http://sjl-static9.sjl.youtube.com/vi/uGEbbfxVX-o/2.jpg - ROUNDROBIN_PARENT/proxy.abc.com image/jpeg
1177337962.976   1745 192.168.1.4 TCP_MISS/200 4496 GET http://img.youtube.com/vi/_FYijSBCjaY/2.jpg - ROUNDROBIN_PARENT/proxy.abc.com image/jpeg
1177337963.413   1719 192.168.1.4 TCP_MISS/200 2800 GET http://img.youtube.com/vi/MQ6C8VvmVCw/2.jpg - ROUNDROBIN_PARENT/proxy.abc.com image/jpeg
1177337964.397   3106 192.168.1.4 TCP_MISS/200 3975 GET http://sjc-static1.sjc.youtube.com/vi/tnRSSYuzr_c/2.jpg - ROUNDROBIN_PARENT/proxy.xyz.com image/jpeg
1177337964.836    810 192.168.1.101 TCP_MISS/200 10968 GET http://content.answers.com/main/content/ahd4/pron/S0102600.wav - NONE/- audio/x-wav
1177337984.060   1200 192.168.1.101 TCP_MISS/200 2365 GET http://actl.aptimus.com/AptiControl/OneClickOrder? - ROUNDROBIN_PARENT/proxy.abc.com text/html
1177337985.125   1044 192.168.1.101 TCP_MISS/302 935 GET http://c.enhance.com/c? - NONE/- text/plain
1177337985.785    645 192.168.1.101 TCP_MISS/302 1167 GET http://c.enhance.com/c/2? - ROUNDROBIN_PARENT/proxy.abc.com text/plain
 



--------------------------------------------------------------------------------
Parent     : proxy.xyz.com/8080/0
Flags      : no-query no-digest round-robin no-netdb-exchange no-delay
Address[0] : 212.xx.xx.xx
Status     : Up
AVG RTT    : 0 msec
OPEN CONNS : 1
LAST QUERY : 1177338163 seconds ago
LAST REPLY : 1177338163 seconds ago
PINGS SENT :        0
PINGS ACKED:        0   0%
FETCHES    :   120225   0%
IGNORED    :        0   0%
Histogram of PINGS ACKED
keep-alive ratio: 78%

Parent     : adsl.abc.com/8080/0
Flags      : no-query no-digest round-robin no-netdb-exchange no-delay
Address[0] : 212.xx.xx.xx
Status     : Up
AVG RTT    : 0 msec
OPEN CONNS : 2
LAST QUERY : 1177338163 seconds ago
LAST REPLY : 1177338163 seconds ago
PINGS SENT :        0
PINGS ACKED:        0   0%
FETCHES    :   119843   0%
IGNORED    :        0   0%
Histogram of PINGS ACKED:
keep-alive ratio: 83%

 ================

Cache Clients:
Address: 192.168.1.17
Name: 192.168.1.17
Currently established connections: 0
    ICP Requests 0
    HTTP Requests 34683
        TCP_HIT                 9927  29%
        TCP_MISS                8401  24%
        TCP_REFRESH_HIT          834   2%
        TCP_REFRESH_MISS          27   0%
        TCP_IMS_HIT             8863  26%
        TCP_MEM_HIT             6625  19%
        TCP_DENIED                 6   0%

Address: 192.168.1.15
Name: 192.168.1.15
Currently established connections: 0
    ICP Requests 0
    HTTP Requests 13274
        TCP_HIT                 2168  16%
        TCP_MISS                6484  49%
        TCP_REFRESH_HIT          277   2%
        TCP_REFRESH_MISS          18   0%
        TCP_IMS_HIT             2480  19%
        TCP_MEM_HIT             1845  14%
        TCP_DENIED                 2   0%

Address: 192.168.1.4
Name: 192.168.1.4
Currently established connections: 2
    ICP Requests 0
    HTTP Requests 45806
        TCP_HIT                 6186  14%
        TCP_MISS               25798  56%
        TCP_REFRESH_HIT          596   1%
        TCP_REFRESH_MISS          42   0%
        TCP_IMS_HIT             8441  18%
        TCP_MEM_HIT             4743  10%


Offline jullyanna

  • Linux Noob !
  • *
  • Posts: 5
Re: Slow squid performance
« Reply #6 on: April 23, 2007, 02:23:23 PM »
sir
the port is removed and still same position
once i visit one of our sister company they are also using this squid but same 512 line it shows very fast the viewd  urls are in no time they get and all isp are same

i check that they have lot hof hit not miss 

unfortunatly i am unable to see the squid,conf there
just on req they show me the access log only

I hope we over come with little discusion
Not in hurry take your time use little of your free time only
Thanks

Offline Ricky

  • LST CareTaker
  • Specially Skilled
  • *****
  • Posts: 2381
Re: Slow squid performance
« Reply #7 on: April 23, 2007, 07:23:32 PM »
Well,
A while ago.. 2 years ago .. I had too problem of slow cache ie. squid and lots of tcp_miss .. So that time I tried a lots of things.. including changing filesystem reiserfs , changing file descriptor limits, changing squid thread limts and few other things..

You may try this who is addressing similar thing.. ofcourse you dont have to follow exactly but try to do tweaking this way too.. (I must say that its a nice tutorial)
http://www.linux-faqs.com/squid.php

Offline jullyanna

  • Linux Noob !
  • *
  • Posts: 5
Re: Slow squid performance
« Reply #8 on: April 24, 2007, 04:04:57 AM »
OK
Then can i go back to default  squid,conf

and try one by one