Gentoo Archives: gentoo-user

From: Grant <emailgrant@×××××.com>
To: Gentoo mailing list <gentoo-user@l.g.o>
Subject: Re: [gentoo-user] Proxy server problem
Date: Mon, 26 Aug 2013 06:25:21
Message-Id: CAN0CFw3tfnGDom_-i1C6p0nCiG6srq0c0wpDuaJvYBD5=F1E2g@mail.gmail.com
In Reply to: Re: [gentoo-user] Proxy server problem by Pandu Poluan
1 >> >> >> >> I set up squid on a remote system so I can browse the internet
2 >> >> >> >> from
3 >> >> >> >> that IP address. It works but it stalls frequently. I had
4 >> >> >> >> similar
5 >> >> >> >> results with ziproxy. I went over this with the squid list but
6 >> >> >> >> we
7 >> >> >> >> got nowhere as it seems to be some kind of a system or network
8 >> >> >> >> problem.
9 >> >> >> >>
10 >> >> >> >>
11 >> >> >> >> http://squid-web-proxy-cache.1019090.n4.nabble.com/squid-3-3-5-hangs-> >> >>
12 >> >> >> >> the -en tire-system-td4660893.html
13 >> >> >> >>
14 >> >> >> >> Can anyone here help me figure out what is wrong? I'm not sure
15 >> >> >> >> where
16 >> >> >> >> to start.
17 >> >
18 >> > Is this stalling problem happening when you just browse the internet,
19 >> > visiting
20 >> > websites, or do you get it when you are downloading large files such as
21 >> > videos, or music? If it is the former, then I am not sure what causes
22 >> > it. If
23 >> > it is the latter, then this may be relevant to http timeout settings.
24 >>
25 >> Actually it happens when I'm just browsing the internet. How can a
26 >> problem of this nature be debugged?
27 >>
28 >> - Grant
29 >>
30 >
31 > After reading your description on the squid mailing list, I'm suspicious
32 > that you might've run out of TCP buffers.
33 >
34 > Please post the results of:
35 >
36 > sysctl -A | egrep "(mem)|(tcp)"
37
38 Hi Pandu, thank you for having a look. These commands were run during a stall.
39
40 Proxy Server:
41
42 # sysctl -A | egrep "(mem)|(tcp)"
43 fs.nfs.nlm_tcpport = 0
44 net.core.optmem_max = 20480
45 net.core.rmem_default = 212992
46 net.core.rmem_max = 212992
47 net.core.wmem_default = 212992
48 net.core.wmem_max = 212992
49 net.ipv4.igmp_max_memberships = 20
50 net.ipv4.tcp_abort_on_overflow = 0
51 net.ipv4.tcp_adv_win_scale = 1
52 net.ipv4.tcp_allowed_congestion_control = cubic reno
53 net.ipv4.tcp_app_win = 31
54 net.ipv4.tcp_available_congestion_control = cubic reno
55 net.ipv4.tcp_base_mss = 512
56 net.ipv4.tcp_challenge_ack_limit = 100
57 net.ipv4.tcp_congestion_control = cubic
58 net.ipv4.tcp_cookie_size = 0
59 net.ipv4.tcp_dsack = 1
60 net.ipv4.tcp_early_retrans = 2
61 net.ipv4.tcp_ecn = 2
62 net.ipv4.tcp_fack = 1
63 net.ipv4.tcp_fastopen = 0
64 net.ipv4.tcp_fastopen_key = ad627831-f01340bb-a649b04d-35ba63cd
65 net.ipv4.tcp_fin_timeout = 60
66 net.ipv4.tcp_frto = 2
67 net.ipv4.tcp_frto_response = 0
68 net.ipv4.tcp_keepalive_intvl = 75
69 net.ipv4.tcp_keepalive_probes = 9
70 net.ipv4.tcp_keepalive_time = 7200
71 net.ipv4.tcp_limit_output_bytes = 131072
72 net.ipv4.tcp_low_latency = 0
73 net.ipv4.tcp_max_orphans = 8192
74 net.ipv4.tcp_max_ssthresh = 0
75 net.ipv4.tcp_max_syn_backlog = 128
76 net.ipv4.tcp_max_tw_buckets = 8192
77 net.ipv4.tcp_mem = 46323 61766 92646
78 net.ipv4.tcp_moderate_rcvbuf = 1
79 net.ipv4.tcp_mtu_probing = 0
80 net.ipv4.tcp_no_metrics_save = 0
81 net.ipv4.tcp_orphan_retries = 0
82 net.ipv4.tcp_reordering = 3
83 net.ipv4.tcp_retrans_collapse = 1
84 net.ipv4.tcp_retries1 = 3
85 net.ipv4.tcp_retries2 = 15
86 net.ipv4.tcp_rfc1337 = 0
87 net.ipv4.tcp_rmem = 4096 87380 6291456
88 net.ipv4.tcp_sack = 1
89 net.ipv4.tcp_slow_start_after_idle = 1
90 net.ipv4.tcp_stdurg = 0
91 net.ipv4.tcp_syn_retries = 6
92 net.ipv4.tcp_synack_retries = 5
93 net.ipv4.tcp_thin_dupack = 0
94 net.ipv4.tcp_thin_linear_timeouts = 0
95 net.ipv4.tcp_timestamps = 1
96 net.ipv4.tcp_tso_win_divisor = 3
97 net.ipv4.tcp_tw_recycle = 0
98 net.ipv4.tcp_tw_reuse = 0
99 net.ipv4.tcp_window_scaling = 1
100 net.ipv4.tcp_wmem = 4096 16384 4194304
101 net.ipv4.tcp_workaround_signed_windows = 0
102 net.ipv4.udp_mem = 46521 62030 93042
103 net.ipv4.udp_rmem_min = 4096
104 net.ipv4.udp_wmem_min = 4096
105 net.netfilter.nf_conntrack_tcp_be_liberal = 0
106 net.netfilter.nf_conntrack_tcp_loose = 1
107 net.netfilter.nf_conntrack_tcp_max_retrans = 3
108 net.netfilter.nf_conntrack_tcp_timeout_close = 10
109 net.netfilter.nf_conntrack_tcp_timeout_close_wait = 60
110 net.netfilter.nf_conntrack_tcp_timeout_established = 432000
111 net.netfilter.nf_conntrack_tcp_timeout_fin_wait = 120
112 net.netfilter.nf_conntrack_tcp_timeout_last_ack = 30
113 net.netfilter.nf_conntrack_tcp_timeout_max_retrans = 300
114 net.netfilter.nf_conntrack_tcp_timeout_syn_recv = 60
115 net.netfilter.nf_conntrack_tcp_timeout_syn_sent = 120
116 net.netfilter.nf_conntrack_tcp_timeout_time_wait = 120
117 net.netfilter.nf_conntrack_tcp_timeout_unacknowledged = 300
118 vm.lowmem_reserve_ratio = 256 256 32
119 vm.overcommit_memory = 0
120
121 Client:
122
123 # sysctl -A | egrep "(mem)|(tcp)"
124 fs.nfs.nfs_callback_tcpport = 0
125 fs.nfs.nlm_tcpport = 0
126 net.core.optmem_max = 20480
127 net.core.rmem_default = 212992
128 net.core.rmem_max = 212992
129 net.core.wmem_default = 212992
130 net.core.wmem_max = 212992
131 net.ipv4.igmp_max_memberships = 20
132 net.ipv4.tcp_abort_on_overflow = 0
133 net.ipv4.tcp_adv_win_scale = 1
134 net.ipv4.tcp_allowed_congestion_control = cubic reno
135 net.ipv4.tcp_app_win = 31
136 net.ipv4.tcp_available_congestion_control = cubic reno
137 net.ipv4.tcp_base_mss = 512
138 net.ipv4.tcp_challenge_ack_limit = 100
139 net.ipv4.tcp_congestion_control = cubic
140 net.ipv4.tcp_dsack = 1
141 net.ipv4.tcp_early_retrans = 3
142 net.ipv4.tcp_ecn = 2
143 net.ipv4.tcp_fack = 1
144 net.ipv4.tcp_fastopen = 0
145 net.ipv4.tcp_fastopen_key = af77bb2f-38636dab-7fd80263-df37cea3
146 net.ipv4.tcp_fin_timeout = 60
147 net.ipv4.tcp_frto = 2
148 net.ipv4.tcp_keepalive_intvl = 75
149 net.ipv4.tcp_keepalive_probes = 9
150 net.ipv4.tcp_keepalive_time = 7200
151 net.ipv4.tcp_limit_output_bytes = 131072
152 net.ipv4.tcp_low_latency = 0
153 net.ipv4.tcp_max_orphans = 16384
154 net.ipv4.tcp_max_ssthresh = 0
155 net.ipv4.tcp_max_syn_backlog = 128
156 net.ipv4.tcp_max_tw_buckets = 16384
157 net.ipv4.tcp_mem = 78105 104140 156210
158 net.ipv4.tcp_moderate_rcvbuf = 1
159 net.ipv4.tcp_mtu_probing = 0
160 net.ipv4.tcp_no_metrics_save = 0
161 net.ipv4.tcp_orphan_retries = 0
162 net.ipv4.tcp_reordering = 3
163 net.ipv4.tcp_retrans_collapse = 1
164 net.ipv4.tcp_retries1 = 3
165 net.ipv4.tcp_retries2 = 15
166 net.ipv4.tcp_rfc1337 = 0
167 net.ipv4.tcp_rmem = 4096 87380 6291456
168 net.ipv4.tcp_sack = 1
169 net.ipv4.tcp_slow_start_after_idle = 1
170 net.ipv4.tcp_stdurg = 0
171 net.ipv4.tcp_syn_retries = 6
172 net.ipv4.tcp_synack_retries = 5
173 net.ipv4.tcp_syncookies = 1
174 net.ipv4.tcp_thin_dupack = 0
175 net.ipv4.tcp_thin_linear_timeouts = 0
176 net.ipv4.tcp_timestamps = 1
177 net.ipv4.tcp_tso_win_divisor = 3
178 net.ipv4.tcp_tw_recycle = 0
179 net.ipv4.tcp_tw_reuse = 0
180 net.ipv4.tcp_window_scaling = 1
181 net.ipv4.tcp_wmem = 4096 16384 4194304
182 net.ipv4.tcp_workaround_signed_windows = 0
183 net.ipv4.udp_mem = 78360 104483 156720
184 net.ipv4.udp_rmem_min = 4096
185 net.ipv4.udp_wmem_min = 4096
186 net.netfilter.nf_conntrack_tcp_be_liberal = 0
187 net.netfilter.nf_conntrack_tcp_loose = 1
188 net.netfilter.nf_conntrack_tcp_max_retrans = 3
189 net.netfilter.nf_conntrack_tcp_timeout_close = 10
190 net.netfilter.nf_conntrack_tcp_timeout_close_wait = 60
191 net.netfilter.nf_conntrack_tcp_timeout_established = 432000
192 net.netfilter.nf_conntrack_tcp_timeout_fin_wait = 120
193 net.netfilter.nf_conntrack_tcp_timeout_last_ack = 30
194 net.netfilter.nf_conntrack_tcp_timeout_max_retrans = 300
195 net.netfilter.nf_conntrack_tcp_timeout_syn_recv = 60
196 net.netfilter.nf_conntrack_tcp_timeout_syn_sent = 120
197 net.netfilter.nf_conntrack_tcp_timeout_time_wait = 120
198 net.netfilter.nf_conntrack_tcp_timeout_unacknowledged = 300
199 vm.lowmem_reserve_ratio = 256 256 32
200 vm.overcommit_memory = 0
201
202 - Grant