resea
resea copied to clipboard
Too many mbuf allocations
There are too many allocs and frees for simple network operations. This could become a problem for performance.
[e1000] received 60 bytes [tcpip] mbuf_alloc() [tcpip] tcp: port=80, seq=00186a01, ack=00000000, len=0 [ SYN ] [tcpip] tcp: new client (port=80) [tcpip] mbuf_alloc() [tcpip] mbuf_alloc() [tcpip] mbuf_alloc() [tcpip] mbuf_alloc() [tcpip] mbuf_alloc() [tcpip] mbuf_alloc() [tcpip] mbuf_delete_one() [tcpip] mbuf_delete_one() [e1000] sent 42 bytes [e1000] received 64 bytes [tcpip] mbuf_alloc() [tcpip] mbuf_alloc() [tcpip] mbuf_delete_one() [tcpip] mbuf_delete_one() [tcpip] mbuf_delete_one() [tcpip] mbuf_delete_one() [e1000] sent 54 bytes [e1000] received 60 bytes [tcpip] mbuf_alloc() [tcpip] tcp: port=80, seq=00186a02, ack=00000001, len=0 [ [e1000] received 195 bytes ACK ] [tcpip] mbuf_alloc() [tcpip] mbuf_alloc() [tcpip] mbuf_delete_one() [tcpip] mbuf_delete_one() [tcpip] mbuf_alloc() [tcpip] mbuf_alloc() [tcpip] mbuf_delete_one() [tcpip] mbuf_delete_one() [tcpip] mbuf_alloc() [tcpip] mbuf_alloc() [tcpip] mbuf_delete_one() [tcpip] mbuf_delete_one() [tcpip] mbuf_alloc() [tcpip] mbuf_alloc() [tcpip] mbuf_delete_one() [tcpip] mbuf_delete_one() [tcpip] mbuf_alloc() [tcpip] tcp: port=80, seq=00186a02, ack=00000001, len=141 [ ACK ] [tcpip] tcp: received 141 bytes (seq=186a02) [tcpip] mbuf_alloc() [tcpip] mbuf_alloc() [tcpip] mbuf_alloc() [tcpip] mbuf_alloc() [tcpip] mbuf_alloc() [tcpip] mbuf_delete_one() [tcpip] mbuf_delete_one() [tcpip] mbuf_delete_one() [tcpip] mbuf_delete_one() [tcpip] mbuf_delete_one() [e1000] sent 54 bytes [webapi] new data
It sounds like a "premature optimization". I do think reducing number of allocations is a good idea but we're not in that phase yet.
I know this is not urgent, I'm just saying it's something you will have to think about.