Skip to Main content Skip to Navigation
Conference papers

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

Zakaria Ournani 1, 2 Romain Rouvoy 2, 3 Pierre Rust 1 Joel Penhoat 1 
2 SPIRALS - Self-adaptation for distributed services and large software systems
Inria Lille - Nord Europe, CRIStAL - Centre de Recherche en Informatique, Signal et Automatique de Lille - UMR 9189
Abstract : 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.
Document type :
Conference papers
Complete list of metadata

https://hal.inria.fr/hal-03269129
Contributor : Romain Rouvoy Connect in order to contact the contributor
Submitted on : Tuesday, August 31, 2021 - 11:33:24 AM
Last modification on : Thursday, March 24, 2022 - 3:42:53 AM
Long-term archiving on: : Wednesday, December 1, 2021 - 9:05:03 PM

File

IO.pdf
Files produced by the author(s)

Identifiers

  • HAL Id : hal-03269129, version 1

Citation

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⟩

Share

Metrics

Record views

213

Files downloads

184