Jarle Hulaas Swiss Federal Institute of Technology in Lausanne (EPFL) Switzerland (Formerly at CUI, Uni Geneva) Dimitri Kalas

Slides:



Advertisements
Similar presentations
Chapter 13: I/O Systems I/O Hardware Application I/O Interface
Advertisements

Zhongxing Telecom Pakistan (Pvt.) Ltd
1
Distributed Systems Architectures
© 2008 Pearson Addison Wesley. All rights reserved Chapter Seven Costs.
Copyright © 2003 Pearson Education, Inc. Slide 1 Computer Systems Organization & Architecture Chapters 8-12 John D. Carpinelli.
1 Copyright © 2013 Elsevier Inc. All rights reserved. Chapter 4 Computing Platforms.
Processes and Operating Systems
Copyright © 2011, Elsevier Inc. All rights reserved. Chapter 6 Author: Julia Richards and R. Scott Hawley.
1 Copyright © 2013 Elsevier Inc. All rights reserved. Chapter 3 CPUs.
UNITED NATIONS Shipment Details Report – January 2006.
RXQ Customer Enrollment Using a Registration Agent (RA) Process Flow Diagram (Move-In) Customer Supplier Customer authorizes Enrollment ( )
1 Hyades Command Routing Message flow and data translation.
Business Transaction Management Software for Application Coordination 1 Business Processes and Coordination. Introduction to the Business.
1 Introducing the Specifications of the Metro Ethernet Forum MEF 19 Abstract Test Suite for UNI Type 1 February 2008.
AQute Eclipse Environment By Peter Kriens CEO aQute OSGi Director of Technology and OSGi Fellow.
4 Copyright © 2005, Oracle. All rights reserved. Creating the Web Tier: Servlets.
1 Copyright © 2005, Oracle. All rights reserved. Introducing the Java and Oracle Platforms.
8 Copyright © 2005, Oracle. All rights reserved. Creating the Web Tier: JavaServer Pages.
6 Copyright © 2005, Oracle. All rights reserved. Building Applications with Oracle JDeveloper 10g.
17 Copyright © 2005, Oracle. All rights reserved. Deploying Applications by Using Java Web Start.
1 RA I Sub-Regional Training Seminar on CLIMAT&CLIMAT TEMP Reporting Casablanca, Morocco, 20 – 22 December 2005 Status of observing programmes in RA I.
Jeopardy Q 1 Q 6 Q 11 Q 16 Q 21 Q 2 Q 7 Q 12 Q 17 Q 22 Q 3 Q 8 Q 13
Jeopardy Q 1 Q 6 Q 11 Q 16 Q 21 Q 2 Q 7 Q 12 Q 17 Q 22 Q 3 Q 8 Q 13
Year 6 mental test 5 second questions
1 G54PRG Programming Lecture 1 Amadeo Ascó Adam Moore G54PRG Programming Lecture 1 Amadeo Ascó 3 Java Programming Language.
Chapter 1 Introduction Copyright © Operating Systems, by Dhananjay Dhamdhere Copyright © Introduction Abstract Views of an Operating System.
PUBLIC KEY CRYPTOSYSTEMS Symmetric Cryptosystems 6/05/2014 | pag. 2.
1 Click here to End Presentation Software: Installation and Updates Internet Download CD release NACIS Updates.
© Tally Solutions Pvt. Ltd. All Rights Reserved Shoper 9 License Management December 09.
Auto-scaling Axis2 Web Services on Amazon EC2 By Afkham Azeez.
Suite Suite 2 TPF Software – Overview Binary Editor Remote Scripts zTREX Add-Ins & Project Integration with Source Control Manager.
Debugging operating systems with time-traveling virtual machines Sam King George Dunlap Peter Chen CoVirt Project, University of Michigan.
13 Copyright © 2005, Oracle. All rights reserved. Monitoring and Improving Performance.
ACT User Meeting June Your entitlements window Entitlements, roles and v1 security overview Problems with v1 security Tasks, jobs and v2 security.
1 The phone in the cloud Utilizing resources hosted anywhere Claes Nilsson.
PP Test Review Sections 6-1 to 6-6
Bright Futures Guidelines Priorities and Screening Tables
MySQL Access Privilege System
EIS Bridge Tool and Staging Tables September 1, 2009 Instructor: Way Poteat Slide: 1.
1 Sizing the Streaming Media Cluster Solution for a Given Workload Lucy Cherkasova and Wenting Tang HPLabs.
IP Multicast Information management 2 Groep T Leuven – Information department 2/14 Agenda •Why IP Multicast ? •Multicast fundamentals •Intradomain.
Operating Systems Operating Systems - Winter 2011 Dr. Melanie Rieback Design and Implementation.
Operating Systems Operating Systems - Winter 2012 Dr. Melanie Rieback Design and Implementation.
VOORBLAD.
Sample Service Screenshots Enterprise Cloud Service 11.3.
Copyright © 2012, Elsevier Inc. All rights Reserved. 1 Chapter 7 Modeling Structure with Blocks.
1 RA III - Regional Training Seminar on CLIMAT&CLIMAT TEMP Reporting Buenos Aires, Argentina, 25 – 27 October 2006 Status of observing programmes in RA.
CONTROL VISION Set-up. Step 1 Step 2 Step 3 Step 5 Step 4.
© 2012 National Heart Foundation of Australia. Slide 2.
1 Processes and Threads Chapter Processes 2.2 Threads 2.3 Interprocess communication 2.4 Classical IPC problems 2.5 Scheduling.
Executional Architecture
KAIST Computer Architecture Lab. The Effect of Multi-core on HPC Applications in Virtualized Systems Jaeung Han¹, Jeongseob Ahn¹, Changdae Kim¹, Youngjin.
Mohamed. M. Saad.  Java Virtual Machine Prototype based on Jikes RVM  Targets  Code profiling/visualization using execution flow  Utilize large number.
25 seconds left…...
Copyright © 2003 by Prentice Hall Computers: Tools for an Information Age Chapter 15 Programming and Languages: Telling the Computer What to Do.
Essential Cell Biology
PSSA Preparation.
Essential Cell Biology
Immunobiology: The Immune System in Health & Disease Sixth Edition
©Ian Sommerville 2004Software Engineering, 7th edition. Chapter 13 Slide 1 Application architectures.
Physics for Scientists & Engineers, 3rd Edition
Energy Generation in Mitochondria and Chlorplasts
From Model-based to Model-driven Design of User Interfaces.
User Security for e-Post Applications Dr Chandana Gamage University of Moratuwa.
TCP/IP Protocol Suite 1 Chapter 18 Upon completion you will be able to: Remote Login: Telnet Understand how TELNET works Understand the role of NVT in.
Andrea Camesi, Jarle Hulaas Software Engineering Laboratory Swiss Federal Institute of Technology in Lausanne (EPFL) Switzerland.
Presentation transcript:

