2

On my VPS running I'm recently hitting soft and hardlimits of tcpsndbuf very often, causing the server to become nearly unreachable as load goes up to 45 and higer. I have already tried limiting the number of Apache connections allowed, yet 5 minutes after restaring the server with the new values everything went berserk again. Right now I have:

KeepAlive off
<IfModule mpm_prefork_module>
    StartServers       5
    MinSpareServers    5
    MaxSpareServers    10
    ServerLimit 20
    MaxClients 20
    MaxRequestsPerChild   1000
 </IfModule>

The server currently pushes about 1,5 TB of 20kb-15MB files mostly with apache, partyl with vsftpd and hosts about 5 wordpress blogs that recieve about 300-800 visitors a day.

/proc/user_beancounters says:

uid  resource                     held              maxheld              barrier                limit              failcnt
62327:  kmemsize                 27311616             27428538            193273527            214748364                    0
lockedpages                     0                    0                 2059                 2059                    0
privvmpages                316229               316352              1048576              1101004                    0
shmpages                      745                  745               131072               131072                    0
dummy                           0                    0  9223372036854775807  9223372036854775807                    0
numproc                        95                   95                  650                  650                    0
physpages                  154998               155013                    0  9223372036854775807                    0
vmguarpages                     0                    0               524288  9223372036854775807                    0
oomguarpages               154999               155014  9223372036854775807  9223372036854775807                    0
numtcpsock                     30                   30                  700                  700                    0
numflock                        7                    8                 1000                 1100                    0
numpty                          1                    1                  102                  102                    0
numsiginfo                      0                    0                 1024                 1024                    0
tcpsndbuf                 1573056              1619200              6720000              9408000          23663960828
tcprcvbuf                  491520               491520              6720000              9408000                   42
othersockbuf               224864               226176              5760000              8064000                    0
dgramrcvbuf                     0                 8480              5376000              5376000                    0
numothersock                  139                  139                  600                  600                    0
dcachesize                1319995              1338775             28991028             32212254                    0
numfile                      3125                 3145                17600                17600                    0
dummy                           0                    0                    0                    0                    0
dummy                           0                    0                    0                    0                    0
dummy                           0                    0                    0                    0                    0
numiptent                      71                   71  9223372036854775807  9223372036854775807                    0

What is the most effectiv method to reduce the tcpsndbuf requirements?

As a sidenote, whenever I hit tcpsndbuf limits most of my attempts to download files via wget and alike tools end in messages like "No buffer space available".

schneida
  • 339
  • 1
  • 4
  • 15
  • http://serverfault.com/questions/358346/how-to-see-what-is-causing-failcnt-on-tcpsndbuf – quanta Aug 05 '12 at 06:43
  • hm, from what I have seen, logfiles are not very helpful at all, traffic seems to be as usual, although, tcpsndbuf exceed limits mostly between 22:00 and 01:00. – schneida Aug 05 '12 at 16:00
  • It doesn't seem to be problem - see [this OpenVZ page](http://wiki.openvz.org/UBC_secondary_parameters#tcpsndbuf) – Kamil Šrot Oct 31 '12 at 19:52
  • Hm, it says: "If this restriction is not satisfied, some network connections may silently stall, being unable to transmit data." which is exactly what happens, and what makes the server appear like it wasn't responding anymore. – schneida Nov 08 '12 at 07:41

0 Answers0