Efficiency and performance architecture optimization of Node.js applications under parallel and scalable conditions
Loading...
Date
2022-04
Authors
Journal Title
Journal ISSN
Volume Title
Publisher
University of New Brunswick
Abstract
To meet high quality standards, applications are expected not only to run correctly but also efficiently. During the application-development-process, quality attributes, such as performance, scalability and efficiency, are evaluated to fulfill the desired expectations. Code that utilizes software and hardware components efficiently should lead to high quality systems.
An increasing number of applications are written in Node.js, which uses an event driven model with a single-threaded event loop and provides asynchronous and nonblocking I/O operations. To increase application performance, additional instances to perform compute-intensive tasks can be instantiated utilizing modules/libraries that enable parallelism. By increasing the utilization of resources/instances running in parallel at the hardware/software level, we can increase performance, at the expense of energy consumption. However, various power management techniques exist, such as the CPU dynamic voltage and frequency scaling technique (DVFS) that focus on regulating the processors’ energy consumption.
First, we investigate Node.js modules that enable parallelism. In order to assist software engineers in choosing the most appropriate module that is expected to be executed efficiently, we conduct an empirical study to investigate the modules’ characteristics and functionality, considering system variances. Thus, we present and apply an evaluation methodology focusing on four aspects: compute-intensive task execution, sharing data, communication and overhead of shared memory techniques and instance spawning, as we scale workers/jobs.
Second, we investigate the energy consumption and runtime performance of web requests with the CPU dynamic voltage and frequency scaling technique (DVFS). We build a CPU frequency scaling/energy aware system to enable CPU frequency control within Node.js applications, including a benchmark suite, and collect energy information. As we scale the CPU frequency, we measure the energy consumption and runtime of different web requests, analyze their performance and extract patterns.
Third, we use the above information on CPU frequency optimality, expand the system and build a CPU frequency scaling policy for Node.js web applications that promotes “green” and high-performing requests and enables customizations on their execution profile. Finally, we perform an energy-runtime-financial cost analysis, which shows that our policy with the proposed configurations is an energy-efficient approach compared to the OS scaling governors.