Licentiate thesis : Evaluating JavaScript Execution Behavior and Improving the Performance of Web Applications with Thread-Level Speculation

[ PDF ] [ presentation ]

 

Paper 1

J.K. Martinsen and H. Grahn, "A Methodology for Evaluating JavaScript Execution Behavior in Interactive Web Applications", to appear in proceding of the 9th ACS/IEEE International Conference on Computer Systems And Applications (AICCSA 2011), December 2011, Sharm El-Sheikh, Egypt.

Abstract

—JavaScript has gone from being a mechanism for
providing dynamic web pages to an important component of
many web applications. Currently one of the most popular type
of web applications is so-called social networks, e.g., Facebook,
Twitter, and MySpace. However, the workload and execution
behavior of JavaScript in this context have not been fully explored
or understood.
In this paper we present a methodology for characterizing
the JavaScript execution behavior in interactive web applications
using deterministic execution of use cases. Then, we apply this
methodology to evaluate a set of social network applications
and compare their behavior to a set of established JavaScript
benchmarks. Our results confirm previous studies that the
execution behavior of social networks differ from established
benchmarks. In addition, we identify one novel difference not
published before, i.e., the use of anonymous functions in web
applications.

JavaScript has gone from being a mechanism forproviding dynamic web pages to an important component ofmany web applications. Currently one of the most popular typeof web applications is so-called social networks, e.g., Facebook, Twitter, and MySpace. However, the workload and execution behavior of JavaScript in this context have not been fully exploredor understood.In this paper we present a methodology for characterizing the JavaScript execution behavior in interactive web applicationsusing deterministic execution of use cases. Then, we apply this methodology to evaluate a set of social network applications and compare their behavior to a set of established JavaScript benchmarks. Our results confirm previous studies that the execution behavior of social networks differ from established benchmarks. In addition, we identify one novel difference not published before, i.e., the use of anonymous functions in webapplications.

[ PDF ][ bibtex ][ conference ]

Paper 2

J.K Martinsen, H. Grahn, and A. Isberg, "Evaluating four aspects of JavaScript execution behavior in benchmarks and web applications", Research Report No. 2011:03, Blekinge Institute of Technology, Sweden, July 2011, ISSN: 1103-1581.

A shorter version is published in the proceeding of the 11th International conference on Web Engineering (ICWE 2011), Lecture Notes in Computer Science No. 6757, paged 399-402, June 2011, Cypres

Abstract

JavaScript is a dynamically typed and object-based scripting language with runtime evaluation. It has emerged as an important language for client-side computation of web applications. Previous studies have shown differences in behavior between established JavaScript benchmarks and real-world web applications. However, there still remain several important aspects to explore. In this study, we compare the JavaScript execution behavior of four application classes, i.e., four established JavaScript benchmark suites, the first pages of the top 100 sites on the Alexa list, 22 different use cases for Facebook, Twitter, and Blogger, and finally, demo applications for the emerging HTML5 standard. Our results extend previous studies by identifying the importance of anonymous and eval functions, showing that just-in-time compilation often decreases the performance of real-world web applications, and a detailed bytecode instruction mix evaluation.

[ PDF ][ bibtex ][ conference ][ poster ]

Paper 3

J.K. Martinsen and H. Grahn, "An alternative optimization technique for JavaScript engines", appeared in proceeding of the Third Swedish Workshop on Multi-Core Computing (MCC-10), pages 155-160, November 2010, Göteborg, Sweden.

Abstract

Thread-Level Speculation at function level has been suggested as a method to automatically (or semi-automatically) extract parallelism from sequential programs. While there have been multiple implementations in both hardware and software, little work has been done in the context of dynamic programming languages such as JavaScript. In this paper we evaluate the effects of a simple Thread-Level Speculation approach, implemented on top of the Rhino1 7R2 JavaScript engine. The evalauation is done using the well known JavaScript benchmark suite V8. More specifically, we have measured the effects of our null return value prediction approach for function calls, conflicts with variables in a global scope, and the effects on the execution time. The results show that our strategy to speculate on return values is successful, that conflicts with global variables occur, and for several applications are the execution time improved, while the performance decrease for some applications due to speculation overhead.

[ PDF ][ bibtex ][ workshop ]

Paper 4

J.K. Martinsen and H. Grahn, "Thread Level Speculation as an optimization technique in Web Applications for embedded mobile devices - Initial Results", appeared in proceeding of the 6th IEEE International Symposium on Industrial Embedded Systems (SIES'11), pp. 83-86, June 2011, Västerås, Sweden.

Abstract

Web Applications have become increasingly popular as they allow developers to use an uniform platform for user interactions. The dynamic programming language JavaScript used in most Web Applications has performance penalties, that have been addressed by traditional optimization techniques. We have found that while the performance gain of such techniques are positive for a set of established benchmarks, it often fails to improve the performance of real-life Web Applications. We suggest Thread-Level Speculation (TLS) at the JavaScript function level to automatically extract parallelism to gain performance. There have been multiple TLS proposals in both hardware and software, but little work has been done within JavaScript. Currently we are implementing our TLS ideas in a state-of-the-art JavaScript engine targeted for embedded mobile devices

[ PDF ][ bibtex ][ workshop ][ poster ]

Paper 5

J.K Martinsen, H. Grahn, and A. Isberg, "Using Thread-Level Speculation to Improve the Performance of JavaScript Execution in Web Applications", submitted for publication

Abstract

Previous studies have shown that there are large differences between the workload of established JavaScript benchmarks and popular Web Applications. It has also been shown that popular optimization techniques, such as just-in-time compilation, many times degrade the performance of Web Applications. Further, since JavaScript is a sequential language it cannot take advantage of multicore processors. Modern web browsers have support for 'Web Workers' which allows the programmer to execute tasks in parallel. However, it uses a message passing model and it is still the programmer's responsibility to extract parallelism.

In this paper, we propose to use Thread-Level Speculation (TLS) as an optimization technique for Web Applications written in JavaScript and executing it on multicore processors. Our TLS approach is based on speculation at the function level. We have implemented TLS in Squirrelfish, a state-of-the-art JavaScript engine used in the WebKit browser environment. Our results show speedups of up to 8.4 on a dual quad-core machine for 15 popular web applications, without any JavaScript source code changes at all. The results also show few roll-backs and the additional memory requirements for our speculation is up to 33.0 MB for the studied Web Applications.

[ PDF ]

 

Redigera
Share Dela