You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@nuttx.apache.org by GitBox <gi...@apache.org> on 2022/07/27 09:43:19 UTC

[GitHub] [incubator-nuttx] PetervdPerk-NXP opened a new issue, #6721: NuttX with Networking Flash&RAM increase past 60 days.

PetervdPerk-NXP opened a new issue, #6721:
URL: https://github.com/apache/incubator-nuttx/issues/6721

   I've been working to upgrade the NuttX kernel (version ~ 10.1.0+) in PX4 to use the latest apache/incubator-nuttx one.
   However in some preliminary testing I've noticed in my use-cases that my flash usage grow ~ 7KB and RAM usage ~ 1KB.
   
   I've been trying to pinpoint what's the cause and found that most of the changes in the past 60 days.
   From 6bd2d172b024c029981a5f9cb0267ed806f7a305 to 0f7da4fd754113736468831525e2c60006909bea
   Are causing this increased memory usage in both flash and ram.
   
   For example take the teensy-4.x:netsh config (which hasnt changed in the past 7 months)
   
   Compiling master 0f7da4fd754113736468831525e2c60006909bea
   ```
   peter@NXL04520:~/nuttx/nuttx$ arm-none-eabi-size nuttx
      text    data     bss     dec     hex filename
    145836     224   32652  178712   2ba18 nuttx
   ```
   
   Compiling 6bd2d172b024c029981a5f9cb0267ed806f7a305 
   ```
   peter@NXL04520:~/nuttx/nuttx$ arm-none-eabi-size nuttx
      text    data     bss     dec     hex filename
    142352     220   32208  174780   2aabc nuttx
   ```
   
   Diving deeper it seems that the RAM usage increase mostly comes from the changes in tcp_conn_s (g_tcp_connections).
   Master 0f7da4fd754113736468831525e2c60006909bea
   ```
   peter@NXL04520:~/nuttx/nuttx$ arm-none-eabi-nm --print-size --size-sort ./net/tcp_conn.o
   00000000 00000002 b g_last_tcp_port.9059
   00000000 00000008 b g_active_tcp_connections
   00000000 00000008 b g_free_tcp_connections
   00000000 00000010 T tcp_nextconn
   00000000 0000002c T tcp_initialize
   00000000 00000070 t tcp_listener
   00000000 00000080 T tcp_alloc
   00000000 00000098 t tcp_selectport
   00000000 000000a8 T tcp_free
   00000000 000000ac T tcp_bind
   00000000 000000b0 T tcp_active
   00000000 0000010c T tcp_alloc_accept
   00000000 0000010c T tcp_connect
   00000000 000007a0 b g_tcp_connections
   ```
   Compared to 6bd2d172b024c029981a5f9cb0267ed806f7a305
   ```
   peter@NXL04520:~/nuttx/nuttx$ arm-none-eabi-nm --print-size --size-sort ./net/tcp_conn.o
   00000000 00000002 b g_last_tcp_port.8962
   00000000 00000008 b g_active_tcp_connections
   00000000 00000008 b g_free_tcp_connections
   00000000 00000010 T tcp_nextconn
   00000000 0000002c T tcp_initialize
   00000000 00000070 t tcp_listener
   00000000 00000078 T tcp_alloc
   00000000 0000009c T tcp_free
   00000000 0000009c t tcp_selectport
   00000000 000000ac T tcp_bind
   00000000 000000b0 T tcp_active
   00000000 00000100 T tcp_alloc_accept
   00000000 00000108 T tcp_connect
   00000000 000005e0 b g_tcp_connections
   ```
   
   Looking at the changes in net/tcp.h
   I think the main cause are the changes that introduced new variables in `struct tcp_conn_s` which gets statically allocated
   https://github.com/apache/incubator-nuttx/pull/6330 https://github.com/apache/incubator-nuttx/pull/6398


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: commits-unsubscribe@nuttx.apache.org.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


[GitHub] [incubator-nuttx] xiaoxiang781216 closed issue #6721: NuttX with Networking Flash&RAM increase past 60 days.

Posted by GitBox <gi...@apache.org>.
xiaoxiang781216 closed issue #6721: NuttX with Networking Flash&RAM increase past 60 days.
URL: https://github.com/apache/incubator-nuttx/issues/6721


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: commits-unsubscribe@nuttx.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org