[Squid 2.6STABLE14] Requests duren soms eeuwen?

Pagina: 1
Acties:
  • 346 views sinds 30-01-2008
  • Reageer

  • nipro
  • Registratie: Juni 2007
  • Laatst online: 09-03 20:22
Afgelopen zaterdag heb ik weer eens een Squid proxy opgesteld bij wijze van test op mijn thuisserver. Het installeren verliep allemaal voorspoedig, net als het instellen van de proxy. Nu heb ik de proxy draaien met 1 client, maar hij's traag als dikke stront door een trechter: de ene request handelt 'ie snel af, maar de volgende duurt soms wel 30 sec. tot een minuut (of langer).

Ik ben nu sinds zaterdag bezig om het probleem op te lossen, maar ik ben ten einde raad. De logs vertellen mij niks raars, en ook de cachemgr verteld me niks raars. ook op internet heb ik gezocht, maar ik kan geen soortgelijk probleem vinden.

Hopelijk kan iemand me helpen!

Ps.: Tips over mijn squid-config zijn natuurlijk ook welkom :)

wat specificaties:
server:
  • AMD BE-2350
  • OCZ 1 Gig, ddr2-800
  • 500 gig hd
  • Gigabyte mamaplank
  • Ubuntu Linux 7.10 server
  • software: lighttpd, mysql, php, dnsmasq, squid
client:
iBook G4, 1.5gb ram
Mac OS 10.4.10, Safari 3 beta

squid.conf:
code:
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
http_port 8080
httpd_accel_no_pmtu_disc always
cache_mem 25 MB
maximum_object_size_in_memory 512 KB
cache_replacement_policy heap LFUDA
memory_replacement_policy heap LFUDA
cache_swap_low 95
cache_swap_high 98
cache_dir aufs /var/spool/squid 20000 16 256
dns_nameservers 127.0.0.1
hosts_file /etc/hosts
logfile_rotate 10
log_icp_queries off
buffered_logs on
#Recommended minimum configuration:
acl all src 0.0.0.0/0.0.0.0
acl manager proto cache_object
acl localhost src 127.0.0.1/255.255.255.255
acl to_localhost dst 127.0.0.0/8
acl SSL_ports port 443          # https
acl SSL_ports port 563          # snews
acl SSL_ports port 873          # rsync
acl Safe_ports port 80          # http
acl Safe_ports port 21          # ftp
acl Safe_ports port 443         # https
acl Safe_ports port 70          # gopher
acl Safe_ports port 210         # wais
acl Safe_ports port 1025-65535  # unregistered ports
acl Safe_ports port 280         # http-mgmt
acl Safe_ports port 488         # gss-http
acl Safe_ports port 591         # filemaker
acl Safe_ports port 777         # multiling http
acl Safe_ports port 631         # cups
acl Safe_ports port 873         # rsync
acl Safe_ports port 901         # SWAT
acl purge method PURGE
acl CONNECT method CONNECT
acl internal_network src 192.168.1.60-192.168.1.254
#Recommended minimum configuration:
http_access allow manager localhost 
http_access deny manager
http_access allow purge localhost
http_access deny purge
http_access deny !Safe_ports
http_access deny CONNECT !SSL_ports
http_access deny to_localhost
http_access allow internal_network
http_access allow localhost
http_access deny all
icp_access allow all
cache_mgr bladiebla@internets.com
httpd_suppress_version_string on
memory_pools off
via off
forwarded_for off
client_db off
header_replace User-Agent WickyDeViking/1.0 (Ricky Martin is the shit!)


mgr:5min:
code:
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
HTTP/1.0 200 OK
Server: squid
Date: Tue, 23 Oct 2007 12:40:23 GMT
Content-Type: text/plain
Expires: Tue, 23 Oct 2007 12:40:23 GMT
Last-Modified: Tue, 23 Oct 2007 12:40:23 GMT
X-Cache: MISS from alibabba.post.lan
X-Cache-Lookup: MISS from alibabba.post.lan:8080
Via: 1.0 alibabba.post.lan:8080 (squid)
Proxy-Connection: close

