SlideShare una empresa de Scribd logo
1 de 22
Descargar para leer sin conexión
Scaling Up Java™
Applications On Windows®
Servers
Juarez Junior
Systems Architect – Unisys Global Outsourcing
Presentation Scope.
  We will focus on
   • Systems using 8 or more 32-bit Intel CPUs
   • Systems running
      - Microsoft Windows 2000
      - Microsoft Windows Server 2003
   • HotSpot™-based Java virtual machines
      - Sun JVM 1.4.x
      - Unisys JVM 1.4.1
   • Command line options
  Goal: Identify what you can do to
  boost the performance of Java
  applications without rewriting.
Agenda.
  Java and Scalability
  Cache Invalidation
  Process and Thread Affinity
  Java Heap and Heap Sizing
  Conclusions
Agenda.
  Java and Scalability
  Cache Invalidation
  Process and Thread Affinity
  Java Heap and Heap Sizing
  Conclusions
Definition of Scalability.
    The ability to reliably increase performance by
    increasing numbers of resources
•   Scale out                       •   Scale up
    Increase the number of              Increase the number of CPUs
    systems available to process        and other system resources to
    the workload, all systems           process the workload, all in one
    operating semi-independently.       system (single OS instance).
Scaling Up Java.
                14
                12
 Scale Factor



                10
                 8                                Untuned
                 6                                Tuned
                 4
                 2
                 0
                         11

                              16

                                   21

                                        26

                                             31
                1

                     6




                               CPUs
Agenda.
  Java and Scalability
  Cache Invalidation
  Process and Thread Affinity
  Java Heap and Heap Sizing
  Conclusions
Cache Invalidation.
  Consider two threads in same application accessing
  same data
   • Data is loaded into cache on each processor   Memory
   • One thread updates data                                           Data
       - Data in other cache becomes invalid
  Now consider many threads running on many




                                                                          X
  processors                                                  Data            Data
   • One update can invalidate data in 31 caches
                                                              Cache           Cache
  Similar story with a shared cache
   • External cache shared among 4 processors                    CPU          CPU
  False sharing
   • Threads have independent data that resides in adjacent
     memory
   • Caches are loaded based on cache line size (16-128 bytes)
Agenda.
  Java and Scalability
  Cache Invalidation
  Process and Thread Affinity
  Java Heap and Heap Sizing
  Conclusions
Process and Thread Affinity.
  Contain process/threads to run on
                                                       CPU         CPU
  certain processors
   • Keep threads within processor group if external
    cache                                              CPU         CPU

  Process affinity                                     App1        App2
   • Useful if threads share many common objects
       - J2EE-based application servers                CPU         CPU
  Thread affinity
   • Useful if threads are independent                 CPU         CPU
   • Useful in scale-up scenario
                                                          App3
                                                              OS
Thread Affinity.
                35
                30
 Scale Factor



                25                                No
                20                                Thread
                                                  Affinity
                15                                Thread
                10                                Affinity
                 5
                 0
                         11

                              16

                                   21

                                        26

                                             31
                1

                     6




                               CPUs
Process Affinity.




                    Demo
Process Affinity For Application Servers.
  Assign 2 – 4 CPUs per application server instance
   • Cluster the instances
   • Load balance among them
  Issue:
   FACT: Affinity is set by process name or id
   FACT: Process id is assigned at runtime
   FACT: Process name for every instance is java.exe
   PROBLEM: How do you assign affinity for each instance?
   SOLUTION: Make copies of java.exe (e.g. java01.exe)
               - assign affinity for each copy
               - modify batch files to use copies
Agenda.
  Java and Scalability
  Cache Invalidation
  Process and Thread Affinity
  Java Heap and Heap Sizing
  Conclusions
Java Heap.
  Young Generation
   • Eden
       - Where new objects are created
   • Survivor spaces
       - Where garbage collector places objects that are still in use

  Old Generation
   • Where tenured objects are placed
  References
   • http://java.sun.com/docs/hotspot/gc/ (1.3.1)
   • http://java.sun.com/docs/hotspot/gc1.4.2/
Young Generation Sizing.
  Goal: 1000 business transactions in 12 minutes
  Heap set to: -Xms1024m –Xmx1024m
  18 minute run, 472 seconds (7.8 minutes) in garbage collection
Young Generation Sizing.
-Xms1024m –Xmx1024m -XX:NewSize=300m –XX:MaxNewSize=300m
12 minute run, 25 seconds in garbage collection
 • 70 collections instead of 8000 (no major/full collections)
 • Average collection freed 240MB instead of just 1MB
Survivor Ratio.
  -XX:SurvivorRatio=ratio
   • Eden-size = survivor-size * ratio
   • Eden-size + 2 * survivor-ratio = young-gen-size
  Example:
   • -XX:NewSize=200M –XX:SurvivorRatio=8
   • Eden: 160MB, each Survivor Space: 20MB
  Use –XX:PrintHeapAtGC to monitor
   • Heap after GC invocations=11:
     new generation   total 18432K, used 1604K
     eden space 16384K,    0% used
     from space   2048K, 78% used
     to   space   2048K,   0% used
  Aim for 90-95% usage after collection
   • Typically, with large young generations, use larger ratio (e.g. 32)
Thread-Local Allocation Blocks.
 Each thread gets its own
 piece of Eden                                 Eden

 -XX:UseTLAB                            CPU
                                         Thread 1
 -XX:TLABSize=sizek
  • Common sizes: 64, 128, 256          CPU
                                         Thread 2
  • tlab-size * #-threads < eden-size
                                        CPU
 Use parallel collection                 Thread 3
  • -XX:+UseParallelGC
                                        CPU
 Align TLABs to cache line               Thread 4
 size
Agenda.
  Java and Scalability
  Cache Invalidation
  Process and Thread Affinity
  Java Heap and Heap Sizing
  Conclusions
Pop Quiz
  State 5 things you can do to improve the
  performance of a Java application
   • Set process affinity
   • Use thread affinity, if appropriate
   • Set the young generation size (1/3 to 1/4 size of heap)
       - -XX:NewSize=sizem –XX:MaxNewSize=sizem
       - Try heap of 800MB, young generation of 200MB
   • Set the survivor ratio
       - -XX:SurvivorRatio=ratio
   • Use thread-local allocation blocks
       - -XX:+UseTLAB –XX:TLABSize=sizek
Questions?

Más contenido relacionado

La actualidad más candente

Solving Office 365 Big Challenges using Cassandra + Spark
Solving Office 365 Big Challenges using Cassandra + Spark Solving Office 365 Big Challenges using Cassandra + Spark
Solving Office 365 Big Challenges using Cassandra + Spark Anubhav Kale
 