Jarle Hulaas Swiss Federal Institute of Technology in Lausanne (EPFL) Switzerland (Formerly at CUI, Uni Geneva) Dimitri Kalas University of Geneva Switzerland Monitoring of resource consumption in Java-based application servers 10th HP-OVUA workshop, Geneva, Switzerland July 7, 2003

7/7/ th HP-OVUA workshop, Geneva, Switzerland 2 Overview What is Resource Management ? Our General Approach Some Details on our J-RAF Tool Management of a Servlet Engine Adapting J-RAF to Tomcat Assessment

7/7/ th HP-OVUA workshop, Geneva, Switzerland 3 What is Resource Management ? Physical resources: CPU (Virtual) Memory Network bandwidth Management of resources: Monitoring of consumption Controlling (i.e. limiting) it

7/7/ th HP-OVUA workshop, Geneva, Switzerland 4 Benefits of Resource Management Software development Monitoring and profiling of distributed applications Security Prevention against Denial-of-Service attacks Reliability More robust behaviours in presence of resource shortage Accountability (liability) for resource consumption E-commerce Billing for resource consumption Quality-of-Service guarantees, load balancing

7/7/ th HP-OVUA workshop, Geneva, Switzerland 5 What about Java ? Problem: Java offers no support for resource management ! Our solution: portable resource management through byte-code rewriting schemes The Java Resource Accounting Framework, 2nd edition

7/7/ th HP-OVUA workshop, Geneva, Switzerland 6 Rewrite bytecode General Approach Execute Original Java Application (compiled) Transformed, resource-aware version of Application Per-thread accounting objects Net CPUMem Meta-level Execution hooks

7/7/ th HP-OVUA workshop, Geneva, Switzerland 7 Our Solution Program transformations to expose resource consumption Application classes and libraries, incl. JDK Rewritten programs unknowingly update accounting objects CPU: count the number of executed JVM instructions Memory: redirection of memory allocations Network bandwidth: wrapper libraries

7/7/ th HP-OVUA workshop, Geneva, Switzerland 8 Class Analysis for CPU monitoring bipush 10 2 istore_1 3 iconst_1 6 istore_3 7 goto invokestatic #2 13 pop 14 ldc2_w #3 17 bipush invokestatic #5 22 iinc iload_3 26 iconst_1 27 if_icmple iload_2 31 iconst_1 32 if_icmpl iinc goto astore_2 42 iconst_0 43 istore 3 44 return Exception table: from to target type (size=2) 2 (size=3) 3 (size=6) 4 (size=3) 5 (size=3) 6 (size=2)7 (size=3) 8 (size=1)

