SlideShare ist ein Scribd-Unternehmen logo
1 von 36
Highly Scalable Java Programming  for Multi-Core System Zhi Gan (ganzhi@gmail.com) IBM  China Development Lab Next Generation Systems
Agenda ,[object Object],[object Object],[object Object],[object Object]
Continuing evolution of multicore Nehalem EX POWER 7 UltraSPARC T2 Varying trade-offs between thread speed & throughput Varying assumptions about memory footprint and working sets Max cores per chip 8 8 8 Max threads per core 2 4 8 Last level on-chip cache 24MB 32MB 4MB Memory controllers per chip 2 2 4 Max chips per system 8 32 4 Max system size (threads) 128 1,024 256
Patterson’s view of shifts in computer architecture ,[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],Source:  David Patterson, “Future of Computer Architecture”, February 2006
NUMA is the new normal L3 cache L3 cache L3 cache L3 cache L1 & L2 Caches Ex Units Highest affinity between  threads on a core Next highest affinity  between cores on a chip Affinity between a chip and locally attached DRAM IBM Power 750 POWER 7 32 cores, 128 threads Note:  Memory systems on all major platforms have similar hierarchical structure DIMM DIMM SN DIMM DIMM SN DIMM DIMM SN DIMM DIMM SN DIMM DIMM SN DIMM DIMM SN DIMM DIMM SN DIMM DIMM SN DIMM DIMM SN DIMM DIMM SN DIMM DIMM SN DIMM DIMM SN DIMM DIMM SN DIMM DIMM SN DIMM DIMM SN DIMM DIMM SN
Balancing I/O and Server Capacity Ultra-dense DRAM (MAX5) Parallel disk array Very high speed random r/w Highest cost & power Limited capacity High speed sequential r/w Lowest cost  per GB Virtually unlimited capacity (PBs) High speed random reads Lowest cost  per IOPS High capacity (TBs) Enterprise NAND Flash
Software challenges ,[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object]
Typical Scalability Curve
The 1st Step: Profiling Parallel Application
Important Profiling Tools ,[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object]
Tprof and VPA tool
Java Lock Monitor ,[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object]
Multi-core SDK Dead Lock View Synchronization View
Best Practice for High Scalable Java Programming
What Is Lock Contention? From  JLM tool website
Lock Operation Itself Is Expensive ,[object Object],[object Object]
Reduce Locking Scope ,[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],25%
Results from JLM report Reduced AVER_HTM
Lock Splitting ,[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],64%
Result from JLM report Reduced lock tries
Lock Striping ,[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],66%
Result from JLM report More locks with  less AVER_HTM
Split Hot Points : Scalable Counter ,[object Object],[object Object]
Alternatives of Exclusive Lock ,[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object]
Example of AtomicLongArray  ,[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],96%
Using Concurrent Container ,[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object]
Using Immutable and Thread Local data  ,[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object]
Reduce Memory Allocation ,[object Object],[object Object],[object Object],[object Object],[object Object]
Rocket Science: Lock-Free Programming
Using Lock-Free/Wait-Free Algorithm ,[object Object],[object Object],[object Object],[object Object],[object Object]
Why Lock-Free Often Means Better Scalability? (I) Lock:All threads wait for one Lock free: No wait, but only one can succeed, Other threads need retry
Why Lock-Free Often Means Better Scalability? (II) Lock:All threads wait for one Lock free: No wait, but only one can succeed, Other threads often need to retry X X
Performance of A Lock-Free Stack Picture from:  http:// www.infoq.com /articles/scalable-java-components
Performance of A Lock-Free HashMap Picture from:  A Fast Lock-Free Hash Table  by  Cliff Click
References ,[object Object],[object Object],[object Object],[object Object],[object Object],[object Object]
Backup

Weitere ähnliche Inhalte

Was ist angesagt?

Playing BBR with a userspace network stack
Playing BBR with a userspace network stackPlaying BBR with a userspace network stack
Playing BBR with a userspace network stackHajime Tazaki
 
Jvm Performance Tunning
Jvm Performance TunningJvm Performance Tunning
Jvm Performance Tunningguest1f2740
 
