Comparing the Energy Consumption of Java I/O Libraries and Methods - Inria - Institut national de recherche en sciences et technologies du numérique Access content directly
Conference Papers Year : 2021

Comparing the Energy Consumption of Java I/O Libraries and Methods


The Java language is rich of native and third-party I/O APIs that most Java applications and software use. Such operations can even be considered core to most software as they allow the interaction with the user and its data in a nonevolatile way. Yet, the I/Os captivate a lot of attention due to their importance, but also due to the cost that these relatively slow operations add to read and write precious data, most commonly from/to disks. In this context, the impact of these I/O operations on the energy consumption didn't get as much attention. Of course, I/O operations are responsible for energy consumption at the level of the storage medium (HDD or SDD) but they also induce non negligible costs-both performance and energy-wiseat the CPU level. However, only few works take into account the impact of I/O on the energy consumption, especially at the CPU-level. Hence, this paper elaborates a detailed study with two main objectives. First we aim at assessing the energy consumption of several well-known I/O libraries methods, and investigate if different read/write methods can exhibit different energy consumption. Concretely, we assess-using micro-benchmarksthe energy consumption of 27 I/O methods for several file sizes and establish the truth about the most and least energy efficient methods. The second objective is to validate the results of the first experiments on real Java projects by substituting their default I/O methods and measuring the before/after energy consumption. Our results showed that i) different I/O methods consume very different amounts of energy, such as NIO Channels that are 20% more efficient than other methods for read purposes ii) substituting the I/O method in a software by a more efficient one can save an important amount of energy, 15% of energy saving has been registered for K-nucleotide and 3% for Zip4j. we also showed that choosing the right I/O method can save more than 30% of energy consumption when using the Javax.crypto API. Our work offers direct conclusions and guidelines on which I/O methods to use in which situation (read all data, read specific data, write data, etc.) for a better energy efficiency. It also open doors for other works to better optimize the energy consumption of the I/O APIs and methods.
Fichier principal
Vignette du fichier
IO.pdf (396.34 Ko) Télécharger le fichier
Origin : Files produced by the author(s)

Dates and versions

hal-03269129 , version 1 (31-08-2021)


  • HAL Id : hal-03269129 , version 1


Zakaria Ournani, Romain Rouvoy, Pierre Rust, Joel Penhoat. Comparing the Energy Consumption of Java I/O Libraries and Methods. ICSME 2021 - 37th International Conference on Software Maintenance and Evolution, Sep 2021, Luxembourg / Virtual, Luxembourg. ⟨hal-03269129⟩
317 View
489 Download


Gmail Facebook X LinkedIn More