(Aaron myers) hdfs impala
(Aaron myers)   hdfs impala(Aaron myers)   hdfs impala
(Aaron myers) hdfs impalaNAVER D2
 
Database backed coherence cache
Database backed coherence cacheDatabase backed coherence cache
Database backed coherence cachearagozin
 
Data massage: How databases have been scaled from one to one million nodes
Data massage: How databases have been scaled from one to one million nodesData massage: How databases have been scaled from one to one million nodes
Data massage: How databases have been scaled from one to one million nodesUlf Wendel
 
Introduction to hazelcast
Introduction to hazelcastIntroduction to hazelcast
Introduction to hazelcastEmin Demirci
 
Jay Kreps on Project Voldemort Scaling Simple Storage At LinkedIn
Jay Kreps on Project Voldemort Scaling Simple Storage At LinkedInJay Kreps on Project Voldemort Scaling Simple Storage At LinkedIn
Jay Kreps on Project Voldemort Scaling Simple Storage At LinkedInLinkedIn
 
MySQL High-Availability and Scale-Out architectures
MySQL High-Availability and Scale-Out architecturesMySQL High-Availability and Scale-Out architectures
MySQL High-Availability and Scale-Out architecturesFromDual GmbH
 
Oracle Exadata Performance: Latest Improvements and Less Known Features
Oracle Exadata Performance: Latest Improvements and Less Known FeaturesOracle Exadata Performance: Latest Improvements and Less Known Features
Oracle Exadata Performance: Latest Improvements and Less Known FeaturesTanel Poder
 
Cassandra Consistency: Tradeoffs and Limitations
Cassandra Consistency: Tradeoffs and LimitationsCassandra Consistency: Tradeoffs and Limitations
Cassandra Consistency: Tradeoffs and LimitationsPanagiotis Papadopoulos
 
Dynamo and BigTable in light of the CAP theorem
Dynamo and BigTable in light of the CAP theoremDynamo and BigTable in light of the CAP theorem
Dynamo and BigTable in light of the CAP theoremGrisha Weintraub
 
The mysqlnd replication and load balancing plugin
The mysqlnd replication and load balancing pluginThe mysqlnd replication and load balancing plugin
The mysqlnd replication and load balancing pluginUlf Wendel
 
ORM and distributed caching
ORM and distributed cachingORM and distributed caching
ORM and distributed cachingaragozin
 
MySQL Performance Tuning
MySQL Performance TuningMySQL Performance Tuning
MySQL Performance TuningFromDual GmbH
 
Linux and H/W optimizations for MySQL
Linux and H/W optimizations for MySQLLinux and H/W optimizations for MySQL
Linux and H/W optimizations for MySQLYoshinori Matsunobu
 
Real-time Big Data Analytics Engine using Impala
Real-time Big Data Analytics Engine using ImpalaReal-time Big Data Analytics Engine using Impala
Real-time Big Data Analytics Engine using ImpalaJason Shih
 
Understanding AntiEntropy in Cassandra
Understanding AntiEntropy in CassandraUnderstanding AntiEntropy in Cassandra
Understanding AntiEntropy in CassandraJason Brown
 
Coherence Implementation Patterns - Sig Nov 2011
Coherence Implementation Patterns - Sig Nov 2011Coherence Implementation Patterns - Sig Nov 2011
Coherence Implementation Patterns - Sig Nov 2011Ben Stopford
 
Deploying Maximum HA Architecture With PostgreSQL
Deploying Maximum HA Architecture With PostgreSQLDeploying Maximum HA Architecture With PostgreSQL
Deploying Maximum HA Architecture With PostgreSQLDenish Patel
 
Galera Cluster: Synchronous Multi-Master Replication for MySQL HA
Galera Cluster: Synchronous Multi-Master Replication for MySQL HAGalera Cluster: Synchronous Multi-Master Replication for MySQL HA
Galera Cluster: Synchronous Multi-Master Replication for MySQL HALudovico Caldara
 

La actualidad más candente (20)

Solving Office 365 Big Challenges using Cassandra + Spark
Solving Office 365 Big Challenges using Cassandra + Spark Solving Office 365 Big Challenges using Cassandra + Spark
Solving Office 365 Big Challenges using Cassandra + Spark
 
(Aaron myers) hdfs impala
(Aaron myers)   hdfs impala(Aaron myers)   hdfs impala
(Aaron myers) hdfs impala
 
Database backed coherence cache
Database backed coherence cacheDatabase backed coherence cache
Database backed coherence cache
 
Data massage: How databases have been scaled from one to one million nodes
Data massage: How databases have been scaled from one to one million nodesData massage: How databases have been scaled from one to one million nodes
Data massage: How databases have been scaled from one to one million nodes
 
Introduction to hazelcast
Introduction to hazelcastIntroduction to hazelcast
Introduction to hazelcast
 
Jay Kreps on Project Voldemort Scaling Simple Storage At LinkedIn
Jay Kreps on Project Voldemort Scaling Simple Storage At LinkedInJay Kreps on Project Voldemort Scaling Simple Storage At LinkedIn
Jay Kreps on Project Voldemort Scaling Simple Storage At LinkedIn
 
MySQL High-Availability and Scale-Out architectures
MySQL High-Availability and Scale-Out architecturesMySQL High-Availability and Scale-Out architectures
MySQL High-Availability and Scale-Out architectures
 
Oracle Exadata Performance: Latest Improvements and Less Known Features
Oracle Exadata Performance: Latest Improvements and Less Known FeaturesOracle Exadata Performance: Latest Improvements and Less Known Features
Oracle Exadata Performance: Latest Improvements and Less Known Features
 
Cassandra Consistency: Tradeoffs and Limitations
Cassandra Consistency: Tradeoffs and LimitationsCassandra Consistency: Tradeoffs and Limitations
Cassandra Consistency: Tradeoffs and Limitations
 
Dynamo and BigTable in light of the CAP theorem
Dynamo and BigTable in light of the CAP theoremDynamo and BigTable in light of the CAP theorem
Dynamo and BigTable in light of the CAP theorem
 
The mysqlnd replication and load balancing plugin
The mysqlnd replication and load balancing pluginThe mysqlnd replication and load balancing plugin
The mysqlnd replication and load balancing plugin
 
ORM and distributed caching
ORM and distributed cachingORM and distributed caching
ORM and distributed caching
 
MySQL Performance Tuning
MySQL Performance TuningMySQL Performance Tuning
MySQL Performance Tuning
 
Linux and H/W optimizations for MySQL
Linux and H/W optimizations for MySQLLinux and H/W optimizations for MySQL
Linux and H/W optimizations for MySQL
 
Real-time Big Data Analytics Engine using Impala
Real-time Big Data Analytics Engine using ImpalaReal-time Big Data Analytics Engine using Impala
Real-time Big Data Analytics Engine using Impala
 