sample_start_time = 1193142907.616559 (Tue, 23 Oct 2007 12:35:07 GMT)
sample_end_time = 1193143207.628791 (Tue, 23 Oct 2007 12:40:07 GMT)
client_http.requests = 0.019999/sec
client_http.hits = 0.000000/sec
client_http.errors = 0.000000/sec
client_http.kbytes_in = 0.016666/sec
client_http.kbytes_out = 0.093330/sec
client_http.all_median_svc_time = 0.142521 seconds
client_http.miss_median_svc_time = 0.097357 seconds
client_http.nm_median_svc_time = 0.000000 seconds
client_http.nh_median_svc_time = 0.000000 seconds
client_http.hit_median_svc_time = 0.000000 seconds
server.all.requests = 0.019999/sec
server.all.errors = 0.000000/sec
server.all.kbytes_in = 0.093330/sec
server.all.kbytes_out = 0.013333/sec
server.http.requests = 0.019999/sec
server.http.errors = 0.000000/sec
server.http.kbytes_in = 0.093330/sec
server.http.kbytes_out = 0.013333/sec
server.ftp.requests = 0.000000/sec
server.ftp.errors = 0.000000/sec
server.ftp.kbytes_in = 0.000000/sec
server.ftp.kbytes_out = 0.000000/sec
server.other.requests = 0.000000/sec
server.other.errors = 0.000000/sec
server.other.kbytes_in = 0.000000/sec
server.other.kbytes_out = 0.000000/sec
icp.pkts_sent = 0.000000/sec
icp.pkts_recv = 0.000000/sec
icp.queries_sent = 0.000000/sec
icp.replies_sent = 0.000000/sec
icp.queries_recv = 0.000000/sec
icp.replies_recv = 0.000000/sec
icp.replies_queued = 0.000000/sec
icp.query_timeouts = 0.000000/sec
icp.kbytes_sent = 0.000000/sec
icp.kbytes_recv = 0.000000/sec
icp.q_kbytes_sent = 0.000000/sec
icp.r_kbytes_sent = 0.000000/sec
icp.q_kbytes_recv = 0.000000/sec
icp.r_kbytes_recv = 0.000000/sec
icp.query_median_svc_time = 0.000000 seconds
icp.reply_median_svc_time = 0.000000 seconds
dns.median_svc_time = 0.028094 seconds
unlink.requests = 0.000000/sec
page_faults = 0.000000/sec
select_loops = 1.526604/sec
select_fds = 0.233324/sec
average_select_fd_period = 4.285889/fd
median_select_fds = 0.000000
swap.outs = 0.003333/sec
swap.ins = 0.000000/sec
swap.files_cleaned = 0.000000/sec
aborted_requests = 0.000000/sec
syscalls.polls = 1.526604/sec
syscalls.disk.opens = 0.003333/sec
syscalls.disk.closes = 0.006666/sec
syscalls.disk.reads = 0.000000/sec
syscalls.disk.writes = 0.023332/sec
syscalls.disk.seeks = 0.000000/sec
syscalls.disk.unlinks = 0.003333/sec
syscalls.sock.accepts = 0.006666/sec
syscalls.sock.sockets = 0.019999/sec
syscalls.sock.connects = 0.019999/sec
syscalls.sock.binds = 0.019999/sec
syscalls.sock.closes = 0.023332/sec
syscalls.sock.reads = 0.136661/sec
syscalls.sock.writes = 0.089996/sec
syscalls.sock.recvfroms = 0.033332/sec
syscalls.sock.sendtos = 0.016666/sec
cpu_time = 0.008000 seconds
wall_time = 300.012232 seconds
cpu_usage = 0.002667%


mgr:info:
code:
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
HTTP/1.0 200 OK
Server: squid
Date: Tue, 23 Oct 2007 12:46:50 GMT
Content-Type: text/plain
Expires: Tue, 23 Oct 2007 12:46:50 GMT
Last-Modified: Tue, 23 Oct 2007 12:46:50 GMT
X-Cache: MISS from alibabba.post.lan
X-Cache-Lookup: MISS from alibabba.post.lan:8080
Via: 1.0 alibabba.post.lan:8080 (squid)
Proxy-Connection: close

Squid Object Cache: Version 2.6.STABLE14
Start Time:     Tue, 23 Oct 2007 10:43:07 GMT
Current Time:   Tue, 23 Oct 2007 12:46:50 GMT
Connection information for squid:
        Number of clients accessing cache:      0
        Number of HTTP requests received:       691
        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.6
        Average ICP messages per minute since start:    0.0
        Select loop called: 18404 times, 403.342 ms avg