Kernelvm 201312-dlmopen
Kernelvm 201312-dlmopenKernelvm 201312-dlmopen
Kernelvm 201312-dlmopenHajime Tazaki
 
Linux rumpkernel - ABC2018 (AsiaBSDCon 2018)
Linux rumpkernel - ABC2018 (AsiaBSDCon 2018)Linux rumpkernel - ABC2018 (AsiaBSDCon 2018)
Linux rumpkernel - ABC2018 (AsiaBSDCon 2018)Hajime Tazaki
 
Introduction to RCU
Introduction to RCUIntroduction to RCU
Introduction to RCUKernel TLV
 
protothread and its usage in contiki OS
protothread and its usage in contiki OSprotothread and its usage in contiki OS
protothread and its usage in contiki OSSalah Amean
 
Am I reading GC logs Correctly?
Am I reading GC logs Correctly?Am I reading GC logs Correctly?
Am I reading GC logs Correctly?Tier1 App
 
Semtex.c [CVE-2013-2094] - A Linux Privelege Escalation
Semtex.c [CVE-2013-2094] - A Linux Privelege EscalationSemtex.c [CVE-2013-2094] - A Linux Privelege Escalation
Semtex.c [CVE-2013-2094] - A Linux Privelege EscalationKernel TLV
 
Library Operating System for Linux #netdev01
Library Operating System for Linux #netdev01Library Operating System for Linux #netdev01
Library Operating System for Linux #netdev01Hajime Tazaki
 
NUSE (Network Stack in Userspace) at #osio
NUSE (Network Stack in Userspace) at #osioNUSE (Network Stack in Userspace) at #osio
NUSE (Network Stack in Userspace) at #osioHajime Tazaki
 
Netmap presentation
Netmap presentationNetmap presentation
Netmap presentationAmir Razmjou
 
Integrating Cache Oblivious Approach with Modern Processor Architecture: The ...
Integrating Cache Oblivious Approach with Modern Processor Architecture: The ...Integrating Cache Oblivious Approach with Modern Processor Architecture: The ...
Integrating Cache Oblivious Approach with Modern Processor Architecture: The ...Tokyo Institute of Technology
 
Recent advance in netmap/VALE(mSwitch)
Recent advance in netmap/VALE(mSwitch)Recent advance in netmap/VALE(mSwitch)
Recent advance in netmap/VALE(mSwitch)micchie
 
Remote security with Red Hat Enterprise Linux
Remote security with Red Hat Enterprise LinuxRemote security with Red Hat Enterprise Linux
Remote security with Red Hat Enterprise LinuxGiuseppe Paterno'
 
Linux Kernel Library - Reusing Monolithic Kernel
Linux Kernel Library - Reusing Monolithic KernelLinux Kernel Library - Reusing Monolithic Kernel
Linux Kernel Library - Reusing Monolithic KernelHajime Tazaki
 
Introduction to netlink in linux kernel (english)
Introduction to netlink in linux kernel (english)Introduction to netlink in linux kernel (english)
Introduction to netlink in linux kernel (english)Sneeker Yeh
 
PASTE: Network Stacks Must Integrate with NVMM Abstractions
PASTE: Network Stacks Must Integrate with NVMM AbstractionsPASTE: Network Stacks Must Integrate with NVMM Abstractions
PASTE: Network Stacks Must Integrate with NVMM Abstractionsmicchie
 
Performance Analysis: new tools and concepts from the cloud
Performance Analysis: new tools and concepts from the cloudPerformance Analysis: new tools and concepts from the cloud
Performance Analysis: new tools and concepts from the cloudBrendan Gregg
 
Network emulator
Network emulatorNetwork emulator
Network emulatorjeromy fu
 
Preparing OpenSHMEM for Exascale
Preparing OpenSHMEM for ExascalePreparing OpenSHMEM for Exascale
Preparing OpenSHMEM for Exascaleinside-BigData.com
 

Was ist angesagt? (20)

Playing BBR with a userspace network stack
Playing BBR with a userspace network stackPlaying BBR with a userspace network stack
Playing BBR with a userspace network stack
 
