mirror of
https://github.com/genodelabs/genode.git
synced 2024-12-20 06:07:59 +00:00
parent
302e30662a
commit
24107d7a48
@ -49,6 +49,19 @@
|
||||
#define TCP_MSS 1460
|
||||
#define TCP_SND_BUF (2 * TCP_MSS)
|
||||
|
||||
/*
|
||||
* We reduce the maximum segment lifetime from one minute to one second to
|
||||
* avoid queuing up PCBs in TIME-WAIT state. This is the state, PCBs end up
|
||||
* after closing a TCP connection socket at the server side. The number of PCBs
|
||||
* in this state is apparently not limited by the value of 'MEMP_NUM_TCP_PCB'.
|
||||
* One allocation costs around 160 bytes. If clients connect to the server at a
|
||||
* high rate, those allocations accumulate quickly and thereby may exhaust the
|
||||
* memory of the server. By reducing the segment lifetime, PCBs in TIME-WAIT
|
||||
* state are cleaned up from the 'tcp_tw_pcbs' queue in a more timely fashion
|
||||
* (by 'tcp_slowtmr()').
|
||||
*/
|
||||
#define TCP_MSL 1000UL
|
||||
|
||||
#define MEMP_NUM_SYS_TIMEOUT 8
|
||||
#define MEMP_NUM_TCP_PCB 64
|
||||
#define MEMP_NUM_NETCONN (MEMP_NUM_TCP_PCB + MEMP_NUM_UDP_PCB + MEMP_NUM_RAW_PCB + MEMP_NUM_TCP_PCB_LISTEN - 1)
|
||||
|
Loading…
Reference in New Issue
Block a user