resea icon indicating copy to clipboard operation
resea copied to clipboard

Too many mbuf allocations

Open ghost opened this issue 5 years ago • 2 comments

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

ghost avatar Apr 03 '20 10:04 ghost

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.

nuta avatar Apr 04 '20 02:04 nuta

I know this is not urgent, I'm just saying it's something you will have to think about.

ghost avatar Apr 04 '20 07:04 ghost