Understanding AntiEntropy in Cassandra
Understanding AntiEntropy in CassandraUnderstanding AntiEntropy in Cassandra
Understanding AntiEntropy in Cassandra
 
Coherence Implementation Patterns - Sig Nov 2011
Coherence Implementation Patterns - Sig Nov 2011Coherence Implementation Patterns - Sig Nov 2011
Coherence Implementation Patterns - Sig Nov 2011
 
Percona FT / TokuDB
Percona FT / TokuDBPercona FT / TokuDB
Percona FT / TokuDB
 
Deploying Maximum HA Architecture With PostgreSQL
Deploying Maximum HA Architecture With PostgreSQLDeploying Maximum HA Architecture With PostgreSQL
Deploying Maximum HA Architecture With PostgreSQL
 
Galera Cluster: Synchronous Multi-Master Replication for MySQL HA
Galera Cluster: Synchronous Multi-Master Replication for MySQL HAGalera Cluster: Synchronous Multi-Master Replication for MySQL HA
Galera Cluster: Synchronous Multi-Master Replication for MySQL HA
 

Similar a Scaling up java applications on windows

Java and cgroups eng
Java and cgroups engJava and cgroups eng
Java and cgroups engRalf Ernst
 
Machine Learning With H2O vs SparkML
Machine Learning With H2O vs SparkMLMachine Learning With H2O vs SparkML
Machine Learning With H2O vs SparkMLArnab Biswas
 
Running your Java EE 6 applications in the clouds
Running your Java EE 6 applications in the clouds Running your Java EE 6 applications in the clouds
Running your Java EE 6 applications in the clouds Arun Gupta
 
New hope is comming? Project Loom.pdf
New hope is comming? Project Loom.pdfNew hope is comming? Project Loom.pdf
New hope is comming? Project Loom.pdfKrystian Zybała
 
Running your Java EE 6 applications in the Cloud @ Silicon Valley Code Camp 2010
Running your Java EE 6 applications in the Cloud @ Silicon Valley Code Camp 2010Running your Java EE 6 applications in the Cloud @ Silicon Valley Code Camp 2010
Running your Java EE 6 applications in the Cloud @ Silicon Valley Code Camp 2010Arun Gupta
 
Multi-core Parallelization in Clojure - a Case Study
Multi-core Parallelization in Clojure - a Case StudyMulti-core Parallelization in Clojure - a Case Study
Multi-core Parallelization in Clojure - a Case Studyelliando dias
 
M6d cassandrapresentation
M6d cassandrapresentationM6d cassandrapresentation
M6d cassandrapresentationEdward Capriolo
 
Secrets of Performance Tuning Java on Kubernetes
Secrets of Performance Tuning Java on KubernetesSecrets of Performance Tuning Java on Kubernetes
Secrets of Performance Tuning Java on KubernetesBruno Borges
 
Real time analytics using Hadoop and Elasticsearch
Real time analytics using Hadoop and ElasticsearchReal time analytics using Hadoop and Elasticsearch
Real time analytics using Hadoop and ElasticsearchAbhishek Andhavarapu
 
Running your Java EE applications in the Cloud
Running your Java EE applications in the CloudRunning your Java EE applications in the Cloud
Running your Java EE applications in the CloudArun Gupta
 
The effect of page size modification on jvm
The effect of page size modification on jvmThe effect of page size modification on jvm
The effect of page size modification on jvmParameswaran Selvam
 
Scale your Alfresco Solutions
Scale your Alfresco Solutions Scale your Alfresco Solutions
Scale your Alfresco Solutions Alfresco Software
 
What’s expected in Java 9
What’s expected in Java 9What’s expected in Java 9
What’s expected in Java 9Gal Marder
 
Performance Tuning - Memory leaks, Thread deadlocks, JDK tools
Performance Tuning -  Memory leaks, Thread deadlocks, JDK toolsPerformance Tuning -  Memory leaks, Thread deadlocks, JDK tools
Performance Tuning - Memory leaks, Thread deadlocks, JDK toolsHaribabu Nandyal Padmanaban
 
Spark Summit EU talk by Berni Schiefer
Spark Summit EU talk by Berni SchieferSpark Summit EU talk by Berni Schiefer
Spark Summit EU talk by Berni SchieferSpark Summit
 
Optimizing elastic search on google compute engine
Optimizing elastic search on google compute engineOptimizing elastic search on google compute engine
Optimizing elastic search on google compute engineBhuvaneshwaran R
 
Running ElasticSearch on Google Compute Engine in Production
Running ElasticSearch on Google Compute Engine in ProductionRunning ElasticSearch on Google Compute Engine in Production
Running ElasticSearch on Google Compute Engine in ProductionSearce Inc
 

Similar a Scaling up java applications on windows (20)

Java and cgroups eng
Java and cgroups engJava and cgroups eng
Java and cgroups eng
 
Machine Learning With H2O vs SparkML
Machine Learning With H2O vs SparkMLMachine Learning With H2O vs SparkML
Machine Learning With H2O vs SparkML
 
Running your Java EE 6 applications in the clouds
Running your Java EE 6 applications in the clouds Running your Java EE 6 applications in the clouds
Running your Java EE 6 applications in the clouds
 
New hope is comming? Project Loom.pdf
New hope is comming? Project Loom.pdfNew hope is comming? Project Loom.pdf
New hope is comming? Project Loom.pdf
 
Loom promises: be there!
Loom promises: be there!Loom promises: be there!
Loom promises: be there!
 
Running your Java EE 6 applications in the Cloud @ Silicon Valley Code Camp 2010
Running your Java EE 6 applications in the Cloud @ Silicon Valley Code Camp 2010Running your Java EE 6 applications in the Cloud @ Silicon Valley Code Camp 2010
Running your Java EE 6 applications in the Cloud @ Silicon Valley Code Camp 2010
 
Multi-core Parallelization in Clojure - a Case Study
Multi-core Parallelization in Clojure - a Case StudyMulti-core Parallelization in Clojure - a Case Study
Multi-core Parallelization in Clojure - a Case Study
 
M6d cassandrapresentation
M6d cassandrapresentationM6d cassandrapresentation
M6d cassandrapresentation
 
Secrets of Performance Tuning Java on Kubernetes
Secrets of Performance Tuning Java on KubernetesSecrets of Performance Tuning Java on Kubernetes
Secrets of Performance Tuning Java on Kubernetes
 
Real time analytics using Hadoop and Elasticsearch
Real time analytics using Hadoop and ElasticsearchReal time analytics using Hadoop and Elasticsearch
Real time analytics using Hadoop and Elasticsearch
 
Running your Java EE applications in the Cloud
Running your Java EE applications in the CloudRunning your Java EE applications in the Cloud
Running your Java EE applications in the Cloud
 
