|Re: Some Performance Data [message #1697483 is a reply to message #1697271]
||Thu, 04 June 2015 10:00
| Thomas Jung
Registered: May 2015
i am not sure if it makes sense to run it on windows, because you can never be sure that something interrupts you.
But i did some measurements with the same model on the same plattform on a multi threaded environment (FreeRTOS). Optimazation level -O3.
The results are:
Both aktors on the same thread: 18us/msg
The two aktors on different threads: 40us/Msg
The results are expectable and still very good from my perspective. We have to protect the queue with a mutex even if we run on the same thread. This causes the overhead in the first case. If we run the aktors on different threads we additionally have the thread switch for each message. This needs additional time.
As an idea for optimazation we could think about a second queue for thread internal communication. This would eliminate the overhead in the first case but costs some more memory.
Concerning RAM/ROM i checked the map file and found the following numbers (everything for optimazation level -O3):
Code for the single threaded runtime (including the platform specific part, without any logging instrumentation): 0x4CC => 1228 Byte
This is the constant part of the code.
Code for the Application: 0x300 => 768 Byte
The application consits of two Aktors with a simple FSM each. Most of the code are constant data because we map all the constant infrstructure to ROM/Flash.
The singe threaded runtime needs just 16Bytes data.
(8 Bytes to store the time, one pointer to hold the execute function (4 Bytes on our 32Bit machine), one pointer to hold the timer function).
The application is basically dominated from the queue size. I configured 32 messages with 10 Bytes each. => 320 Bytes for the queue. The minimum message size is 8Bytes.
For each Aktor we need one pointer to constant data (4 Bytes in our case), 2Bytes to hold the state for the FSM + 2Bytes for each FSM hierarchy level.
My example needs arround 340Bytes.
We allready know that RAM consupmtion as well as footprint is really competitive, because we are able to run a small modell on a MSP430G2553 with 16K Flash and 512Byte RAM.
As i mentioned, the numbers are for optimazation -O3. For a debug build with -O0 you can double the code to be on the save side. The RAM size will remain the same.
The numbers are related to the eTrice generated Code. The Dave generated code as well as startup and Library code is not included.
If somebody wants to have the testmodels for verification, please let me know.
Powered by FUDForum
. Page generated in 0.01545 seconds