Jvm Performance Tunning
Jvm Performance TunningJvm Performance Tunning
Jvm Performance Tunning
 
Kernelvm 201312-dlmopen
Kernelvm 201312-dlmopenKernelvm 201312-dlmopen
Kernelvm 201312-dlmopen
 
Linux rumpkernel - ABC2018 (AsiaBSDCon 2018)
Linux rumpkernel - ABC2018 (AsiaBSDCon 2018)Linux rumpkernel - ABC2018 (AsiaBSDCon 2018)
Linux rumpkernel - ABC2018 (AsiaBSDCon 2018)
 
Introduction to RCU
Introduction to RCUIntroduction to RCU
Introduction to RCU
 
protothread and its usage in contiki OS
protothread and its usage in contiki OSprotothread and its usage in contiki OS
protothread and its usage in contiki OS
 
Am I reading GC logs Correctly?
Am I reading GC logs Correctly?Am I reading GC logs Correctly?
Am I reading GC logs Correctly?
 
Semtex.c [CVE-2013-2094] - A Linux Privelege Escalation
Semtex.c [CVE-2013-2094] - A Linux Privelege EscalationSemtex.c [CVE-2013-2094] - A Linux Privelege Escalation
Semtex.c [CVE-2013-2094] - A Linux Privelege Escalation
 
Library Operating System for Linux #netdev01
Library Operating System for Linux #netdev01Library Operating System for Linux #netdev01
Library Operating System for Linux #netdev01
 
NUSE (Network Stack in Userspace) at #osio
NUSE (Network Stack in Userspace) at #osioNUSE (Network Stack in Userspace) at #osio
NUSE (Network Stack in Userspace) at #osio
 
Netmap presentation
Netmap presentationNetmap presentation
Netmap presentation
 
Integrating Cache Oblivious Approach with Modern Processor Architecture: The ...
Integrating Cache Oblivious Approach with Modern Processor Architecture: The ...Integrating Cache Oblivious Approach with Modern Processor Architecture: The ...
Integrating Cache Oblivious Approach with Modern Processor Architecture: The ...
 
Recent advance in netmap/VALE(mSwitch)
Recent advance in netmap/VALE(mSwitch)Recent advance in netmap/VALE(mSwitch)
Recent advance in netmap/VALE(mSwitch)
 
Remote security with Red Hat Enterprise Linux
Remote security with Red Hat Enterprise LinuxRemote security with Red Hat Enterprise Linux
Remote security with Red Hat Enterprise Linux
 
Linux Kernel Library - Reusing Monolithic Kernel
Linux Kernel Library - Reusing Monolithic KernelLinux Kernel Library - Reusing Monolithic Kernel
Linux Kernel Library - Reusing Monolithic Kernel
 
Introduction to netlink in linux kernel (english)
Introduction to netlink in linux kernel (english)Introduction to netlink in linux kernel (english)
Introduction to netlink in linux kernel (english)
 
PASTE: Network Stacks Must Integrate with NVMM Abstractions
PASTE: Network Stacks Must Integrate with NVMM AbstractionsPASTE: Network Stacks Must Integrate with NVMM Abstractions
PASTE: Network Stacks Must Integrate with NVMM Abstractions
 
Performance Analysis: new tools and concepts from the cloud
Performance Analysis: new tools and concepts from the cloudPerformance Analysis: new tools and concepts from the cloud
Performance Analysis: new tools and concepts from the cloud
 
Network emulator
Network emulatorNetwork emulator
Network emulator
 
Preparing OpenSHMEM for Exascale
Preparing OpenSHMEM for ExascalePreparing OpenSHMEM for Exascale
Preparing OpenSHMEM for Exascale
 

Andere mochten auch

О компании Liberty Grant
О компании Liberty GrantО компании Liberty Grant
О компании Liberty GrantLiberty Grant
 
Как защитить IT-бюджеты перед бизнесом
Как защитить IT-бюджеты перед бизнесомКак защитить IT-бюджеты перед бизнесом
Как защитить IT-бюджеты перед бизнесомLiberty Grant
 