7/7/ th HP-OVUA workshop, Geneva, Switzerland 9 Method Rewriting by J-RAF Object f (int x, MemAccObj mem, CPUAccObj cpu) { cpu.usage += 8; if (x < 0) { cpu.usage += 8; return null; } else { cpu.usage += 26; int y = g(x, mem, cpu); mem.checkAllocation(SIZEOF_FOO); Object o = new Foo(y, mem, cpu); mem.register(o); return o; }

7/7/ th HP-OVUA workshop, Geneva, Switzerland 10 Generic Application Structure Bytecode Rewriting Low-level Resource Acc&Control (Memory, CPU) High-level Resource Accounting & Control Resource-aware Application JVM Native Code Resource-aware JDK

7/7/ th HP-OVUA workshop, Geneva, Switzerland 11 J-RAF in Action CPU monitoring for some multi- threaded applet

7/7/ th HP-OVUA workshop, Geneva, Switzerland 12 Validation of the J-RAF approach Tested on J2SE … arbitrary applications, as well as applet and mobile agent environments Sun HotSpot Virtual Machine, IBM JDK … and on J2ME (embedded devices) … dedicated system with Java processor from aJile Systems

7/7/ th HP-OVUA workshop, Geneva, Switzerland 13 Benchmarks for CPU accounting SPEC JVM98

7/7/ th HP-OVUA workshop, Geneva, Switzerland 14 Resource Mgmt for Servlet Engines Reporting Requests HTML, streams Access rights Servlet Engines Providers Database End-user Resource Mgmt for Servlet Engines

7/7/ th HP-OVUA workshop, Geneva, Switzerland 15 Objectives Fine-grained basis for: Usage-based billing (pricing policies are out of our scope) Identification of bottlenecks Badly programmed or malicious apps Load-balancing on clusters of servers

7/7/ th HP-OVUA workshop, Geneva, Switzerland 16 Required J-RAF extensions Define a servlet as a coherent set of threads Flexible concept of client (end-user) context Enhanced detection of bandwidth consumption Remote reporting

7/7/ th HP-OVUA workshop, Geneva, Switzerland 17 Servlets as sets of threads How to detect the start and end of a request processing ? Special rewriting of methods like doGet and doPost, to cope with Tomcats thread pooling Register and account for created sub- threads Add a RequestAccount class for aggregating usage of all these threads

7/7/ th HP-OVUA workshop, Geneva, Switzerland 18 User-level accounting Periodically do: Summarize usage of all individual threads inside a servlet Summarize usage of all servlets run on behalf of a given user Report this usage to a database Problems that had to be solved: Overflow of counters at all levels Calibration of timeslices according to processing power

7/7/ th HP-OVUA workshop, Geneva, Switzerland 19 User context Allow servlet programmers to define their own: Authentication schemes, IP-based or password-based Programmer must implement a ClientID interface Read usage rights from database User data reporting schemes Allow extensible reporting of user data, e.g. session IDs

7/7/ th HP-OVUA workshop, Geneva, Switzerland 20 Resource-aware Servlet Engine Resulting Servlet Structure Bytecode Rewriting Low-level Resource Acc&Control (Memory, CPU) High-level Resource Accounting & Control Resource-aware Servlet JVM Native Code Resource-aware JDK

7/7/ th HP-OVUA workshop, Geneva, Switzerland 21 Sample Log for a Given Client Servlet nameTimestampJVM ops/sIn+Out Bandwidth [Bytes/s]

7/7/ th HP-OVUA workshop, Geneva, Switzerland 22 Performance Testing Setting: Pentium-class PCs in a 100Mb LAN, Tomcat 4.1, MySQL Generate many simultaneous connections with Jmeter Different test servlets: 1. Output of an empty page 2. Streaming of factorials 3. Download, ZIP-compress, and output a web page

7/7/ th HP-OVUA workshop, Geneva, Switzerland 23 Preliminary Performance Results Simultaneous requests Empty page Streaming factorials ZIP page 1700 %84.9 %10.5 % %23.9 %20.7 % %22.8 %30.8 % Overhead due to CPU monitoring Average overhead: same order of magnitude as for standard Java applications (~ 30 %)

7/7/ th HP-OVUA workshop, Geneva, Switzerland 24 Cons Purely a Java-level framework: Difficult to account for resources consumed by native code No real-time / resource reservation capabilities Increase of code size Restrictions on what servlets may do to play with thread priorities to perform introspection to inspect or modify accounting objects

7/7/ th HP-OVUA workshop, Geneva, Switzerland 25 Conclusions Initial work towards fine-grained management of Java servers Reasonable overheads Future work: Finalize management of memory Improve control vs monitoring Support for clusters of servers

7/7/ th HP-OVUA workshop, Geneva, Switzerland 26 Thank you for your attention !