Other Parts Discussed in Thread: SYSCONFIG, SYSBIOS
I'm working with a customer who has done some performance analysis on the NVS. For reference, this is a DMM TI 15.4 Stack + BLE project, and the 15.4 NVS as well as BLE SNV is in use (both abstractions to the same low level FLASH NVS).
The first experiment they ran is as follows:
While using NVS library, we experienced varied write times.
We did following steps:
- Defined a structure of 276 bytes
- capture current time (t1)
- used NV api function (pNV->writeItem) to perform write operation.
- capture current time (t2)
- calculate time taken for write operation (t2-t1)
- Repeat steps 1-5 for longer duration approx. 1hr
(delay given between 2 consecutive writes = 200 msec)
If you look at the yellow highlighted sections, and do the math on the sector size of 8K and structure size of 276 bytes, it makes sense that these likely line up with compaction. However, what is very concerning is the lines highlighted in red that take minutes to complete. The customer decided to perform another experiment with smaller data sizes to investigate further, and it yields some interesting results:
It seems that the longer write times (several minutes), seems to be somehow tied to write structure size. Is there some insight into the write algorithm or configuration that can be undertaken in order to improve performance for the customer's use case?
Thanks,
Stuart