Teradata training
Teradata trainingTeradata training
Teradata training
 
The effect of page size modification on jvm
The effect of page size modification on jvmThe effect of page size modification on jvm
The effect of page size modification on jvm
 
Scale your Alfresco Solutions
Scale your Alfresco Solutions Scale your Alfresco Solutions
Scale your Alfresco Solutions
 
What’s expected in Java 9
What’s expected in Java 9What’s expected in Java 9
What’s expected in Java 9
 
Threading.pptx
Threading.pptxThreading.pptx
Threading.pptx
 
Performance Tuning - Memory leaks, Thread deadlocks, JDK tools
Performance Tuning -  Memory leaks, Thread deadlocks, JDK toolsPerformance Tuning -  Memory leaks, Thread deadlocks, JDK tools
Performance Tuning - Memory leaks, Thread deadlocks, JDK tools
 
Spark Summit EU talk by Berni Schiefer
Spark Summit EU talk by Berni SchieferSpark Summit EU talk by Berni Schiefer
Spark Summit EU talk by Berni Schiefer
 
Optimizing elastic search on google compute engine
Optimizing elastic search on google compute engineOptimizing elastic search on google compute engine
Optimizing elastic search on google compute engine
 
Running ElasticSearch on Google Compute Engine in Production
Running ElasticSearch on Google Compute Engine in ProductionRunning ElasticSearch on Google Compute Engine in Production
Running ElasticSearch on Google Compute Engine in Production
 

Más de Juarez Junior

Oracle CloudWorld 2023 - How to hook up Telegram with Spring Boot and ADB
Oracle CloudWorld 2023 - How to hook up Telegram with Spring Boot and ADBOracle CloudWorld 2023 - How to hook up Telegram with Spring Boot and ADB
Oracle CloudWorld 2023 - How to hook up Telegram with Spring Boot and ADBJuarez Junior
 
Oracle CloudWorld 2023 - A Practical Guide to Implementing DevOps with IaC fo...
Oracle CloudWorld 2023 - A Practical Guide to Implementing DevOps with IaC fo...Oracle CloudWorld 2023 - A Practical Guide to Implementing DevOps with IaC fo...
Oracle CloudWorld 2023 - A Practical Guide to Implementing DevOps with IaC fo...Juarez Junior
 
Oracle CloudWorld 2023 - A High-Speed Data Ingestion Service in Java Using MQ...
Oracle CloudWorld 2023 - A High-Speed Data Ingestion Service in Java Using MQ...Oracle CloudWorld 2023 - A High-Speed Data Ingestion Service in Java Using MQ...
Oracle CloudWorld 2023 - A High-Speed Data Ingestion Service in Java Using MQ...Juarez Junior
 
Oracle CloudWorld 2023 - Multi-cloud App Dev for Java Devs with Microsoft Azu...
Oracle CloudWorld 2023 - Multi-cloud App Dev for Java Devs with Microsoft Azu...Oracle CloudWorld 2023 - Multi-cloud App Dev for Java Devs with Microsoft Azu...
Oracle CloudWorld 2023 - Multi-cloud App Dev for Java Devs with Microsoft Azu...Juarez Junior
 
GeeCon Prague 2023 - Unleash the power of your applications with Micronaut®, ...
GeeCon Prague 2023 - Unleash the power of your applications with Micronaut®, ...GeeCon Prague 2023 - Unleash the power of your applications with Micronaut®, ...
GeeCon Prague 2023 - Unleash the power of your applications with Micronaut®, ...Juarez Junior
 
jPrime 2023 - Revolutionize Java DB AppDev with Reactive Streams and Virtual ...
jPrime 2023 - Revolutionize Java DB AppDev with Reactive Streams and Virtual ...jPrime 2023 - Revolutionize Java DB AppDev with Reactive Streams and Virtual ...
jPrime 2023 - Revolutionize Java DB AppDev with Reactive Streams and Virtual ...Juarez Junior
 
Porto Tech Hub Conference 2023 - Revolutionize Java DB AppDev with Reactive S...
Porto Tech Hub Conference 2023 - Revolutionize Java DB AppDev with Reactive S...Porto Tech Hub Conference 2023 - Revolutionize Java DB AppDev with Reactive S...
Porto Tech Hub Conference 2023 - Revolutionize Java DB AppDev with Reactive S...Juarez Junior
 
SevillaJUG - Unleash the power of your applications with Micronaut® ,GraalVM...
SevillaJUG - Unleash the power of your applications with Micronaut®  ,GraalVM...SevillaJUG - Unleash the power of your applications with Micronaut®  ,GraalVM...
SevillaJUG - Unleash the power of your applications with Micronaut® ,GraalVM...Juarez Junior
 
SKILup Days Container Orchestration - Kubernetes Operators for Databases
SKILup Days Container Orchestration - Kubernetes Operators for DatabasesSKILup Days Container Orchestration - Kubernetes Operators for Databases
SKILup Days Container Orchestration - Kubernetes Operators for DatabasesJuarez Junior
 
TDC Connections 2023 - Revolutionize Java DB AppDev with Reactive Streams and...
TDC Connections 2023 - Revolutionize Java DB AppDev with Reactive Streams and...TDC Connections 2023 - Revolutionize Java DB AppDev with Reactive Streams and...
TDC Connections 2023 - Revolutionize Java DB AppDev with Reactive Streams and...Juarez Junior
 
TDC Connections 2023 - A High-Speed Data Ingestion Service in Java Using MQTT...
TDC Connections 2023 - A High-Speed Data Ingestion Service in Java Using MQTT...TDC Connections 2023 - A High-Speed Data Ingestion Service in Java Using MQTT...
TDC Connections 2023 - A High-Speed Data Ingestion Service in Java Using MQTT...Juarez Junior
 
DTU Global Azure 2023 Bootcamp - Multi-cloud App Dev for Java Developers with...
DTU Global Azure 2023 Bootcamp - Multi-cloud App Dev for Java Developers with...DTU Global Azure 2023 Bootcamp - Multi-cloud App Dev for Java Developers with...
DTU Global Azure 2023 Bootcamp - Multi-cloud App Dev for Java Developers with...Juarez Junior
 
Melee Numerique 2022 - Revolutionize Java DB App Dev with Reactive Streams an...
Melee Numerique 2022 - Revolutionize Java DB App Dev with Reactive Streams an...Melee Numerique 2022 - Revolutionize Java DB App Dev with Reactive Streams an...
Melee Numerique 2022 - Revolutionize Java DB App Dev with Reactive Streams an...Juarez Junior
 
