A lot of people have asked us about memory usage by CoAPSharp library at runtime. This is a very fair question to ask. Given that we are talking about constrained devices, it becomes necessary to know this information. Therefore, we conducted basic memory usage tests and we are publishing the results for everyone to comment and suggest. We believe, collaborative effort is the best way to improve things.
Before you read the results, let us provide basic information on how the test was conducted.
- We ran the test on emulator and then on the actual Netduino Plus 2 boards.
- On actual Netduino Plus 2 boards, we had to write the results in a file (on the mounted SD card). That resulted in more memory usage. We do not know how to separate the memory used only by the CoAPSharp library and the ones by the SD card library. Our assumption is that the lower of the two is the right figure, which is, the one we got on the emulator.
- The version of CoAPSharp was V 0.3.0 running on .NET Micro Framework 4.2
- We ran each test 50 times. For cases where looping was required internally (like observe and block transfer), each loop was executed 10 times.
- We took the average value, the minimum value, the maximum value and the standard deviation.
- The reason for taking standard deviation is to see that results do not vary too much.
Note: To perform the test, we have taken typical payload types, meaning, a request that has a URL, a token (6 bytes) and a payload (about 10 – 40 bytes).
The results are given below for your consumption, criticism and feedback. Do let us know your views so that we can make this a better library.