Liberty grant.Paymentsoptimization
Liberty grant.PaymentsoptimizationLiberty grant.Paymentsoptimization
Liberty grant.PaymentsoptimizationLiberty Grant
 
淘宝广告技术部开发流程和Scrum实践
淘宝广告技术部开发流程和Scrum实践淘宝广告技术部开发流程和Scrum实践
淘宝广告技术部开发流程和Scrum实践Open Party
 
Дэшборд для мониторинга платежей
Дэшборд для мониторинга платежейДэшборд для мониторинга платежей
Дэшборд для мониторинга платежейLiberty Grant
 
Улучшение бизнес-процессов
Улучшение бизнес-процессовУлучшение бизнес-процессов
Улучшение бизнес-процессовLiberty Grant
 
夸父通讯中间件
夸父通讯中间件夸父通讯中间件
夸父通讯中间件Open Party
 
Evolutionary db development
Evolutionary db development Evolutionary db development
Evolutionary db development Open Party
 
LibertyGrant.InetMobileBanking
LibertyGrant.InetMobileBankingLibertyGrant.InetMobileBanking
LibertyGrant.InetMobileBankingLiberty Grant
 
Система онлайн-мониторинга Liberty Grant
Система онлайн-мониторинга Liberty GrantСистема онлайн-мониторинга Liberty Grant
Система онлайн-мониторинга Liberty GrantLiberty Grant
 
Мониторинг розничной сети банка
Мониторинг розничной сети банкаМониторинг розничной сети банка
Мониторинг розничной сети банкаLiberty Grant
 
西藏10日游
西藏10日游西藏10日游
西藏10日游Open Party
 
Презентация лучше, чем документ
Презентация лучше, чем документПрезентация лучше, чем документ
Презентация лучше, чем документLiberty Grant
 
Liberty grant.Tariffbenchmarking
Liberty grant.TariffbenchmarkingLiberty grant.Tariffbenchmarking
Liberty grant.TariffbenchmarkingLiberty Grant
 
Liberty Grant Frameworks
Liberty Grant FrameworksLiberty Grant Frameworks
Liberty Grant FrameworksLiberty Grant
 
Liberty Grant.Collection
Liberty Grant.CollectionLiberty Grant.Collection
Liberty Grant.CollectionLiberty Grant
 

Andere mochten auch (18)

О компании Liberty Grant
О компании Liberty GrantО компании Liberty Grant
О компании Liberty Grant
 
Как защитить IT-бюджеты перед бизнесом
Как защитить IT-бюджеты перед бизнесомКак защитить IT-бюджеты перед бизнесом
Как защитить IT-бюджеты перед бизнесом
 
Liberty grant.Paymentsoptimization
Liberty grant.PaymentsoptimizationLiberty grant.Paymentsoptimization
Liberty grant.Paymentsoptimization
 
淘宝广告技术部开发流程和Scrum实践
淘宝广告技术部开发流程和Scrum实践淘宝广告技术部开发流程和Scrum实践
淘宝广告技术部开发流程和Scrum实践
 
Дэшборд для мониторинга платежей
Дэшборд для мониторинга платежейДэшборд для мониторинга платежей
Дэшборд для мониторинга платежей
 
Улучшение бизнес-процессов
Улучшение бизнес-процессовУлучшение бизнес-процессов
Улучшение бизнес-процессов
 
夸父通讯中间件
夸父通讯中间件夸父通讯中间件
夸父通讯中间件
 
Evolutionary db development
Evolutionary db development Evolutionary db development
Evolutionary db development
 
LibertyGrant.InetMobileBanking
LibertyGrant.InetMobileBankingLibertyGrant.InetMobileBanking
LibertyGrant.InetMobileBanking
 
Система онлайн-мониторинга Liberty Grant
Система онлайн-мониторинга Liberty GrantСистема онлайн-мониторинга Liberty Grant
Система онлайн-мониторинга Liberty Grant
 
Мониторинг розничной сети банка
Мониторинг розничной сети банкаМониторинг розничной сети банка
Мониторинг розничной сети банка
 