JCON OpenBlend Slovenia 2023 - A High-Speed Data Ingestion Service in Java Us...
JCON OpenBlend Slovenia 2023 - A High-Speed Data Ingestion Service in Java Us...JCON OpenBlend Slovenia 2023 - A High-Speed Data Ingestion Service in Java Us...
JCON OpenBlend Slovenia 2023 - A High-Speed Data Ingestion Service in Java Us...Juarez Junior
 
DWX23 - Revolutionize Java DB AppDev with Reactive Streams and Virtual Threads
DWX23 - Revolutionize Java DB AppDev with Reactive Streams and Virtual ThreadsDWX23 - Revolutionize Java DB AppDev with Reactive Streams and Virtual Threads
DWX23 - Revolutionize Java DB AppDev with Reactive Streams and Virtual ThreadsJuarez Junior
 
DWX23 - A High-Speed Data Ingestion Service in Java Using MQTT, AMQP, and STO...
DWX23 - A High-Speed Data Ingestion Service in Java Using MQTT, AMQP, and STO...DWX23 - A High-Speed Data Ingestion Service in Java Using MQTT, AMQP, and STO...
DWX23 - A High-Speed Data Ingestion Service in Java Using MQTT, AMQP, and STO...Juarez Junior
 
DeveloperWeek Latin America 2023 - A High-Speed Data Ingestion Service in Jav...
DeveloperWeek Latin America 2023 - A High-Speed Data Ingestion Service in Jav...DeveloperWeek Latin America 2023 - A High-Speed Data Ingestion Service in Jav...
DeveloperWeek Latin America 2023 - A High-Speed Data Ingestion Service in Jav...Juarez Junior
 
DeveloperWeekEnterprise2023 - Introduction to Kubernetes Operators for Databases
DeveloperWeekEnterprise2023 - Introduction to Kubernetes Operators for DatabasesDeveloperWeekEnterprise2023 - Introduction to Kubernetes Operators for Databases
DeveloperWeekEnterprise2023 - Introduction to Kubernetes Operators for DatabasesJuarez Junior
 
DevConf.cz - Introduction to Kubernetes Operators for Databases
DevConf.cz - Introduction to Kubernetes Operators for DatabasesDevConf.cz - Introduction to Kubernetes Operators for Databases
DevConf.cz - Introduction to Kubernetes Operators for DatabasesJuarez Junior
 
CloudTalks - Revolutionize Java DB AppDev with Reactive Streams and Virtual T...
CloudTalks - Revolutionize Java DB AppDev with Reactive Streams and Virtual T...CloudTalks - Revolutionize Java DB AppDev with Reactive Streams and Virtual T...
CloudTalks - Revolutionize Java DB AppDev with Reactive Streams and Virtual T...Juarez Junior
 

Más de Juarez Junior (20)

Oracle CloudWorld 2023 - How to hook up Telegram with Spring Boot and ADB
Oracle CloudWorld 2023 - How to hook up Telegram with Spring Boot and ADBOracle CloudWorld 2023 - How to hook up Telegram with Spring Boot and ADB
Oracle CloudWorld 2023 - How to hook up Telegram with Spring Boot and ADB
 
Oracle CloudWorld 2023 - A Practical Guide to Implementing DevOps with IaC fo...
Oracle CloudWorld 2023 - A Practical Guide to Implementing DevOps with IaC fo...Oracle CloudWorld 2023 - A Practical Guide to Implementing DevOps with IaC fo...
Oracle CloudWorld 2023 - A Practical Guide to Implementing DevOps with IaC fo...
 
Oracle CloudWorld 2023 - A High-Speed Data Ingestion Service in Java Using MQ...
Oracle CloudWorld 2023 - A High-Speed Data Ingestion Service in Java Using MQ...Oracle CloudWorld 2023 - A High-Speed Data Ingestion Service in Java Using MQ...
Oracle CloudWorld 2023 - A High-Speed Data Ingestion Service in Java Using MQ...
 
Oracle CloudWorld 2023 - Multi-cloud App Dev for Java Devs with Microsoft Azu...
Oracle CloudWorld 2023 - Multi-cloud App Dev for Java Devs with Microsoft Azu...Oracle CloudWorld 2023 - Multi-cloud App Dev for Java Devs with Microsoft Azu...
Oracle CloudWorld 2023 - Multi-cloud App Dev for Java Devs with Microsoft Azu...
 
GeeCon Prague 2023 - Unleash the power of your applications with Micronaut®, ...
GeeCon Prague 2023 - Unleash the power of your applications with Micronaut®, ...GeeCon Prague 2023 - Unleash the power of your applications with Micronaut®, ...
GeeCon Prague 2023 - Unleash the power of your applications with Micronaut®, ...
 
jPrime 2023 - Revolutionize Java DB AppDev with Reactive Streams and Virtual ...
jPrime 2023 - Revolutionize Java DB AppDev with Reactive Streams and Virtual ...jPrime 2023 - Revolutionize Java DB AppDev with Reactive Streams and Virtual ...
jPrime 2023 - Revolutionize Java DB AppDev with Reactive Streams and Virtual ...
 
Porto Tech Hub Conference 2023 - Revolutionize Java DB AppDev with Reactive S...
Porto Tech Hub Conference 2023 - Revolutionize Java DB AppDev with Reactive S...Porto Tech Hub Conference 2023 - Revolutionize Java DB AppDev with Reactive S...
Porto Tech Hub Conference 2023 - Revolutionize Java DB AppDev with Reactive S...
 
SevillaJUG - Unleash the power of your applications with Micronaut® ,GraalVM...
SevillaJUG - Unleash the power of your applications with Micronaut®  ,GraalVM...SevillaJUG - Unleash the power of your applications with Micronaut®  ,GraalVM...
SevillaJUG - Unleash the power of your applications with Micronaut® ,GraalVM...
 
SKILup Days Container Orchestration - Kubernetes Operators for Databases
SKILup Days Container Orchestration - Kubernetes Operators for DatabasesSKILup Days Container Orchestration - Kubernetes Operators for Databases
SKILup Days Container Orchestration - Kubernetes Operators for Databases
 
TDC Connections 2023 - Revolutionize Java DB AppDev with Reactive Streams and...
TDC Connections 2023 - Revolutionize Java DB AppDev with Reactive Streams and...TDC Connections 2023 - Revolutionize Java DB AppDev with Reactive Streams and...
TDC Connections 2023 - Revolutionize Java DB AppDev with Reactive Streams and...
 
TDC Connections 2023 - A High-Speed Data Ingestion Service in Java Using MQTT...
TDC Connections 2023 - A High-Speed Data Ingestion Service in Java Using MQTT...TDC Connections 2023 - A High-Speed Data Ingestion Service in Java Using MQTT...
TDC Connections 2023 - A High-Speed Data Ingestion Service in Java Using MQTT...
 