Cache information for squid:
        Request Hit Ratios:     5min: 11.7%, 60min: 34.5%
        Byte Hit Ratios:        5min: 4.4%, 60min: 13.3%
        Request Memory Hit Ratios:      5min: 0.0%, 60min: 0.0%
        Request Disk Hit Ratios:        5min: 100.0%, 60min: 51.8%
        Storage Swap size:      22132 KB
        Storage Mem size:       1448 KB
        Mean Object Size:       9.06 KB
        Requests given to unlinkd:      0
Median Service Times (seconds)  5 min    60 min:
        HTTP Requests (All):   0.22004  0.09219
        Cache Misses:          0.24524  0.19742
        Cache Hits:            0.00815  0.00975
        Near Hits:             0.00000  0.09219
        Not-Modified Replies:  0.00000  0.00000
        DNS Lookups:           0.04639  0.03532
        ICP Queries:           0.00000  0.00000
Resource usage for squid:
        UP Time:        7423.114 seconds
        CPU Time:       0.852 seconds
        CPU Usage:      0.01%
        CPU Usage, 5 minute avg:        0.05%
        CPU Usage, 60 minute avg:       0.01%
        Process Data Segment Size via sbrk(): 4400 KB
        Maximum Resident Size: 0 KB
        Page faults with physical i/o: 0
Memory usage for squid via mallinfo():
        Total space in arena:    4400 KB
        Ordinary blocks:         4277 KB     22 blks
        Small blocks:               0 KB      0 blks
        Holding blocks:           864 KB      2 blks
        Free Small blocks:          0 KB
        Free Ordinary blocks:     122 KB
        Total in use:            5141 KB 98%
        Total free:               122 KB 2%
        Total size:              5264 KB
Memory accounted for:
        Total accounted:         1963 KB
        memPoolAlloc calls: 117446
        memPoolFree calls: 107864
File descriptor usage for squid:
        Maximum number of file descriptors:   1024
        Largest file desc currently in use:     23
        Number of file desc currently in use:   16
        Files queued for open:                   0
        Available number of file descriptors: 1008
        Reserved number of file descriptors:   100
        Store Disk files open:                   0
        IO loop method:                     epoll
Internal Data Structures:
          2476 StoreEntries
           200 StoreEntries with MemObjects
           199 Hot Object Cache Items
          2444 on-disk objects

Hoempapaaa Holladiejeej.


  • nipro
  • Registratie: Juni 2007
  • Laatst online: 09-03 20:22
niemand? :)

Hoempapaaa Holladiejeej.


  • ChaserBoZ_
  • Registratie: September 2005
  • Laatst online: 04-01 10:58
Hey, heb wel wat beters te doen dan hele dag got'ten :P


Ik zou de config zo beperkt mogelijk maken (alles toelaten etc), en eens kijken wat er dan gebeurt.

'Maar het heeft altijd zo gewerkt . . . . . . '


  • nipro
  • Registratie: Juni 2007
  • Laatst online: 09-03 20:22
ChaserBoZ_ schreef op woensdag 24 oktober 2007 @ 20:43:
[...]


Hey, heb wel wat beters te doen dan hele dag got'ten :P


Ik zou de config zo beperkt mogelijk maken (alles toelaten etc), en eens kijken wat er dan gebeurt.
Haha, het is vakantie eh ;)

Deze configuratie is al vrij beperkt qua ACL's. Ik heb daarnet even de andere verwijderd, maar ook dit helpt niks. Is er iets waarmee ik kan checken of het ligt aan de verbinding client->server, of aan server->internet?

Hoempapaaa Holladiejeej.


  • nipro
  • Registratie: Juni 2007
  • Laatst online: 09-03 20:22
schopje dan maar weer ;)

Hoempapaaa Holladiejeej.


  • weijl
  • Registratie: Juli 2002
  • Niet online
code:
1
header_replace User-Agent WickyDeViking/1.0 (Ricky Martin is the shit!)


gaat iig niet werken zonder reply/request_header_access regels in je config. (althans, in 3.0 dan.)
verder zie ik niets raars..
Pagina: 1