Checking Memory and CPU Consumption on TS7390

Today I decided to place my new updated code on the ARM device and measure CPU and memory consumption.
I used the top command to investigate the consumptions. Running the program with continuous querying 3 sensors and updating them on the GUI resulted in 10% CPU consumption and 19.3% memory consumption. The processor on this device is a 200Mhz ARM and the memory is only 64MB ram so only 12.35MB of RAM is used but most of this is the actual QT framework. Normally however, there is only about 19MB RAM free out of the 64 before actually loading the program but a lot of this is cache ram that can be removed by executing: echo 1 > /proc/sys/vm/drop_caches. This provides about 40% RAM free so this is a big improvement. I decided to remove the whole kernel feature out and do no monitoring, just load the GUI components and leave them blank. CPU consumption is almost 0% and RAM usage is still as high as 14% (8.96MB). So the kernel part of my system with all few hundred DTCs codes loaded in memory only consumes about 3MB of RAM. This is good news. However I still don’t know how adding more GUI components will affect it yet. I have to be careful with my memory consumption.

Saturday, February 28th, 2009 QT Embdedded Programming, Single Board Computer

3 Comments to Checking Memory and CPU Consumption on TS7390

  • Alberto says:

    I once had a program that wouldn’t load on the TS-7390 due to the number of shared libraries it needed to load. I ended up creating a paging file and this solved the problem perfectly. In case you ever need it…

    Alberto

  • Donal says:

    Thanks for the tip, will look into it if I ever run out of memory! Cheers.

  • Dankoozy says:

    w0w i never knew about that command to empty the cache. just blockdev –flushbufs to clean out a ramdisk

  • Leave a Reply

    You must be logged in to post a comment.