Revista dh-unjfsc
Revista dh-unjfscRevista dh-unjfsc
Revista dh-unjfsc
 
Очереди
ОчередиОчереди
Очереди
 
西藏10日游
西藏10日游西藏10日游
西藏10日游
 
Презентация лучше, чем документ
Презентация лучше, чем документПрезентация лучше, чем документ
Презентация лучше, чем документ
 
Liberty grant.Tariffbenchmarking
Liberty grant.TariffbenchmarkingLiberty grant.Tariffbenchmarking
Liberty grant.Tariffbenchmarking
 
Liberty Grant Frameworks
Liberty Grant FrameworksLiberty Grant Frameworks
Liberty Grant Frameworks
 
Liberty Grant.Collection
Liberty Grant.CollectionLiberty Grant.Collection
Liberty Grant.Collection
 

Ähnlich wie Hs java open_party

Strata Singapore: Gearpump Real time DAG-Processing with Akka at Scale
Strata Singapore: GearpumpReal time DAG-Processing with Akka at ScaleStrata Singapore: GearpumpReal time DAG-Processing with Akka at Scale
Strata Singapore: Gearpump Real time DAG-Processing with Akka at ScaleSean Zhong
 
Open HFT libraries in @Java
Open HFT libraries in @JavaOpen HFT libraries in @Java
Open HFT libraries in @JavaPeter Lawrey
 
Intro To .Net Threads
Intro To .Net ThreadsIntro To .Net Threads
Intro To .Net Threadsrchakra
 
Threads and multi threading
Threads and multi threadingThreads and multi threading
Threads and multi threadingAntonio Cesarano
 
Operating System Chapter 4 Multithreaded programming
Operating System Chapter 4 Multithreaded programmingOperating System Chapter 4 Multithreaded programming
Operating System Chapter 4 Multithreaded programmingguesta40f80
 
Porting a Streaming Pipeline from Scala to Rust
Porting a Streaming Pipeline from Scala to RustPorting a Streaming Pipeline from Scala to Rust
Porting a Streaming Pipeline from Scala to RustEvan Chan
 
Microservices with Micronaut
Microservices with MicronautMicroservices with Micronaut
Microservices with MicronautQAware GmbH
 
Best Practices for performance evaluation and diagnosis of Java Applications ...
Best Practices for performance evaluation and diagnosis of Java Applications ...Best Practices for performance evaluation and diagnosis of Java Applications ...
Best Practices for performance evaluation and diagnosis of Java Applications ...IndicThreads
 
onur-comparch-fall2018-lecture3b-memoryhierarchyandcaches-afterlecture.pptx
onur-comparch-fall2018-lecture3b-memoryhierarchyandcaches-afterlecture.pptxonur-comparch-fall2018-lecture3b-memoryhierarchyandcaches-afterlecture.pptx
onur-comparch-fall2018-lecture3b-memoryhierarchyandcaches-afterlecture.pptxsivasubramanianManic2
 
Icg hpc-user
Icg hpc-userIcg hpc-user
Icg hpc-usergdburton
 
Towards a Scalable Non-Blocking Coding Style
Towards a Scalable Non-Blocking Coding StyleTowards a Scalable Non-Blocking Coding Style
Towards a Scalable Non-Blocking Coding StyleAzul Systems Inc.
 
Here comes the Loom - Ya!vaConf.pdf
Here comes the Loom - Ya!vaConf.pdfHere comes the Loom - Ya!vaConf.pdf
Here comes the Loom - Ya!vaConf.pdfKrystian Zybała
 
Tempesta FW: a FrameWork and FireWall for HTTP DDoS mitigation and Web Applic...
Tempesta FW: a FrameWork and FireWall for HTTP DDoS mitigation and Web Applic...Tempesta FW: a FrameWork and FireWall for HTTP DDoS mitigation and Web Applic...
Tempesta FW: a FrameWork and FireWall for HTTP DDoS mitigation and Web Applic...Alexander Krizhanovsky
 
Introto netthreads-090906214344-phpapp01
Introto netthreads-090906214344-phpapp01Introto netthreads-090906214344-phpapp01
Introto netthreads-090906214344-phpapp01Aravindharamanan S
 
