If you want to use Raspberry Pi as a small server, the performance may be poor, but the stability must be ensured. The following describes how to improve the stability of Raspberry Pi on the network.
1) modify it in/etc/sysctl. confVM. min_free_kbytes(8192 to 16384)
# RPI tweaksvm. swappiness = 1 # VM. min_free_kbytes = 8192vm. min_free_kbytes = 16384
The USB driver allocates memory from the kernel. When the network load is heavy, the memory may be exhausted, resulting in a fault.
2) add the final content in/boot/cmdline.txtSmsc95xx. turbo_mode = N
Dwc_otg.lpm_enable = 0 console = ttyama0, 115200 console = tty1 root =/dev/mmcblk0p2 rootfstype = ext4 elevator = deadline smsc95xx. turbo_mode = n rootwait
Disable the acceleration mode. This modification reduces the network speed, but improves the stability.
Source:Http://elinux.org/R-Pi_Troubleshooting#Crashes_occur_with_high_network_load
Adding a heat sink to the chip and a stable and high-current power supply can make your Raspberry Pi more stable.
Several Methods to Improve Raspberry Pi's network stability.