Profiling and improving the duty-cycling performance of Linux-based IoT devices

  • Immanuel Amirtharaj
  • Tai Groot
  • Behnam DezfouliEmail author
Original Research


Minimizing the energy consumption of Linux-based devices is an essential step towards their wide deployment in various IoT scenarios. Energy saving methods such as duty-cycling aim to address this constraint by limiting the amount of time the device is powered on. In this work we study and improve the amount of time a Linux-based IoT device is powered on to accomplish its tasks. We analyze the processes of system boot up and shutdown on two platforms, the Raspberry Pi 3 and Raspberry Pi Zero Wireless, and enhance duty-cycling performance by identifying and disabling time-consuming or unnecessary units initialized in the userspace. We also study whether SD card speed and SD card capacity utilization affect boot up duration and energy consumption. In addition, we propose Pallex, a parallel execution framework built on top of the systemd init system to run a user application concurrently with userspace initialization. We validate the performance impact of Pallex when applied to various IoT application scenarios: (1) capturing an image, (2) capturing and encrypting an image, (3) capturing and classifying an image using the k-nearest neighbor algorithm, and (4) capturing images and sending them to a cloud server. Our results show that system lifetime is increased by 18.3%, 16.8%, 13.9% and 30.2%, for these application scenarios, respectively.


Energy efficiency Boot up Shutdown Edge and fog computing Userspace optimization Machine learning 