End to End Processing of 3.7 Million Telemetry Events per Second using Lambda...
End to End Processing of 3.7 Million Telemetry Events per Second using Lambda...End to End Processing of 3.7 Million Telemetry Events per Second using Lambda...
End to End Processing of 3.7 Million Telemetry Events per Second using Lambda...DataWorks Summit/Hadoop Summit
 

Ähnlich wie Hs java open_party (20)

Strata Singapore: Gearpump Real time DAG-Processing with Akka at Scale
Strata Singapore: GearpumpReal time DAG-Processing with Akka at ScaleStrata Singapore: GearpumpReal time DAG-Processing with Akka at Scale
Strata Singapore: Gearpump Real time DAG-Processing with Akka at Scale
 
Open HFT libraries in @Java
Open HFT libraries in @JavaOpen HFT libraries in @Java
Open HFT libraries in @Java
 
Intro To .Net Threads
Intro To .Net ThreadsIntro To .Net Threads
Intro To .Net Threads
 
Threads and multi threading
Threads and multi threadingThreads and multi threading
Threads and multi threading
 
L05 parallel
L05 parallelL05 parallel
L05 parallel
 
Java Memory Model
Java Memory ModelJava Memory Model
Java Memory Model
 
Operating System Chapter 4 Multithreaded programming
Operating System Chapter 4 Multithreaded programmingOperating System Chapter 4 Multithreaded programming
Operating System Chapter 4 Multithreaded programming
 
Porting a Streaming Pipeline from Scala to Rust
Porting a Streaming Pipeline from Scala to RustPorting a Streaming Pipeline from Scala to Rust
Porting a Streaming Pipeline from Scala to Rust
 
Data race
Data raceData race
Data race
 
Microservices with Micronaut
Microservices with MicronautMicroservices with Micronaut
Microservices with Micronaut
 
Best Practices for performance evaluation and diagnosis of Java Applications ...
Best Practices for performance evaluation and diagnosis of Java Applications ...Best Practices for performance evaluation and diagnosis of Java Applications ...
Best Practices for performance evaluation and diagnosis of Java Applications ...
 
Memory model
Memory modelMemory model
Memory model
 
onur-comparch-fall2018-lecture3b-memoryhierarchyandcaches-afterlecture.pptx
onur-comparch-fall2018-lecture3b-memoryhierarchyandcaches-afterlecture.pptxonur-comparch-fall2018-lecture3b-memoryhierarchyandcaches-afterlecture.pptx
onur-comparch-fall2018-lecture3b-memoryhierarchyandcaches-afterlecture.pptx
 
Os
OsOs
Os
 
Icg hpc-user
Icg hpc-userIcg hpc-user
Icg hpc-user
 
Towards a Scalable Non-Blocking Coding Style
Towards a Scalable Non-Blocking Coding StyleTowards a Scalable Non-Blocking Coding Style
Towards a Scalable Non-Blocking Coding Style
 
Here comes the Loom - Ya!vaConf.pdf
Here comes the Loom - Ya!vaConf.pdfHere comes the Loom - Ya!vaConf.pdf
Here comes the Loom - Ya!vaConf.pdf
 
Tempesta FW: a FrameWork and FireWall for HTTP DDoS mitigation and Web Applic...
Tempesta FW: a FrameWork and FireWall for HTTP DDoS mitigation and Web Applic...Tempesta FW: a FrameWork and FireWall for HTTP DDoS mitigation and Web Applic...
Tempesta FW: a FrameWork and FireWall for HTTP DDoS mitigation and Web Applic...
 
Introto netthreads-090906214344-phpapp01
Introto netthreads-090906214344-phpapp01Introto netthreads-090906214344-phpapp01
Introto netthreads-090906214344-phpapp01
 
End to End Processing of 3.7 Million Telemetry Events per Second using Lambda...
End to End Processing of 3.7 Million Telemetry Events per Second using Lambda...End to End Processing of 3.7 Million Telemetry Events per Second using Lambda...
End to End Processing of 3.7 Million Telemetry Events per Second using Lambda...
 

