Changes between Initial Version and Version 1 of 269-tue-oct-26-143448-2004-36880-write-udpv4--no-buffer-space-available-code105

01/30/14 16:10:02 (10 years ago)
Samuli Seppänen



  • 269-tue-oct-26-143448-2004-36880-write-udpv4--no-buffer-space-available-code105

    v1 v1  
     1= Tue Oct 26 14:34:48 2004 36880: write UDPv4 []: No buffer space available (code=105) =
     6<p>Increase the required free memory. I recommend at least 2 MB, which you can set with:</p>
     8<pre><strong>echo 2048 &gt;/proc/sys/vm/min_free_kbytes</strong></pre>
     10<p>If you don't bump it up, the min_free_kbytes value for 2.6 kernels gets set to something pitifully small, giving the kernel essentially no incentive to reclaim memory that's no longer used. You can watch your free memory gradually decline by running <strong>free</strong> or <strong>vmstat</strong>periodically - once per hour or so.</p>
     11<p>You can kick the kernel into freeing memory by running something that allocates a lot of memory, something like <strong>hdparm -tT /dev/hda</strong>. Apparently when servicing userspace requests for memory, the kernel can free unused memory if it doesn't have enough, but when servicing interrupts caused by events like packet arrivals it needs to have enough memory free before the interrupt. (I'm unsure of this explanation, but it seems to make sense and agrees with what I've observed happening.)</p>
     12<p>I set min_free_kbytes to 8 MB on my servers, which have lots of RAM. The (2.6.6) system I use for my OpenVPN tunnel at home has only 64 MB of RAM, so I use 2 MB for its min_free_kbytes. Its current uptime is 110 days.</p>
     13<p>Most of the time, the kernel will actually keep quite a bit more memory free than the minimum specified, so don't specifiy too large a value.</p>
     14<em>Dick St.Peters</em>
     17[wiki:FAQ Return to FAQ]