DTU Global Azure 2023 Bootcamp - Multi-cloud App Dev for Java Developers with...
DTU Global Azure 2023 Bootcamp - Multi-cloud App Dev for Java Developers with...DTU Global Azure 2023 Bootcamp - Multi-cloud App Dev for Java Developers with...
DTU Global Azure 2023 Bootcamp - Multi-cloud App Dev for Java Developers with...
 
Melee Numerique 2022 - Revolutionize Java DB App Dev with Reactive Streams an...
Melee Numerique 2022 - Revolutionize Java DB App Dev with Reactive Streams an...Melee Numerique 2022 - Revolutionize Java DB App Dev with Reactive Streams an...
Melee Numerique 2022 - Revolutionize Java DB App Dev with Reactive Streams an...
 
JCON OpenBlend Slovenia 2023 - A High-Speed Data Ingestion Service in Java Us...
JCON OpenBlend Slovenia 2023 - A High-Speed Data Ingestion Service in Java Us...JCON OpenBlend Slovenia 2023 - A High-Speed Data Ingestion Service in Java Us...
JCON OpenBlend Slovenia 2023 - A High-Speed Data Ingestion Service in Java Us...
 
DWX23 - Revolutionize Java DB AppDev with Reactive Streams and Virtual Threads
DWX23 - Revolutionize Java DB AppDev with Reactive Streams and Virtual ThreadsDWX23 - Revolutionize Java DB AppDev with Reactive Streams and Virtual Threads
DWX23 - Revolutionize Java DB AppDev with Reactive Streams and Virtual Threads
 
DWX23 - A High-Speed Data Ingestion Service in Java Using MQTT, AMQP, and STO...
DWX23 - A High-Speed Data Ingestion Service in Java Using MQTT, AMQP, and STO...DWX23 - A High-Speed Data Ingestion Service in Java Using MQTT, AMQP, and STO...
DWX23 - A High-Speed Data Ingestion Service in Java Using MQTT, AMQP, and STO...
 
DeveloperWeek Latin America 2023 - A High-Speed Data Ingestion Service in Jav...
DeveloperWeek Latin America 2023 - A High-Speed Data Ingestion Service in Jav...DeveloperWeek Latin America 2023 - A High-Speed Data Ingestion Service in Jav...
DeveloperWeek Latin America 2023 - A High-Speed Data Ingestion Service in Jav...
 
DeveloperWeekEnterprise2023 - Introduction to Kubernetes Operators for Databases
DeveloperWeekEnterprise2023 - Introduction to Kubernetes Operators for DatabasesDeveloperWeekEnterprise2023 - Introduction to Kubernetes Operators for Databases
DeveloperWeekEnterprise2023 - Introduction to Kubernetes Operators for Databases
 
DevConf.cz - Introduction to Kubernetes Operators for Databases
DevConf.cz - Introduction to Kubernetes Operators for DatabasesDevConf.cz - Introduction to Kubernetes Operators for Databases
DevConf.cz - Introduction to Kubernetes Operators for Databases
 
CloudTalks - Revolutionize Java DB AppDev with Reactive Streams and Virtual T...
CloudTalks - Revolutionize Java DB AppDev with Reactive Streams and Virtual T...CloudTalks - Revolutionize Java DB AppDev with Reactive Streams and Virtual T...
CloudTalks - Revolutionize Java DB AppDev with Reactive Streams and Virtual T...
 

Último

FWD Group - Insurer Innovation Award 2024
FWD Group - Insurer Innovation Award 2024FWD Group - Insurer Innovation Award 2024
FWD Group - Insurer Innovation Award 2024The Digital Insurer
 
Apidays New York 2024 - Scaling API-first by Ian Reasor and Radu Cotescu, Adobe
Apidays New York 2024 - Scaling API-first by Ian Reasor and Radu Cotescu, AdobeApidays New York 2024 - Scaling API-first by Ian Reasor and Radu Cotescu, Adobe
Apidays New York 2024 - Scaling API-first by Ian Reasor and Radu Cotescu, Adobeapidays
 
MINDCTI Revenue Release Quarter One 2024
MINDCTI Revenue Release Quarter One 2024MINDCTI Revenue Release Quarter One 2024
MINDCTI Revenue Release Quarter One 2024MIND CTI
 
Strategies for Landing an Oracle DBA Job as a Fresher
Strategies for Landing an Oracle DBA Job as a FresherStrategies for Landing an Oracle DBA Job as a Fresher
Strategies for Landing an Oracle DBA Job as a FresherRemote DBA Services
 
Biography Of Angeliki Cooney | Senior Vice President Life Sciences | Albany, ...
Biography Of Angeliki Cooney | Senior Vice President Life Sciences | Albany, ...Biography Of Angeliki Cooney | Senior Vice President Life Sciences | Albany, ...
Biography Of Angeliki Cooney | Senior Vice President Life Sciences | Albany, ...Angeliki Cooney
 
Apidays New York 2024 - The value of a flexible API Management solution for O...
Apidays New York 2024 - The value of a flexible API Management solution for O...Apidays New York 2024 - The value of a flexible API Management solution for O...
Apidays New York 2024 - The value of a flexible API Management solution for O...apidays
 
Strategize a Smooth Tenant-to-tenant Migration and Copilot Takeoff
Strategize a Smooth Tenant-to-tenant Migration and Copilot TakeoffStrategize a Smooth Tenant-to-tenant Migration and Copilot Takeoff
Strategize a Smooth Tenant-to-tenant Migration and Copilot Takeoffsammart93
 
ProductAnonymous-April2024-WinProductDiscovery-MelissaKlemke
ProductAnonymous-April2024-WinProductDiscovery-MelissaKlemkeProductAnonymous-April2024-WinProductDiscovery-MelissaKlemke
ProductAnonymous-April2024-WinProductDiscovery-MelissaKlemkeProduct Anonymous
 
Corporate and higher education May webinar.pptx
Corporate and higher education May webinar.pptxCorporate and higher education May webinar.pptx
Corporate and higher education May webinar.pptxRustici Software
 