Mehr von Open Party

Sunshine library introduction
Sunshine library introductionSunshine library introduction
Sunshine library introductionOpen Party
 
食品安全与生态农业──小毛驴市民农园项目介绍
食品安全与生态农业──小毛驴市民农园项目介绍食品安全与生态农业──小毛驴市民农园项目介绍
食品安全与生态农业──小毛驴市民农园项目介绍Open Party
 
网站优化实践
网站优化实践网站优化实践
网站优化实践Open Party
 
Introduction to scientific visualization
Introduction to scientific visualizationIntroduction to scientific visualization
Introduction to scientific visualizationOpen Party
 
Applying BDD in refactoring
Applying BDD in refactoringApplying BDD in refactoring
Applying BDD in refactoringOpen Party
 
移动广告不是网盟
移动广告不是网盟移动广告不是网盟
移动广告不是网盟Open Party
 
Android 开源社区,10年后的再思考
Android 开源社区,10年后的再思考Android 开源社区,10年后的再思考
Android 开源社区,10年后的再思考Open Party
 
企业创业融资之路
企业创业融资之路企业创业融资之路
企业创业融资之路Open Party
 
Java mobile 移动应用开发
Java mobile 移动应用开发Java mobile 移动应用开发
Java mobile 移动应用开发Open Party
 
如何做演讲
如何做演讲如何做演讲
如何做演讲Open Party
 
Positive psychology
Positive psychologyPositive psychology
Positive psychologyOpen Party
 
价值驱动的组织转型-王晓明
价值驱动的组织转型-王晓明价值驱动的组织转型-王晓明
价值驱动的组织转型-王晓明Open Party
 
对云计算的理解
对云计算的理解对云计算的理解
对云计算的理解Open Party
 
Web前端标准在各浏览器中的实现差异
Web前端标准在各浏览器中的实现差异Web前端标准在各浏览器中的实现差异
Web前端标准在各浏览器中的实现差异Open Party
 

Mehr von Open Party (17)

Sunshine library introduction
Sunshine library introductionSunshine library introduction
Sunshine library introduction
 
食品安全与生态农业──小毛驴市民农园项目介绍
食品安全与生态农业──小毛驴市民农园项目介绍食品安全与生态农业──小毛驴市民农园项目介绍
食品安全与生态农业──小毛驴市民农园项目介绍
 
Cs open-party
Cs open-partyCs open-party
Cs open-party
 
网站优化实践
网站优化实践网站优化实践
网站优化实践
 
Introduction to scientific visualization
Introduction to scientific visualizationIntroduction to scientific visualization
Introduction to scientific visualization
 
Applying BDD in refactoring
Applying BDD in refactoringApplying BDD in refactoring
Applying BDD in refactoring
 
移动广告不是网盟
移动广告不是网盟移动广告不是网盟
移动广告不是网盟
 
Android 开源社区,10年后的再思考
Android 开源社区,10年后的再思考Android 开源社区,10年后的再思考
Android 开源社区,10年后的再思考
 
企业创业融资之路
企业创业融资之路企业创业融资之路
企业创业融资之路
 
Java mobile 移动应用开发
Java mobile 移动应用开发Java mobile 移动应用开发
Java mobile 移动应用开发
 
如何做演讲
如何做演讲如何做演讲
如何做演讲
 
爬虫点滴
爬虫点滴爬虫点滴
爬虫点滴
 
Positive psychology
Positive psychologyPositive psychology
Positive psychology
 
价值驱动的组织转型-王晓明
价值驱动的组织转型-王晓明价值驱动的组织转型-王晓明
价值驱动的组织转型-王晓明
 
对云计算的理解
对云计算的理解对云计算的理解
对云计算的理解
 
Web前端标准在各浏览器中的实现差异
Web前端标准在各浏览器中的实现差异Web前端标准在各浏览器中的实现差异
Web前端标准在各浏览器中的实现差异
 
Douban pulse
Douban pulseDouban pulse
Douban pulse
 

