lwip-users
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [lwip-users] TCP Sessions Scale Limit


From: Joel Cunningham
Subject: Re: [lwip-users] TCP Sessions Scale Limit
Date: Tue, 27 Feb 2018 10:05:20 -0600
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:52.0) Gecko/20100101 Thunderbird/52.6.0

If you have 128GB of RAM (wow!!!), it might be best to turn off LwIP's heap and pool and just use stdc malloc.  Then you won't be limited by any pool or heap defines in LwIP.  See the below options:

/**
 * MEM_LIBC_MALLOC==1: Use malloc/free/realloc provided by your C-library
 * instead of the lwip internal allocator. Can save code size if you
 * already use it.
 */
#if !defined MEM_LIBC_MALLOC || defined __DOXYGEN__
#define MEM_LIBC_MALLOC                 0
#endif

/**
 * MEMP_MEM_MALLOC==1: Use mem_malloc/mem_free instead of the lwip pool allocator.  * Especially useful with MEM_LIBC_MALLOC but handle with care regarding execution  * speed (heap alloc can be much slower than pool alloc) and usage from interrupts  * (especially if your netif driver allocates PBUF_POOL pbufs for received frames
 * from interrupt)!
 * ATTENTION: Currently, this uses the heap for ALL pools (also for private pools,
 * not only for internal pools defined in memp_std.h)!
 */
#if !defined MEMP_MEM_MALLOC || defined __DOXYGEN__
#define MEMP_MEM_MALLOC                 0
#endif

Joel

On 02/27/2018 08:33 AM, Jan Menzel wrote:
The error is cased by a failed call to memp_malloc(MEMP_TCP_SEG). So
you're running out of "simultaneously queued TCP segments". Try
increasing MEMP_NUM_TCP_SEG. Default is 16. Also check the statistics
more closely. After the protocol related block use pasted the TCP part
from a memory and memory pool related block follows which contains
numbers about "TCP_SEG". There you probably have errors as well.

        Jan

On 27.02.2018 15:09, Anil kumar wrote:
I have 128 gig RAM , I feel i have been restricted by some macro.

tcp_write:779 tcp_write: 0 (with mem err)
tcp_create_segment:192 tcp_create_segment: no memory.
tcp_write:779 tcp_write: 0 (with mem err)
tcp_create_segment:192 tcp_create_segment: no memory.
tcp_write:779 tcp_write: 0 (with mem err)
tcp_create_segment:192 tcp_create_segment: no memory.
tcp_write:779 tcp_write: 0 (with mem err)
tcp_create_segment:192 tcp_create_segment: no memory.
tcp_write:779 tcp_write: 0 (with mem err)
tcp_create_segment:192 tcp_create_segment: no memory.
tcp_write:779 tcp_write: 0 (with mem err)
tcp_create_segment:192 tcp_create_segment: no memory.
tcp_write:779 tcp_write: 0 (with mem err)
tcp_create_segment:192 tcp_create_segment: no memory.
tcp_write:779 tcp_write: 0 (with mem err)
tcp_create_segment:192 tcp_create_segment: no memory.
tcp_write:779 tcp_write: 0 (with mem err)
tcp_create_segment:192 tcp_create_segment: no memory.
tcp_write:779 tcp_write: 0 (with mem err)
tcp_create_segment:192 tcp_create_segment: no memory.
tcp_write:779 tcp_write: 0 (with mem err)
tcp_create_segment:192 tcp_create_segment: no memory.
tcp_write:779 tcp_write: 0 (with mem err)


address@hidden:~$ cat /proc/meminfo
MemTotal:       132024188 kB
MemFree:        101949284 kB
MemAvailable:   119384708 kB
Buffers:         1616608 kB
Cached:         15111964 kB
SwapCached:            0 kB
Active:         11114268 kB
Inactive:        8722364 kB
Active(anon):    3108632 kB
Inactive(anon):     1368 kB
Active(file):    8005636 kB
Inactive(file):  8720996 kB
Unevictable:           0 kB
Mlocked:               0 kB
SwapTotal:      134205436 kB
SwapFree:       134205436 kB
Dirty:               548 kB
Writeback:             0 kB
AnonPages:       3108060 kB
Mapped:          2152924 kB
Shmem:              1936 kB
Slab:            1435644 kB
SReclaimable:    1329316 kB
SUnreclaim:       106328 kB
KernelStack:       10192 kB
PageTables:        31252 kB
NFS_Unstable:          0 kB
Bounce:                0 kB
WritebackTmp:          0 kB
CommitLimit:    196023224 kB
Committed_AS:   34203972 kB
VmallocTotal:   34359738367 kB
VmallocUsed:           0 kB
VmallocChunk:          0 kB
HardwareCorrupted:     0 kB
AnonHugePages:   2727936 kB
CmaTotal:              0 kB
CmaFree:               0 kB
HugePages_Total:    4096
HugePages_Free:     4032
HugePages_Rsvd:        0
HugePages_Surp:        0
Hugepagesize:       2048 kB
DirectMap4k:      272572 kB
DirectMap2M:    18591744 kB
DirectMap1G:    115343360 kB
address@hidden:~$


On 27 February 2018 at 19:29, Jan Menzel <address@hidden
<mailto:address@hidden>> wrote:

     On 27.02.2018 14:54, Anil kumar wrote:
     [...]
     >         memerr: 20829
     [...]

     You have memory (RAM) problems.

             Jan

     _______________________________________________
     lwip-users mailing list
     address@hidden <mailto:address@hidden>
     https://lists.nongnu.org/mailman/listinfo/lwip-users
     <https://lists.nongnu.org/mailman/listinfo/lwip-users>




--
With Regards
Anil Kumar S N


_______________________________________________
lwip-users mailing list
address@hidden
https://lists.nongnu.org/mailman/listinfo/lwip-users

_______________________________________________
lwip-users mailing list
address@hidden
https://lists.nongnu.org/mailman/listinfo/lwip-users





reply via email to

[Prev in Thread] Current Thread [Next in Thread]