Hello,

Regarding RAM usage, this page contains information about configuring Mbed TLS for low-memory environments: https://tls.mbed.org/kb/how-to/reduce-mbedtls-memory-and-storage-footprint

Please note that this is a list of possible settings and not all of them might apply to your case. For example, reducing the size of the SSL input buffer only works if your peer cooperates (either by supporting the max fragment length extension, or otherwise not sending large records). If it applies to your situation, this setting is probably the most important, as by default there are two 16 kB buffers per connection, and lowering that value can have a big impact.

Regards,
Manuel.


From: mbed-tls <mbed-tls-bounces@lists.trustedfirmware.org> on behalf of Sunil Jain via mbed-tls <mbed-tls@lists.trustedfirmware.org>
Sent: 30 September 2021 07:08
To: mbed-tls@lists.trustedfirmware.org <mbed-tls@lists.trustedfirmware.org>
Subject: [mbed-tls] RAM usage and Slowness issue
 
Hello,
RAM USAGE:
We are using mbedTLS 2.16 for TLS communication and found that it is consuming more RAM compared to other Cybersecurity library (Mocana ) which we were using earlier. I want to reduce the RAM usage, if there are any settings which i can apply to reduce the RAM usage
Presently MbedTLS is using almost 38KB of RAM per TLS connection, I have small memory in my device (STM32F437), I want to reduce this RAM consumption to 30KB per TLS connection.

SLOWNESS:
we have found that after 4 TLS connections on STM32F437 controller, communication becomes very slow, we measured the CPU utilization at this point of time, and  it's only 40% ustilized, we are not getting any clue why it becomes so slow. When we compare with Mocana cyber security library we were able to run 6 TLS connections with good speed. 

Please help us with the above 2 topics. 
--
Thanks and Regards,
Sunil Jain