Web Form Automation for Bonterra Impact Management (fka Social Solutions Apri...
Web Form Automation for Bonterra Impact Management (fka Social Solutions Apri...Web Form Automation for Bonterra Impact Management (fka Social Solutions Apri...
Web Form Automation for Bonterra Impact Management (fka Social Solutions Apri...Jeffrey Haguewood
 
Exploring Multimodal Embeddings with Milvus
Exploring Multimodal Embeddings with MilvusExploring Multimodal Embeddings with Milvus
Exploring Multimodal Embeddings with MilvusZilliz
 
Apidays New York 2024 - Accelerating FinTech Innovation by Vasa Krishnan, Fin...
Apidays New York 2024 - Accelerating FinTech Innovation by Vasa Krishnan, Fin...Apidays New York 2024 - Accelerating FinTech Innovation by Vasa Krishnan, Fin...
Apidays New York 2024 - Accelerating FinTech Innovation by Vasa Krishnan, Fin...apidays
 
Rising Above_ Dubai Floods and the Fortitude of Dubai International Airport.pdf
Rising Above_ Dubai Floods and the Fortitude of Dubai International Airport.pdfRising Above_ Dubai Floods and the Fortitude of Dubai International Airport.pdf
Rising Above_ Dubai Floods and the Fortitude of Dubai International Airport.pdfOrbitshub
 
Apidays New York 2024 - APIs in 2030: The Risk of Technological Sleepwalk by ...
Apidays New York 2024 - APIs in 2030: The Risk of Technological Sleepwalk by ...Apidays New York 2024 - APIs in 2030: The Risk of Technological Sleepwalk by ...
Apidays New York 2024 - APIs in 2030: The Risk of Technological Sleepwalk by ...apidays
 
Apidays New York 2024 - Passkeys: Developing APIs to enable passwordless auth...
Apidays New York 2024 - Passkeys: Developing APIs to enable passwordless auth...Apidays New York 2024 - Passkeys: Developing APIs to enable passwordless auth...
Apidays New York 2024 - Passkeys: Developing APIs to enable passwordless auth...apidays
 
AXA XL - Insurer Innovation Award Americas 2024
AXA XL - Insurer Innovation Award Americas 2024AXA XL - Insurer Innovation Award Americas 2024
AXA XL - Insurer Innovation Award Americas 2024The Digital Insurer
 
presentation ICT roal in 21st century education
presentation ICT roal in 21st century educationpresentation ICT roal in 21st century education
presentation ICT roal in 21st century educationjfdjdjcjdnsjd
 
Polkadot JAM Slides - Token2049 - By Dr. Gavin Wood
Polkadot JAM Slides - Token2049 - By Dr. Gavin WoodPolkadot JAM Slides - Token2049 - By Dr. Gavin Wood
Polkadot JAM Slides - Token2049 - By Dr. Gavin WoodJuan lago vázquez
 
TrustArc Webinar - Unlock the Power of AI-Driven Data Discovery
TrustArc Webinar - Unlock the Power of AI-Driven Data DiscoveryTrustArc Webinar - Unlock the Power of AI-Driven Data Discovery
TrustArc Webinar - Unlock the Power of AI-Driven Data DiscoveryTrustArc
 

Último (20)

FWD Group - Insurer Innovation Award 2024
FWD Group - Insurer Innovation Award 2024FWD Group - Insurer Innovation Award 2024
FWD Group - Insurer Innovation Award 2024
 
Apidays New York 2024 - Scaling API-first by Ian Reasor and Radu Cotescu, Adobe
Apidays New York 2024 - Scaling API-first by Ian Reasor and Radu Cotescu, AdobeApidays New York 2024 - Scaling API-first by Ian Reasor and Radu Cotescu, Adobe
Apidays New York 2024 - Scaling API-first by Ian Reasor and Radu Cotescu, Adobe
 
MINDCTI Revenue Release Quarter One 2024
MINDCTI Revenue Release Quarter One 2024MINDCTI Revenue Release Quarter One 2024
MINDCTI Revenue Release Quarter One 2024
 
Strategies for Landing an Oracle DBA Job as a Fresher
Strategies for Landing an Oracle DBA Job as a FresherStrategies for Landing an Oracle DBA Job as a Fresher
Strategies for Landing an Oracle DBA Job as a Fresher
 
Biography Of Angeliki Cooney | Senior Vice President Life Sciences | Albany, ...
Biography Of Angeliki Cooney | Senior Vice President Life Sciences | Albany, ...Biography Of Angeliki Cooney | Senior Vice President Life Sciences | Albany, ...
Biography Of Angeliki Cooney | Senior Vice President Life Sciences | Albany, ...
 
Apidays New York 2024 - The value of a flexible API Management solution for O...
Apidays New York 2024 - The value of a flexible API Management solution for O...Apidays New York 2024 - The value of a flexible API Management solution for O...
Apidays New York 2024 - The value of a flexible API Management solution for O...
 
Strategize a Smooth Tenant-to-tenant Migration and Copilot Takeoff
Strategize a Smooth Tenant-to-tenant Migration and Copilot TakeoffStrategize a Smooth Tenant-to-tenant Migration and Copilot Takeoff
Strategize a Smooth Tenant-to-tenant Migration and Copilot Takeoff
 
ProductAnonymous-April2024-WinProductDiscovery-MelissaKlemke
ProductAnonymous-April2024-WinProductDiscovery-MelissaKlemkeProductAnonymous-April2024-WinProductDiscovery-MelissaKlemke
ProductAnonymous-April2024-WinProductDiscovery-MelissaKlemke
 
Corporate and higher education May webinar.pptx
Corporate and higher education May webinar.pptxCorporate and higher education May webinar.pptx
Corporate and higher education May webinar.pptx
 
Web Form Automation for Bonterra Impact Management (fka Social Solutions Apri...
Web Form Automation for Bonterra Impact Management (fka Social Solutions Apri...Web Form Automation for Bonterra Impact Management (fka Social Solutions Apri...
Web Form Automation for Bonterra Impact Management (fka Social Solutions Apri...
 
Exploring Multimodal Embeddings with Milvus
Exploring Multimodal Embeddings with MilvusExploring Multimodal Embeddings with Milvus
Exploring Multimodal Embeddings with Milvus
 
Apidays New York 2024 - Accelerating FinTech Innovation by Vasa Krishnan, Fin...
Apidays New York 2024 - Accelerating FinTech Innovation by Vasa Krishnan, Fin...Apidays New York 2024 - Accelerating FinTech Innovation by Vasa Krishnan, Fin...
Apidays New York 2024 - Accelerating FinTech Innovation by Vasa Krishnan, Fin...
 
Rising Above_ Dubai Floods and the Fortitude of Dubai International Airport.pdf
Rising Above_ Dubai Floods and the Fortitude of Dubai International Airport.pdfRising Above_ Dubai Floods and the Fortitude of Dubai International Airport.pdf
Rising Above_ Dubai Floods and the Fortitude of Dubai International Airport.pdf
 
Apidays New York 2024 - APIs in 2030: The Risk of Technological Sleepwalk by ...
Apidays New York 2024 - APIs in 2030: The Risk of Technological Sleepwalk by ...Apidays New York 2024 - APIs in 2030: The Risk of Technological Sleepwalk by ...
Apidays New York 2024 - APIs in 2030: The Risk of Technological Sleepwalk by ...
 
Apidays New York 2024 - Passkeys: Developing APIs to enable passwordless auth...
Apidays New York 2024 - Passkeys: Developing APIs to enable passwordless auth...Apidays New York 2024 - Passkeys: Developing APIs to enable passwordless auth...
Apidays New York 2024 - Passkeys: Developing APIs to enable passwordless auth...
 
AXA XL - Insurer Innovation Award Americas 2024
AXA XL - Insurer Innovation Award Americas 2024AXA XL - Insurer Innovation Award Americas 2024
AXA XL - Insurer Innovation Award Americas 2024
 
presentation ICT roal in 21st century education
presentation ICT roal in 21st century educationpresentation ICT roal in 21st century education
presentation ICT roal in 21st century education
 
Polkadot JAM Slides - Token2049 - By Dr. Gavin Wood
Polkadot JAM Slides - Token2049 - By Dr. Gavin WoodPolkadot JAM Slides - Token2049 - By Dr. Gavin Wood
Polkadot JAM Slides - Token2049 - By Dr. Gavin Wood
 
+971581248768>> SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHA...
+971581248768>> SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHA...+971581248768>> SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHA...
+971581248768>> SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHA...
 
TrustArc Webinar - Unlock the Power of AI-Driven Data Discovery
TrustArc Webinar - Unlock the Power of AI-Driven Data DiscoveryTrustArc Webinar - Unlock the Power of AI-Driven Data Discovery
TrustArc Webinar - Unlock the Power of AI-Driven Data Discovery
 

Scaling up java applications on windows

  • 1. Scaling Up Java™ Applications On Windows® Servers Juarez Junior Systems Architect – Unisys Global Outsourcing
  • 2. Presentation Scope. We will focus on • Systems using 8 or more 32-bit Intel CPUs • Systems running - Microsoft Windows 2000 - Microsoft Windows Server 2003 • HotSpot™-based Java virtual machines - Sun JVM 1.4.x - Unisys JVM 1.4.1 • Command line options Goal: Identify what you can do to boost the performance of Java applications without rewriting.
  • 3. Agenda. Java and Scalability Cache Invalidation Process and Thread Affinity Java Heap and Heap Sizing Conclusions
  • 4. Agenda. Java and Scalability Cache Invalidation Process and Thread Affinity Java Heap and Heap Sizing Conclusions
  • 5. Definition of Scalability. The ability to reliably increase performance by increasing numbers of resources • Scale out • Scale up Increase the number of Increase the number of CPUs systems available to process and other system resources to the workload, all systems process the workload, all in one operating semi-independently. system (single OS instance).
  • 6. Scaling Up Java. 14 12 Scale Factor 10 8 Untuned 6 Tuned 4 2 0 11 16 21 26 31 1 6 CPUs
  • 7. Agenda. Java and Scalability Cache Invalidation Process and Thread Affinity Java Heap and Heap Sizing Conclusions
  • 8. Cache Invalidation. Consider two threads in same application accessing same data • Data is loaded into cache on each processor Memory • One thread updates data Data - Data in other cache becomes invalid Now consider many threads running on many X processors Data Data • One update can invalidate data in 31 caches Cache Cache Similar story with a shared cache • External cache shared among 4 processors CPU CPU False sharing • Threads have independent data that resides in adjacent memory • Caches are loaded based on cache line size (16-128 bytes)
  • 9. Agenda. Java and Scalability Cache Invalidation Process and Thread Affinity Java Heap and Heap Sizing Conclusions
  • 10. Process and Thread Affinity. Contain process/threads to run on CPU CPU certain processors • Keep threads within processor group if external cache CPU CPU Process affinity App1 App2 • Useful if threads share many common objects - J2EE-based application servers CPU CPU Thread affinity • Useful if threads are independent CPU CPU • Useful in scale-up scenario App3 OS
  • 11. Thread Affinity. 35 30 Scale Factor 25 No 20 Thread Affinity 15 Thread 10 Affinity 5 0 11 16 21 26 31 1 6 CPUs
  • 13. Process Affinity For Application Servers. Assign 2 – 4 CPUs per application server instance • Cluster the instances • Load balance among them Issue: FACT: Affinity is set by process name or id FACT: Process id is assigned at runtime FACT: Process name for every instance is java.exe PROBLEM: How do you assign affinity for each instance? SOLUTION: Make copies of java.exe (e.g. java01.exe) - assign affinity for each copy - modify batch files to use copies
  • 14. Agenda. Java and Scalability Cache Invalidation Process and Thread Affinity Java Heap and Heap Sizing Conclusions
  • 15. Java Heap. Young Generation • Eden - Where new objects are created • Survivor spaces - Where garbage collector places objects that are still in use Old Generation • Where tenured objects are placed References • http://java.sun.com/docs/hotspot/gc/ (1.3.1) • http://java.sun.com/docs/hotspot/gc1.4.2/
  • 16. Young Generation Sizing. Goal: 1000 business transactions in 12 minutes Heap set to: -Xms1024m –Xmx1024m 18 minute run, 472 seconds (7.8 minutes) in garbage collection
  • 17. Young Generation Sizing. -Xms1024m –Xmx1024m -XX:NewSize=300m –XX:MaxNewSize=300m 12 minute run, 25 seconds in garbage collection • 70 collections instead of 8000 (no major/full collections) • Average collection freed 240MB instead of just 1MB
  • 18. Survivor Ratio. -XX:SurvivorRatio=ratio • Eden-size = survivor-size * ratio • Eden-size + 2 * survivor-ratio = young-gen-size Example: • -XX:NewSize=200M –XX:SurvivorRatio=8 • Eden: 160MB, each Survivor Space: 20MB Use –XX:PrintHeapAtGC to monitor • Heap after GC invocations=11: new generation total 18432K, used 1604K eden space 16384K, 0% used from space 2048K, 78% used to space 2048K, 0% used Aim for 90-95% usage after collection • Typically, with large young generations, use larger ratio (e.g. 32)
  • 19. Thread-Local Allocation Blocks. Each thread gets its own piece of Eden Eden -XX:UseTLAB CPU Thread 1 -XX:TLABSize=sizek • Common sizes: 64, 128, 256 CPU Thread 2 • tlab-size * #-threads < eden-size CPU Use parallel collection Thread 3 • -XX:+UseParallelGC CPU Align TLABs to cache line Thread 4 size
  • 20. Agenda. Java and Scalability Cache Invalidation Process and Thread Affinity Java Heap and Heap Sizing Conclusions
  • 21. Pop Quiz State 5 things you can do to improve the performance of a Java application • Set process affinity • Use thread affinity, if appropriate • Set the young generation size (1/3 to 1/4 size of heap) - -XX:NewSize=sizem –XX:MaxNewSize=sizem - Try heap of 800MB, young generation of 200MB • Set the survivor ratio - -XX:SurvivorRatio=ratio • Use thread-local allocation blocks - -XX:+UseTLAB –XX:TLABSize=sizek