SlideShare a Scribd company logo
1 of 69
Download to read offline
VisualWorks Object
Memory Management
      Andrés Valloud
Structure
Eden
SA
Eden
       SB
SA
Eden
       SB




Old
SA
Eden
       SB




Old




Perm
Evolution
Instance
creation
Scavenge 1
Scavenge 2
Scavenge 3
Scavenge 4
Tenured
IGC / GC
Perm save
Global GC




            R IP
But, speaking of GC...
SA
Eden
       SB




Old




Perm
Scavenge finds
                            SA
 live objects        Eden
                            SB
     faster




                RT   Old




                     Perm
Scavenge finds
                             SA
 live objects         Eden
                             SB
     faster




                RT    Old




IGC / GC find
                Old
 live objects         Perm
                RT
     faster
Responsibilities
SA
      Eden
             SB




RT    Old




Old
      Perm
RT
VM scavenges                SA
                     Eden
 new space                  SB




               RT    Old




               Old
                     Perm
               RT
VM scavenges                SA   VI must ensure
                     Eden
 new space                  SB      success




               RT    Old




               Old
                     Perm
               RT
VM scavenges                  SA   VI must ensure
                       Eden
 new space                    SB      success



VM signals low
  memory         RT    Old
 semaphore



                 Old
                       Perm
                 RT
VM scavenges                  SA   VI must ensure
                       Eden
 new space                    SB      success



VM signals low                     VI manages old
  memory         RT    Old           space (GC,
 semaphore                          grow, shrink)




                 Old
                       Perm
                 RT
VM scavenges                  SA   VI must ensure
                       Eden
 new space                    SB      success



VM signals low                     VI manages old
  memory         RT    Old           space (GC,
 semaphore                          grow, shrink)



  VM (few)       Old                VI memory
                       Perm        policy classes
 fixed actions    RT
Memory policies
Worst case                SA
                   Eden
scavenge                  SB




             RT    Old




             Old
                   Perm
             RT
Worst case                SA    Eden and
                   Eden
scavenge                  SB   SA or SB full




             RT    Old




             Old
                   Perm
             RT
Worst case                SA    Eden and
                   Eden
scavenge                  SB   SA or SB full




             RT    Old          RT grows




             Old
                   Perm
             RT
Worst case                SA    Eden and
                   Eden
scavenge                  SB   SA or SB full




             RT    Old          RT grows




             Old
                   Perm        Old RT grows
             RT
Worst case
                                SA    Eden and
   scavenge              Eden
                                SB   SA or SB full
  due to GC




     Stack         RT    Old          RT grows

Stack zone full,
   flushed to
object memory
                   Old
                         Perm        Old RT grows
                   RT
The picture
                       Worst Case
                       Scavenge

                               Upper
0                              Memory
                               Bound

             Growth
    Image             Emergency
             Regime
     Size             Threshold
             Bound
The picture
          Growth          Worst Case
        Increments        Scavenge

                                  Upper
0                                 Memory
                                  Bound

                Growth
    Image                Emergency
                Regime
     Size                Threshold
                Bound
Improvements since
  VisualWorks 7.7