This research has been partially supported by the Santa Clara Valley Water District Research Grant SCWD02. This project involves the development of a flood monitoring system where Linux-based wireless systems, which rely on solar or battery power, capture images for analysis using machine learning to classify and report the debris carried by rivers and streams.


  1. Altman NS (1992) An introduction to kernel and nearest-neighbor nonparametric regression. Am Stat 46(3):175–185MathSciNetGoogle Scholar
  2. Andersen J, Hansen MT (2009) Energy bucket: a tool for power profiling and debugging of sensor nodes. In: Proceedings of third international conference on sensor technologies and applications (SENSORCOMM’09). IEEE, pp 132–138Google Scholar
  3. Baccelli E, Hahm O, Gunes M, Wahlisch M, Schmidt TC (2013) RIOT OS: towards an OS for the Internet of Things. In: IEEE conference on computer communications workshops (INFOCOM Workshops). IEEE, pp 79–80Google Scholar
  4. Baik K, Kim S, Woo S, Choi J (2010) Boosting up embedded linux device: experience on linux-based smartphone. In: proceedings of the Linux symposium, pp 9–18Google Scholar
  5. BCM2835. BCM2835 ARM peripherals (online). Accessed 2018
  6. Bird TR (2004) Methods to improve bootup time in Linux. In: Proceedings of the Linux symposiumGoogle Scholar
  7. Bovet DP, Cesati M (2005) Understanding the Linux Kernel: from I/O ports to process management. O’Reilly MediaGoogle Scholar
  8. Brodowski D, Golde N, Wysocki RJ, Kumar V. CPU frequency and voltage scaling code in the Linux (TM) kernel (online). Accessed 2018
  9. C library. C library for Broadcom BCM 2835 (online). Accessed 2018
  10. Chiang M, Zhang T (2016) Fog and IoT: an overview of research opportunities. IEEE Internet Things J 3(6):854–864CrossRefGoogle Scholar
  11. Chu S, Majumdar A (2012) Opportunities and challenges for a sustainable energy future. Nature 488(7411):294CrossRefGoogle Scholar
  12. Chung KH, Choi MS, Ahn KS (2007) A study on the packaging for fast boot-up time in the embedded Linux. In: 13th International conference on embedded and real-time computing systems and applications (RTCSA). IEEE, pp 89–94Google Scholar
  13. Cramfs. Cramfs: cram a filesystem onto a small ROM (online). Accessed 2018
  14. Cypress Semiconductor. CYW43907: IEEE 802.11 a/b/g/n SoC with an embedded applications processor (online). Accessed 2018
  15. Delforge P (2016) Slashing energy use in computers and monitors while protecting our wallets, health, and planet. Natural Resources Defense CouncilGoogle Scholar
  16. Dezfouli B, Radi M, Whitehouse K, Razak SA, Hwee-Pink T (2015a) DICSA: distributed and concurrent link scheduling algorithm for data gathering in wireless sensor networks. Ad Hoc Netw 25:54–71CrossRefGoogle Scholar
  17. Dezfouli B, Radi M, Razak SA, Hwee-Pink T, Bakar KA (2015b) Modeling low-power wireless communications. J Netw Comput Appl 51:102–126CrossRefGoogle Scholar
  18. Dezfouli B, Radi M, Chipara O (2017) Rewimo: a real-time and reliable low-power wireless mobile network. ACM Trans Sens Netw (TOSN) 13(3):17Google Scholar
  19. Dezfouli B, Amirtharaj I, Li C-C (2018) EMPIOT: an energy measurement platform for wireless IoT devices. J Netw Comput Appl 121:135–148CrossRefGoogle Scholar
  20. Dutta P, Feldmeier M, Paradiso J, Culler D (2008) Energy metering for free: augmenting switching regulators for real-time monitoring. In: Proceedings of the 7th international conference on information processing in sensor networks (IPSN’08), pp 283–294Google Scholar
  21. Eclipse Foundation. Key trends from the IoT Developer Survey (online). Accessed 2018
  22. Fisher R, Ledwaba L, Hancke G, Kruger C (2015) Open hardware: a role to play in wireless sensor networks? Sensors 15(3):6818–6844CrossRefGoogle Scholar
  23. FreeRTOS. The FreeRTOS Kernel (online). Accessed 2018
  24. Georgiou S, Kechagia M, Louridas P, Spinellis D (2018) What are your programming language’s energy-delay implications? In: Proceedings of the 15th international conference on mining software repositories (MSR). ACM, pp 303–313Google Scholar
  25. Godard S. iostat (online). Accessed 2018
  26. Gomez K, Riggio R, Rasheed T, Miorandi D, Granelli F (2012) Energino: a hardware and software solution for energy consumption monitoring. In: Proceedings of the international workshop on wireless network measurements (WiOpt’12), pp 311–317Google Scholar
  27. Gorauskas J (2015) Managing services in Linux: past, present and future. Linux J 251:2015Google Scholar
  28. Griffiths E, Assana S, Whitehouse K (2018) Privacy-preserving image processing with binocular thermal cameras. Proc ACM Interact Mob Wearable Ubiquitous Technol 1(4):133:1–133:25CrossRefGoogle Scholar
  29. Gupta A, Kim Y, Urgaonkar B (2009) DFTL: a flash translation layer employing demand-based selective caching of page-level address mappings. In: Proceedings of the 14th international conference on architectural support for programming languages and operating systems. ACM, pp 229–240Google Scholar
  30. Hao S, Li D, Halfond WG, Govindan R (2012) Estimating android applications’ cpu energy usage via bytecode profiling. In: Proceedings of the first international workshop on green and sustainable software. IEEE, pp 1–7Google Scholar
  31. Haratcherev I, Halkes G, Parker T (2008) PowerBench: a scalable testbed infrastructure for benchmarking power consumption. In: Proceedings of the international workshop on sensor network engineering (IWSNE’08), pp 37–44Google Scholar
  32. Hartung R, Kulau U, Wolf L (2016) Distributed energy measurement in WSNs for outdoor applications, pp 1–9Google Scholar
  33. Hindle A (2015) Green mining: a methodology of relating software change and configuration to power consumption. Empir Softw Eng 20(2):374–409CrossRefGoogle Scholar
  34. Hong J, Hong Y-G, Youn J-S. Problem statement of IoT integrated with edge computing (online). Accessed 2018
  35. IMX219PQ. IMX219PQ: diagonal 4.6 mm 8.08M-effective pixel color CMOS image sensor (online). Accessed 2018
  36. Jiang X, Dutta P, Culler D, Stoica I (2007) Micro power meter for energy monitoring of wireless sensor networks at scale, p 186Google Scholar
  37. Jo H, Kim H, Jeong J, Lee J, Maeng S (2009) Optimizing the startup time of embedded systems: a case study of digital tv. IEEE Trans Consum Electron 55(4):2242–2247CrossRefGoogle Scholar
  38. Joe I, Lee SC (2011) Bootup time improvement for embedded linux using snapshot images created on boot time. In: The 2nd International conference on next generation information technology (ICNIT). IEEE, pp 193–196Google Scholar
  39. Jones D. Python interface to the Raspberry Pi camera module (online). Accessed 2018
  40. Jones CE, Sivalingam KM, Agrawal P, Chen JC (2001) A survey of energy efficient network protocols for wireless networks. Wirel Netw 7(4):343–358CrossRefzbMATHGoogle Scholar
  41. Kaminaga H (2006) Improving linux startup time using software resume (and other techniques). In: Linux symposium, p 17Google Scholar
  42. Kaup F, Gottschling P, Hausheer D (2014) PowerPi: measuring and modeling the power consumption of the Raspberry Pi. In: 39th Conference on local computer networks (LCN). IEEE, pp 236–243Google Scholar
  43. Kaup F, Hacker S, Mentzendorff E, Meurisch C, Hausheer D (2018) The progress of the energy-efficiency of single-board computers, Tech. Rep. NetSys-TR-2018-01Google Scholar
  44. Kelly R (2016) Internet of things data to top 1.6 zettabytes by 2022. Campus Technol 9:1536Google Scholar
  45. Keranidis S, Kazdaridis G, Passas V, Korakis T, Koutsopoulos I, Tassiulas L (2014) NITOS energy monitoring framework: real time power monitoring in experimental wireless network deployments. SIGMOBILE Mob Comput Commun Rev 18(1):64–74CrossRefGoogle Scholar
  46. Levis P, Madden S, Polastre J, Szewczyk R, Whitehouse K, Woo A, Gay D, Hill J, Welsh M, Brewer E et al (2005) TinyOS: an operating system for sensor networks. In: Ambient intelligence. Springer, New York, pp 115–148Google Scholar
  47. Li D, Hao S, Halfond WG, Govindan R (2013) Calculating source line level energy information for android applications. In: Proceedings of the international symposium on software testing and analysis. ACM, pp 78–89Google Scholar
  48. Lim G, young Hwang J, Park K, Suh S-B (2015) Enhancing init scheme for improving bootup time in mobile devices. In: 2015 Eighth international conference on mobile computing and ubiquitous networking (ICMU), pp 149–154Google Scholar
  49. Linux Programmer (2018) Linux Programmer’s Manual, Socket (online).
  50. Love R (2010) Linux kernel development, 3rd edn. Addison-Wesley, BostonGoogle Scholar
  51. Martinez B, Monton M, Vilajosana I, Prades JD (2015) the power of models: modeling power consumption for IoT devices. IEEE Sens J 15(10):5777–5789CrossRefGoogle Scholar
  52. Morabito R (2017) Virtualization on internet of things edge devices with container technologies: a performance evaluation. IEEE Access 5:8835–8850CrossRefGoogle Scholar
  53. Naderiparizi S, Parks AN, Parizi FS, Smith JR (2016) \(\mu\) Monitor: in-situ energy monitoring with microwatt power consumption. In: Proceedings of the IEEE international conference on RFID (RFID’16). IEEE, pp 1–8Google Scholar
  54. Nunez-Yanez J, Lore G (2013) Enabling accurate modeling of power and energy consumption in an ARM-based system-on-chip. Microprocess Microsyst 37:319–332CrossRefGoogle Scholar
  55. Park C, Kim K, Jang Y, Hyun K (2006) Linux bootup time reduction for digital still camera. In: Linux symposium, p 231Google Scholar
  56. Paul Rubin SK, MacKenzie David. dd: convert and copy a file (online). Accessed 2018
  57. Pinto G, Castor F, Liu YD (2014) Mining questions about software energy consumption. In: Proceedings of the 11th working conference on mining software repositories. ACM, pp 22–31Google Scholar
  58. Pinto G, Liu K, Castor F, Liu YD (2016) A comprehensive study on the energy efficiency of java’s thread-safe collections. In: IEEE international conference on software maintenance and evolution (ICSME). IEEE, pp 20–31Google Scholar
  59. Procaccianti G, Fernández H, Lago P (2016) Empirical evaluation of two best practices for energy-efficient software development. J Syst Softw 117:185–198CrossRefGoogle Scholar
  60. Pötsch A, Berger A, Springer A (2017) Efficient analysis of power consumption behaviour of embedded wireless IoT systems. In: Proceedings of the instrumentation and measurement technology conference (I2MTC), pp 1–6Google Scholar
  61. RPiCam. Camera Module (v2) (online). Accessed 2018
  62. scikit-learn. scikit-learn: machine learning in python (online). Accessed 2018
  63. Singh G, Bipin K, Dhawan R (2011) Optimizing the boot time of android on embedded system. In: 15th International symposium on consumer electronics (ISCE). IEEE, pp 503–508Google Scholar
  64. Stathopoulos T, McIntire D, Kaiser WJ (2008) The energy endoscope: real-time detailed energy accounting for wireless sensor nodes. In: Proceedings of international conference on information processing in sensor networks (IPSN’08), pp 383–394Google Scholar
  65. systemctl (2017) (online). Accessed 2018
  66. systemd. systemd System and Service Manager (online). Accessed 2018
  67. Tektronix. DMM7510 7\(\frac{1}{2}\) digit graphical sampling multimeter (online). Accessed 2018
  68. The GNU. The GNU Awk User’s Guide (online). Accessed 2018
  69. ThreadX. ThreadX RTOS real-time operating system (online). Accessed 2018
  70. Trathnigg T, Jürgen M, Weiss R (2008) A low-cost energy measurement setup and improving the accuracy of energy simulators for wireless sensor networks. In: Proceedings of the workshop on real-world wireless sensor networks, pp 31–35Google Scholar
  71. Ueki M, Takeuchi K, Yamamoto T, Tanabe A, Ikarashi N, Saitoh M, Nagumo T, Sunamura H, Narihiro M, Uejima K et al (2015) Low-power embedded ReRAM technology for IoT applications. In: Symposium on VLSI technology. IEEE, pp T108–T109Google Scholar
  72. Upton E, Duntemann J, Roberts R, Everard B, Mamtora T (2016) Learning computer architecture with Raspberry Pi. Wiley, New YorkCrossRefGoogle Scholar
  73. Vilajosana X, Wang Q, Chraim F, Watteyne T, Chang T, Pister KS (2014) A realistic energy consumption model for TSCH networks. IEEE Sens J 14(2):482–489CrossRefGoogle Scholar
  74. Villegas C (2006) Improve the Debian boot process (online). Accessed 2018
  75. Villegas C, Reinholdtsen P (2006) State-of the-art in the boot process. Google Summer of Code (online). Accessed 2018
  76. Vujovic V, Maksimovic M (2014) Raspberry Pi as a wireless sensor node: performances and constraints. In: 37th International convention on information and communication technology, electronics and microelectronics (MIPRO). IEEE, pp 1013–1018Google Scholar
  77. Wang Q, Hempstead M, Yang W (2006) A realistic power consumption model for wireless sensor network devices. In: 3rd Annual IEEE communications society on sensor and ad hoc communications and networks (SECON’06), vol 1. IEEE, pp 286–295Google Scholar
  78. Wang Z, Liu Y, Sun Y, Li Y, Zhang D, Yang H (2015) An energy-efficient heterogeneous dual-core processor for Internet of Things. In: IEEE international symposium on circuits and systems (ISCAS). IEEE, pp 2301–2304Google Scholar
  79. Wiring Pi. Wiring Pi: GPIO interface library for the Raspberry Pi (online). Accessed 2018
  80. Zhou R, Xing G (2013) Nemo: a high-fidelity noninvasive power meter system for wireless sensor networks. In: Proceedings of the ACM/IEEE international conference on information processing in sensor networks (IPSN’13), pp 141–152Google Scholar
  81. Zhu N, O’Connor I (2013) Energy measurements and evaluations on high data rate and ultra low power wsn node. In: 10th IEEE international conference on networking, sensing and control (ICNSC), pp 232–236Google Scholar
  82. Zoican S, Vochin M (2012) LwIP stack protocol for embedded sensors network. In: 9th International conference on communications. IEEE, pp 221–224Google Scholar

Copyright information

© Springer-Verlag GmbH Germany, part of Springer Nature 2019

Authors and Affiliations

  1. 1.Internet of Things Research Lab, Department of Computer EngineeringSanta Clara UniversitySanta ClaraUSA

Personalised recommendations