Hs java open_party

  • 1. Highly Scalable Java Programming for Multi-Core System Zhi Gan (ganzhi@gmail.com) IBM China Development Lab Next Generation Systems
  • 2.
  • 3. Continuing evolution of multicore Nehalem EX POWER 7 UltraSPARC T2 Varying trade-offs between thread speed & throughput Varying assumptions about memory footprint and working sets Max cores per chip 8 8 8 Max threads per core 2 4 8 Last level on-chip cache 24MB 32MB 4MB Memory controllers per chip 2 2 4 Max chips per system 8 32 4 Max system size (threads) 128 1,024 256
  • 4.
  • 5. NUMA is the new normal L3 cache L3 cache L3 cache L3 cache L1 & L2 Caches Ex Units Highest affinity between threads on a core Next highest affinity between cores on a chip Affinity between a chip and locally attached DRAM IBM Power 750 POWER 7 32 cores, 128 threads Note: Memory systems on all major platforms have similar hierarchical structure DIMM DIMM SN DIMM DIMM SN DIMM DIMM SN DIMM DIMM SN DIMM DIMM SN DIMM DIMM SN DIMM DIMM SN DIMM DIMM SN DIMM DIMM SN DIMM DIMM SN DIMM DIMM SN DIMM DIMM SN DIMM DIMM SN DIMM DIMM SN DIMM DIMM SN DIMM DIMM SN
  • 6. Balancing I/O and Server Capacity Ultra-dense DRAM (MAX5) Parallel disk array Very high speed random r/w Highest cost & power Limited capacity High speed sequential r/w Lowest cost per GB Virtually unlimited capacity (PBs) High speed random reads Lowest cost per IOPS High capacity (TBs) Enterprise NAND Flash
  • 7.
  • 9. The 1st Step: Profiling Parallel Application
  • 10.
  • 12.
  • 13. Multi-core SDK Dead Lock View Synchronization View
  • 14. Best Practice for High Scalable Java Programming
  • 15. What Is Lock Contention? From JLM tool website
  • 16.
  • 17.
  • 18. Results from JLM report Reduced AVER_HTM
  • 19.
  • 20. Result from JLM report Reduced lock tries
  • 21.
  • 22. Result from JLM report More locks with less AVER_HTM
  • 23.
  • 24.
  • 25.
  • 26.
  • 27.
  • 28.
  • 30.
  • 31. Why Lock-Free Often Means Better Scalability? (I) Lock:All threads wait for one Lock free: No wait, but only one can succeed, Other threads need retry
  • 32. Why Lock-Free Often Means Better Scalability? (II) Lock:All threads wait for one Lock free: No wait, but only one can succeed, Other threads often need to retry X X
  • 33. Performance of A Lock-Free Stack Picture from: http:// www.infoq.com /articles/scalable-java-components
  • 34. Performance of A Lock-Free HashMap Picture from: A Fast Lock-Free Hash Table by Cliff Click
  • 35.

Hinweis der Redaktion

  1. What if all previous best prestise cannot meet your need? You would like to optimize your application manually?
  2. msdk – This tool can be used to do detailed performance analysis of concurrent Java applications. It does an in-depth analysis of the complete execution stack, starting from the hardware to the application layer. Information is gathered from all four layers of the stack – hardware, operating system, jvm and application.
  3. `
  4. For multi-thread application, lock-free approach is different with lock-based approach in several aspects: When accessing shared resource, lock-based approach will only allow one thread to enter critical section and others will wait for it On the contrary, lock-free approach will all every thread to modify state of shared state. But one of the all threads can succeed, and all other threads will be aware of their action are failed so they will retry or choose other actions.
  5. The real difference occurs when something bad happens to the running thread. If a running thread is paused by OS scheduler, different thing will happen to the two approach: Lock-based approach: All other threads are waiting for this thread, and no one can make progress Lock-free approach: Other threads will be free to do any operations. And the paused thread might fail its current operation From this difference, we can found in multi-core environment, lock-free will have more advantage. It will have better scalability since threads don’t wait for each other. And it will waste some CPU cycles if contention. But this won’t be a problem for most cases since we have more than enough CPU resource 