Fixed since VW 7.7
ObjectMemory>>igcState
 ...
 aborting ifTrue: [^#aborting].
 ...



MemoryPolicy>>dealWithIGC
 ...
 memoryStatus igcState = #aborted
   ifTrue: [“recover from IGC abort”].
 ...
Fixed since VW 7.7
ObjectMemory>>igcState
 ...
 aborting ifTrue: [^#aborting].
 ...
                                      IGC does not
                                      recover from
                                     stack overflow
MemoryPolicy>>dealWithIGC
 ...
 memoryStatus igcState = #aborted
   ifTrue: [“recover from IGC abort”].
 ...
Fixed since VW 7.7

                        Worst Case
                        Scavenge

                                Upper
0                               Memory
                                Bound

          Growth
    Image                Emergency
          Regime
     Size                Threshold
          Bound
Fixed since VW 7.7
 IGC as last
resort, bogus
emergencies              Worst Case
                         Scavenge

                                 Upper
0                                Memory
                                 Bound

          Growth
    Image                 Emergency
          Regime
     Size                 Threshold
          Bound
Fixed since VW 7.7
VM crash due
 to scavenge
    failure             Worst Case
                        Scavenge

                                Upper
0                               Memory
                                Bound

          Growth
    Image                Emergency
          Regime
     Size                Threshold
          Bound
Fixed since VW 7.7
Too low for
  modern
applications            Worst Case
                        Scavenge

                                Upper
0                               Memory
                                Bound

          Growth
    Image                Emergency
          Regime
     Size                Threshold
          Bound
Fixed since VW 7.7

          Growth        Worst Case
        Increments      Scavenge

                                Upper
0                               Memory
                                Bound

          Growth
    Image                Emergency
          Regime
     Size                Threshold
          Bound
Fixed since VW 7.7
Tiny growth
 increment,
excessive GC            Worst Case
                        Scavenge

                                Upper
0                               Memory
                                Bound

          Growth
    Image                Emergency
          Regime
     Size                Threshold
          Bound
Fixed since VW 7.7
 Tiny growth
  increment,
fragmentation            Worst Case
                         Scavenge

                                 Upper
0                                Memory
                                 Bound

          Growth
    Image                 Emergency
          Regime
     Size                 Threshold
          Bound
Fixed since VW 7.7
   Low free
memory limit,
even more GC            Worst Case
                        Scavenge

                                Upper
0                               Memory
                                Bound

          Growth
    Image                Emergency
          Regime
     Size                Threshold
          Bound
New technology
E S T S
New technology
  T
E S T S
New technology
    T
•MemoryPolicyChecker
E S T S
New technology
    T
•MemoryPolicyChecker
•MemoryPolicyTuner
E S T S
New technology
     T
•MemoryPolicyChecker
•MemoryPolicyTuner
•MemoryPolicyStressTest
Before and after
Before
             Upper
0            Memory
             Bound


             Upper
0            Memory
             Bound


    After
Run time per stress test case, in seconds
40,000


30,000


20,000


10,000


    0
         A (x100) B (x100) C (x400)       D (x40)     E (x40)    F (x6)     G (x6)

         VW 7.7 legacy MemoryPolicy (with fixes)           ~1 day, if they work
         VW 7.7.1 without sizesAtStartup tuning           ~160 minutes
         VW 7.7.1 default                                 ~73 minutes



     A: pointer garbage      Segmented container         Large container
     B: byte garbage         D: byte allocation          F: byte allocation
     C: point creation       E: pointer allocation       G: pointer allocation
Print 2 web, ESUG 2009
Print 2 web, ESUG 2009




                   X
               2.5x faster
                (with small
               changes only)
VisualWorks 7.8
  and beyond
VisualWorks 7.8+

•Fixed space allocation fixed
•Improved weak / ephemeron support
•IGC performance improvements
•GC / IGC mark stack overflow prevention
•GC moves large objects back into large space
•New -m[1..7] VM switches
VisualWorks 7.8+

•Fixed space allocation fixed

                  N E
•Improved weak / ephemeron support

                O
        D
•IGC performance improvements
•GC / IGC mark stack overflow prevention
•GC moves large objects back into large space
•New -m[1..7] VM switches
VisualWorks 7.9
VisualWorks 7.9
•Up to 40% faster GC
VisualWorks 7.9
•Up to 40% faster GC
•Improved IGC uses less memory
VisualWorks 7.9
•Up to 40% faster GC
•Improved IGC uses less memory
•Adaptive time based memory policy IGC driver
VisualWorks 7.9
•Up to 40% faster GC
•Improved IGC uses less memory
•Adaptive time based memory policy IGC driver
•Memory policy IGC smart abort
VisualWorks 7.9
•Up to 40% faster GC
•Improved IGC uses less memory
•Adaptive time based memory policy IGC driver
•Memory policy IGC smart abort
•Memory policy IGC switch
VisualWorks 7.9
•Up to 40% faster GC
•Improved IGC uses less memory
•Adaptive time based memory policy IGC driver
•Memory policy IGC smart abort
•Memory policy IGC switch
•Updates to the OldRT, become:, fixed space...
VisualWorks 7.9
•Up to 40% faster GC


                 O N E
•Improved IGC uses less memory

         D
•Adaptive time based memory policy IGC driver
•Memory policy IGC smart abort
•Memory policy IGC switch
•Updates to the OldRT, become:, fixed space...
Questions?

More Related Content

More from ESUG

The Pharo Debugger and Debugging tools: Advances and Roadmap
The Pharo Debugger and Debugging tools: Advances and RoadmapThe Pharo Debugger and Debugging tools: Advances and Roadmap
The Pharo Debugger and Debugging tools: Advances and Roadmap
ESUG
 
Migration process from monolithic to micro frontend architecture in mobile ap...
Migration process from monolithic to micro frontend architecture in mobile ap...Migration process from monolithic to micro frontend architecture in mobile ap...
Migration process from monolithic to micro frontend architecture in mobile ap...
ESUG
 
Analyzing Dart Language with Pharo: Report and early results
Analyzing Dart Language with Pharo: Report and early resultsAnalyzing Dart Language with Pharo: Report and early results
Analyzing Dart Language with Pharo: Report and early results
ESUG
 
Transpiling Pharo Classes to JS ECMAScript 5 versus ECMAScript 6
Transpiling Pharo Classes to JS ECMAScript 5 versus ECMAScript 6Transpiling Pharo Classes to JS ECMAScript 5 versus ECMAScript 6
Transpiling Pharo Classes to JS ECMAScript 5 versus ECMAScript 6
ESUG
 
A Unit Test Metamodel for Test Generation
A Unit Test Metamodel for Test GenerationA Unit Test Metamodel for Test Generation
A Unit Test Metamodel for Test Generation
ESUG
 
Creating Unit Tests Using Genetic Programming
Creating Unit Tests Using Genetic ProgrammingCreating Unit Tests Using Genetic Programming
Creating Unit Tests Using Genetic Programming
ESUG
 
Threaded-Execution and CPS Provide Smooth Switching Between Execution Modes
Threaded-Execution and CPS Provide Smooth Switching Between Execution ModesThreaded-Execution and CPS Provide Smooth Switching Between Execution Modes
Threaded-Execution and CPS Provide Smooth Switching Between Execution Modes
ESUG
 
Exploring GitHub Actions through EGAD: An Experience Report
Exploring GitHub Actions through EGAD: An Experience ReportExploring GitHub Actions through EGAD: An Experience Report
Exploring GitHub Actions through EGAD: An Experience Report
ESUG
 
Pharo: a reflective language A first systematic analysis of reflective APIs
Pharo: a reflective language A first systematic analysis of reflective APIsPharo: a reflective language A first systematic analysis of reflective APIs
Pharo: a reflective language A first systematic analysis of reflective APIs
ESUG
 
Improving Performance Through Object Lifetime Profiling: the DataFrame Case
Improving Performance Through Object Lifetime Profiling: the DataFrame CaseImproving Performance Through Object Lifetime Profiling: the DataFrame Case
Improving Performance Through Object Lifetime Profiling: the DataFrame Case
ESUG
 
Pharo DataFrame: Past, Present, and Future
Pharo DataFrame: Past, Present, and FuturePharo DataFrame: Past, Present, and Future
Pharo DataFrame: Past, Present, and Future
ESUG
 
A New Architecture Reconciling Refactorings and Transformations
A New Architecture Reconciling Refactorings and TransformationsA New Architecture Reconciling Refactorings and Transformations
A New Architecture Reconciling Refactorings and Transformations
ESUG
 

More from ESUG (20)

Technical documentation support in Pharo
Technical documentation support in PharoTechnical documentation support in Pharo
Technical documentation support in Pharo
 
The Pharo Debugger and Debugging tools: Advances and Roadmap
The Pharo Debugger and Debugging tools: Advances and RoadmapThe Pharo Debugger and Debugging tools: Advances and Roadmap
The Pharo Debugger and Debugging tools: Advances and Roadmap
 
Sequence: Pipeline modelling in Pharo
Sequence: Pipeline modelling in PharoSequence: Pipeline modelling in Pharo
Sequence: Pipeline modelling in Pharo
 
Migration process from monolithic to micro frontend architecture in mobile ap...
Migration process from monolithic to micro frontend architecture in mobile ap...Migration process from monolithic to micro frontend architecture in mobile ap...
Migration process from monolithic to micro frontend architecture in mobile ap...
 
Analyzing Dart Language with Pharo: Report and early results
Analyzing Dart Language with Pharo: Report and early resultsAnalyzing Dart Language with Pharo: Report and early results
Analyzing Dart Language with Pharo: Report and early results
 
Transpiling Pharo Classes to JS ECMAScript 5 versus ECMAScript 6
Transpiling Pharo Classes to JS ECMAScript 5 versus ECMAScript 6Transpiling Pharo Classes to JS ECMAScript 5 versus ECMAScript 6
Transpiling Pharo Classes to JS ECMAScript 5 versus ECMAScript 6
 
A Unit Test Metamodel for Test Generation
A Unit Test Metamodel for Test GenerationA Unit Test Metamodel for Test Generation
A Unit Test Metamodel for Test Generation
 
Creating Unit Tests Using Genetic Programming
Creating Unit Tests Using Genetic ProgrammingCreating Unit Tests Using Genetic Programming
Creating Unit Tests Using Genetic Programming
 
Threaded-Execution and CPS Provide Smooth Switching Between Execution Modes
Threaded-Execution and CPS Provide Smooth Switching Between Execution ModesThreaded-Execution and CPS Provide Smooth Switching Between Execution Modes
Threaded-Execution and CPS Provide Smooth Switching Between Execution Modes
 
Exploring GitHub Actions through EGAD: An Experience Report
Exploring GitHub Actions through EGAD: An Experience ReportExploring GitHub Actions through EGAD: An Experience Report
Exploring GitHub Actions through EGAD: An Experience Report
 
Pharo: a reflective language A first systematic analysis of reflective APIs
Pharo: a reflective language A first systematic analysis of reflective APIsPharo: a reflective language A first systematic analysis of reflective APIs
Pharo: a reflective language A first systematic analysis of reflective APIs
 
Garbage Collector Tuning
Garbage Collector TuningGarbage Collector Tuning
Garbage Collector Tuning
 
Improving Performance Through Object Lifetime Profiling: the DataFrame Case
Improving Performance Through Object Lifetime Profiling: the DataFrame CaseImproving Performance Through Object Lifetime Profiling: the DataFrame Case
Improving Performance Through Object Lifetime Profiling: the DataFrame Case
 
Pharo DataFrame: Past, Present, and Future
Pharo DataFrame: Past, Present, and FuturePharo DataFrame: Past, Present, and Future
Pharo DataFrame: Past, Present, and Future
 
thisContext in the Debugger
thisContext in the DebuggerthisContext in the Debugger
thisContext in the Debugger
 
Websockets for Fencing Score
Websockets for Fencing ScoreWebsockets for Fencing Score
Websockets for Fencing Score
 
ShowUs: PharoJS.org Develop in Pharo, Run on JavaScript
ShowUs: PharoJS.org Develop in Pharo, Run on JavaScriptShowUs: PharoJS.org Develop in Pharo, Run on JavaScript
ShowUs: PharoJS.org Develop in Pharo, Run on JavaScript
 
Advanced Object- Oriented Design Mooc
Advanced Object- Oriented Design MoocAdvanced Object- Oriented Design Mooc
Advanced Object- Oriented Design Mooc
 
A New Architecture Reconciling Refactorings and Transformations
A New Architecture Reconciling Refactorings and TransformationsA New Architecture Reconciling Refactorings and Transformations
A New Architecture Reconciling Refactorings and Transformations
 
BioSmalltalk
BioSmalltalkBioSmalltalk
BioSmalltalk
 

Recently uploaded

Beautiful 😋 Call girls in Lahore 03210033448
Beautiful 😋 Call girls in Lahore 03210033448Beautiful 😋 Call girls in Lahore 03210033448
Beautiful 😋 Call girls in Lahore 03210033448
ont65320
 
Navsari Escorts Service ☎️ 6378878445 ( Sakshi Sinha ) High Profile Call Girl...
Navsari Escorts Service ☎️ 6378878445 ( Sakshi Sinha ) High Profile Call Girl...Navsari Escorts Service ☎️ 6378878445 ( Sakshi Sinha ) High Profile Call Girl...
Navsari Escorts Service ☎️ 6378878445 ( Sakshi Sinha ) High Profile Call Girl...
mriyagarg453
 
Goa Call Girls 9316020077 Call Girls In Goa By Russian Call Girl in goa
Goa Call Girls 9316020077 Call Girls  In Goa By Russian Call Girl in goaGoa Call Girls 9316020077 Call Girls  In Goa By Russian Call Girl in goa
Goa Call Girls 9316020077 Call Girls In Goa By Russian Call Girl in goa
russian goa call girl and escorts service
 
Call Girls Agency In Goa 💚 9316020077 💚 Call Girl Goa By Russian Call Girl ...
Call Girls  Agency In Goa  💚 9316020077 💚 Call Girl Goa By Russian Call Girl ...Call Girls  Agency In Goa  💚 9316020077 💚 Call Girl Goa By Russian Call Girl ...
Call Girls Agency In Goa 💚 9316020077 💚 Call Girl Goa By Russian Call Girl ...
russian goa call girl and escorts service
 

Recently uploaded (20)

📞 Contact Number 8617697112 VIP Ganderbal Call Girls
📞 Contact Number 8617697112 VIP Ganderbal Call Girls📞 Contact Number 8617697112 VIP Ganderbal Call Girls
📞 Contact Number 8617697112 VIP Ganderbal Call Girls
 
Verified Trusted Call Girls Tambaram Chennai ✔✔7427069034 Independent Chenna...
Verified Trusted Call Girls Tambaram Chennai ✔✔7427069034  Independent Chenna...Verified Trusted Call Girls Tambaram Chennai ✔✔7427069034  Independent Chenna...
Verified Trusted Call Girls Tambaram Chennai ✔✔7427069034 Independent Chenna...
 
Hotel And Home Service Available Kolkata Call Girls Lake Town ✔ 6297143586 ✔C...
Hotel And Home Service Available Kolkata Call Girls Lake Town ✔ 6297143586 ✔C...Hotel And Home Service Available Kolkata Call Girls Lake Town ✔ 6297143586 ✔C...
Hotel And Home Service Available Kolkata Call Girls Lake Town ✔ 6297143586 ✔C...
 
Verified Trusted Call Girls Ambattur Chennai ✔✔7427069034 Independent Chenna...
Verified Trusted Call Girls Ambattur Chennai ✔✔7427069034  Independent Chenna...Verified Trusted Call Girls Ambattur Chennai ✔✔7427069034  Independent Chenna...
Verified Trusted Call Girls Ambattur Chennai ✔✔7427069034 Independent Chenna...
 
Model Call Girls In Pazhavanthangal WhatsApp Booking 7427069034 call girl ser...
Model Call Girls In Pazhavanthangal WhatsApp Booking 7427069034 call girl ser...Model Call Girls In Pazhavanthangal WhatsApp Booking 7427069034 call girl ser...
Model Call Girls In Pazhavanthangal WhatsApp Booking 7427069034 call girl ser...
 
Model Call Girls In Velappanchavadi WhatsApp Booking 7427069034 call girl ser...
Model Call Girls In Velappanchavadi WhatsApp Booking 7427069034 call girl ser...Model Call Girls In Velappanchavadi WhatsApp Booking 7427069034 call girl ser...
Model Call Girls In Velappanchavadi WhatsApp Booking 7427069034 call girl ser...
 
Behala ( Call Girls ) Kolkata ✔ 6297143586 ✔ Hot Model With Sexy Bhabi Ready ...
Behala ( Call Girls ) Kolkata ✔ 6297143586 ✔ Hot Model With Sexy Bhabi Ready ...Behala ( Call Girls ) Kolkata ✔ 6297143586 ✔ Hot Model With Sexy Bhabi Ready ...
Behala ( Call Girls ) Kolkata ✔ 6297143586 ✔ Hot Model With Sexy Bhabi Ready ...
 
Top Rated Pune Call Girls Pimpri Chinchwad ⟟ 6297143586 ⟟ Call Me For Genuin...
Top Rated  Pune Call Girls Pimpri Chinchwad ⟟ 6297143586 ⟟ Call Me For Genuin...Top Rated  Pune Call Girls Pimpri Chinchwad ⟟ 6297143586 ⟟ Call Me For Genuin...
Top Rated Pune Call Girls Pimpri Chinchwad ⟟ 6297143586 ⟟ Call Me For Genuin...
 
2k Shot Call girls Laxmi Nagar Delhi 9205541914
2k Shot Call girls Laxmi Nagar Delhi 92055419142k Shot Call girls Laxmi Nagar Delhi 9205541914
2k Shot Call girls Laxmi Nagar Delhi 9205541914
 
Bhimtal ❤CALL GIRL 8617697112 ❤CALL GIRLS IN Bhimtal ESCORT SERVICE❤CALL GIRL
Bhimtal ❤CALL GIRL 8617697112 ❤CALL GIRLS IN Bhimtal ESCORT SERVICE❤CALL GIRLBhimtal ❤CALL GIRL 8617697112 ❤CALL GIRLS IN Bhimtal ESCORT SERVICE❤CALL GIRL
Bhimtal ❤CALL GIRL 8617697112 ❤CALL GIRLS IN Bhimtal ESCORT SERVICE❤CALL GIRL
 
𓀤Call On 6297143586 𓀤 Park Street Call Girls In All Kolkata 24/7 Provide Call...
𓀤Call On 6297143586 𓀤 Park Street Call Girls In All Kolkata 24/7 Provide Call...𓀤Call On 6297143586 𓀤 Park Street Call Girls In All Kolkata 24/7 Provide Call...
𓀤Call On 6297143586 𓀤 Park Street Call Girls In All Kolkata 24/7 Provide Call...
 
Beautiful 😋 Call girls in Lahore 03210033448
Beautiful 😋 Call girls in Lahore 03210033448Beautiful 😋 Call girls in Lahore 03210033448
Beautiful 😋 Call girls in Lahore 03210033448
 
Navsari Escorts Service ☎️ 6378878445 ( Sakshi Sinha ) High Profile Call Girl...
Navsari Escorts Service ☎️ 6378878445 ( Sakshi Sinha ) High Profile Call Girl...Navsari Escorts Service ☎️ 6378878445 ( Sakshi Sinha ) High Profile Call Girl...
Navsari Escorts Service ☎️ 6378878445 ( Sakshi Sinha ) High Profile Call Girl...
 
Top Rated Kolkata Call Girls Dum Dum ⟟ 6297143586 ⟟ Call Me For Genuine Sex S...
Top Rated Kolkata Call Girls Dum Dum ⟟ 6297143586 ⟟ Call Me For Genuine Sex S...Top Rated Kolkata Call Girls Dum Dum ⟟ 6297143586 ⟟ Call Me For Genuine Sex S...
Top Rated Kolkata Call Girls Dum Dum ⟟ 6297143586 ⟟ Call Me For Genuine Sex S...
 
Independent Sonagachi Escorts ✔ 9332606886✔ Full Night With Room Online Booki...
Independent Sonagachi Escorts ✔ 9332606886✔ Full Night With Room Online Booki...Independent Sonagachi Escorts ✔ 9332606886✔ Full Night With Room Online Booki...
Independent Sonagachi Escorts ✔ 9332606886✔ Full Night With Room Online Booki...
 
Hotel And Home Service Available Kolkata Call Girls Howrah ✔ 6297143586 ✔Call...
Hotel And Home Service Available Kolkata Call Girls Howrah ✔ 6297143586 ✔Call...Hotel And Home Service Available Kolkata Call Girls Howrah ✔ 6297143586 ✔Call...
Hotel And Home Service Available Kolkata Call Girls Howrah ✔ 6297143586 ✔Call...
 
Goa Call Girls 9316020077 Call Girls In Goa By Russian Call Girl in goa
Goa Call Girls 9316020077 Call Girls  In Goa By Russian Call Girl in goaGoa Call Girls 9316020077 Call Girls  In Goa By Russian Call Girl in goa
Goa Call Girls 9316020077 Call Girls In Goa By Russian Call Girl in goa
 
Independent Garulia Escorts ✔ 9332606886✔ Full Night With Room Online Booking...
Independent Garulia Escorts ✔ 9332606886✔ Full Night With Room Online Booking...Independent Garulia Escorts ✔ 9332606886✔ Full Night With Room Online Booking...
Independent Garulia Escorts ✔ 9332606886✔ Full Night With Room Online Booking...
 
𓀤Call On 6297143586 𓀤 Ultadanga Call Girls In All Kolkata 24/7 Provide Call W...
𓀤Call On 6297143586 𓀤 Ultadanga Call Girls In All Kolkata 24/7 Provide Call W...𓀤Call On 6297143586 𓀤 Ultadanga Call Girls In All Kolkata 24/7 Provide Call W...
𓀤Call On 6297143586 𓀤 Ultadanga Call Girls In All Kolkata 24/7 Provide Call W...
 
Call Girls Agency In Goa 💚 9316020077 💚 Call Girl Goa By Russian Call Girl ...
Call Girls  Agency In Goa  💚 9316020077 💚 Call Girl Goa By Russian Call Girl ...Call Girls  Agency In Goa  💚 9316020077 💚 Call Girl Goa By Russian Call Girl ...
Call Girls Agency In Goa 💚 9316020077 💚 Call Girl Goa By Russian Call Girl ...
 

VW Object Memory Management

  • 4. SA Eden SB
  • 5. SA Eden SB Old
  • 6. SA Eden SB Old Perm
  • 16. Global GC R IP
  • 18. SA Eden SB Old Perm
  • 19. Scavenge finds SA live objects Eden SB faster RT Old Perm
  • 20. Scavenge finds SA live objects Eden SB faster RT Old IGC / GC find Old live objects Perm RT faster
  • 22. SA Eden SB RT Old Old Perm RT
  • 23. VM scavenges SA Eden new space SB RT Old Old Perm RT
  • 24. VM scavenges SA VI must ensure Eden new space SB success RT Old Old Perm RT
  • 25. VM scavenges SA VI must ensure Eden new space SB success VM signals low memory RT Old semaphore Old Perm RT
  • 26. VM scavenges SA VI must ensure Eden new space SB success VM signals low VI manages old memory RT Old space (GC, semaphore grow, shrink) Old Perm RT
  • 27. VM scavenges SA VI must ensure Eden new space SB success VM signals low VI manages old memory RT Old space (GC, semaphore grow, shrink) VM (few) Old VI memory Perm policy classes fixed actions RT
  • 29. Worst case SA Eden scavenge SB RT Old Old Perm RT
  • 30. Worst case SA Eden and Eden scavenge SB SA or SB full RT Old Old Perm RT
  • 31. Worst case SA Eden and Eden scavenge SB SA or SB full RT Old RT grows Old Perm RT
  • 32. Worst case SA Eden and Eden scavenge SB SA or SB full RT Old RT grows Old Perm Old RT grows RT
  • 33. Worst case SA Eden and scavenge Eden SB SA or SB full due to GC Stack RT Old RT grows Stack zone full, flushed to object memory Old Perm Old RT grows RT
  • 34. The picture Worst Case Scavenge Upper 0 Memory Bound Growth Image Emergency Regime Size Threshold Bound
  • 35. The picture Growth Worst Case Increments Scavenge Upper 0 Memory Bound Growth Image Emergency Regime Size Threshold Bound
  • 36. Improvements since VisualWorks 7.7
  • 37. Fixed since VW 7.7 ObjectMemory>>igcState ... aborting ifTrue: [^#aborting]. ... MemoryPolicy>>dealWithIGC ... memoryStatus igcState = #aborted ifTrue: [“recover from IGC abort”]. ...
  • 38. Fixed since VW 7.7 ObjectMemory>>igcState ... aborting ifTrue: [^#aborting]. ... IGC does not recover from stack overflow MemoryPolicy>>dealWithIGC ... memoryStatus igcState = #aborted ifTrue: [“recover from IGC abort”]. ...
  • 39. Fixed since VW 7.7 Worst Case Scavenge Upper 0 Memory Bound Growth Image Emergency Regime Size Threshold Bound
  • 40. Fixed since VW 7.7 IGC as last resort, bogus emergencies Worst Case Scavenge Upper 0 Memory Bound Growth Image Emergency Regime Size Threshold Bound
  • 41. Fixed since VW 7.7 VM crash due to scavenge failure Worst Case Scavenge Upper 0 Memory Bound Growth Image Emergency Regime Size Threshold Bound
  • 42. Fixed since VW 7.7 Too low for modern applications Worst Case Scavenge Upper 0 Memory Bound Growth Image Emergency Regime Size Threshold Bound
  • 43. Fixed since VW 7.7 Growth Worst Case Increments Scavenge Upper 0 Memory Bound Growth Image Emergency Regime Size Threshold Bound
  • 44. Fixed since VW 7.7 Tiny growth increment, excessive GC Worst Case Scavenge Upper 0 Memory Bound Growth Image Emergency Regime Size Threshold Bound
  • 45. Fixed since VW 7.7 Tiny growth increment, fragmentation Worst Case Scavenge Upper 0 Memory Bound Growth Image Emergency Regime Size Threshold Bound
  • 46. Fixed since VW 7.7 Low free memory limit, even more GC Worst Case Scavenge Upper 0 Memory Bound Growth Image Emergency Regime Size Threshold Bound
  • 48. E S T S New technology T
  • 49. E S T S New technology T •MemoryPolicyChecker
  • 50. E S T S New technology T •MemoryPolicyChecker •MemoryPolicyTuner
  • 51. E S T S New technology T •MemoryPolicyChecker •MemoryPolicyTuner •MemoryPolicyStressTest
  • 52.
  • 54. Before Upper 0 Memory Bound Upper 0 Memory Bound After
  • 55. Run time per stress test case, in seconds 40,000 30,000 20,000 10,000 0 A (x100) B (x100) C (x400) D (x40) E (x40) F (x6) G (x6) VW 7.7 legacy MemoryPolicy (with fixes) ~1 day, if they work VW 7.7.1 without sizesAtStartup tuning ~160 minutes VW 7.7.1 default ~73 minutes A: pointer garbage Segmented container Large container B: byte garbage D: byte allocation F: byte allocation C: point creation E: pointer allocation G: pointer allocation
  • 56. Print 2 web, ESUG 2009
  • 57. Print 2 web, ESUG 2009 X 2.5x faster (with small changes only)
  • 58. VisualWorks 7.8 and beyond
  • 59. VisualWorks 7.8+ •Fixed space allocation fixed •Improved weak / ephemeron support •IGC performance improvements •GC / IGC mark stack overflow prevention •GC moves large objects back into large space •New -m[1..7] VM switches
  • 60. VisualWorks 7.8+ •Fixed space allocation fixed N E •Improved weak / ephemeron support O D •IGC performance improvements •GC / IGC mark stack overflow prevention •GC moves large objects back into large space •New -m[1..7] VM switches
  • 62. VisualWorks 7.9 •Up to 40% faster GC
  • 63. VisualWorks 7.9 •Up to 40% faster GC •Improved IGC uses less memory
  • 64. VisualWorks 7.9 •Up to 40% faster GC •Improved IGC uses less memory •Adaptive time based memory policy IGC driver
  • 65. VisualWorks 7.9 •Up to 40% faster GC •Improved IGC uses less memory •Adaptive time based memory policy IGC driver •Memory policy IGC smart abort
  • 66. VisualWorks 7.9 •Up to 40% faster GC •Improved IGC uses less memory •Adaptive time based memory policy IGC driver •Memory policy IGC smart abort •Memory policy IGC switch
  • 67. VisualWorks 7.9 •Up to 40% faster GC •Improved IGC uses less memory •Adaptive time based memory policy IGC driver •Memory policy IGC smart abort •Memory policy IGC switch •Updates to the OldRT, become:, fixed space...
  • 68. VisualWorks 7.9 •Up to 40% faster GC O N E •Improved IGC uses less memory D •Adaptive time based memory policy IGC driver •Memory policy IGC smart abort •Memory policy IGC switch •Updates to the OldRT, become:, fixed space...