SlideShare a Scribd company logo
1 of 208
Download to read offline
Parallel worlds of
                     CRuby's GC
                                 nari/Narihiro Nakamura/
                                                @nari_en
                                Network Applied Communication
                                                Laboratory Ltd.
Parallel worlds of CRuby's GC                            Powered by Rabbit 0.9.3
I'm very happy now.
Today is my first
presentation in English.
My English is not good.
But, I'll do my best.
Please bear with me :)
Self introduction
Ice-cream factory

         ✓ I worked in an assembly line
         ✓ For example, I made many
           cardboard boxes.
                  ✓ I was a professional cardboard box
                    maker :)

                                                                  8/207
Parallel worlds of CRuby's GC                            Powered by Rabbit 0.9.3
Ice-cream factory


         ✓ I made 150 boxes per hour
           (ZOMG)



                                                             9/207
Parallel worlds of CRuby's GC                       Powered by Rabbit 0.9.3
I was like a machine!!
           http://www.flickr.com/photos/kevincollins123/5887984753/
Working with Java

         ✓ I worked in a big company.
         ✓ This work was similar to
           assembly line work..
                  ✓ I made a part of a product. I didn't
                    understand whole product.

                                                                  13/207
Parallel worlds of CRuby's GC                              Powered by Rabbit 0.9.3
I was still like a
     machine!!
     http://www.flickr.com/photos/kevincollins123/5887984753/
My current work

         ✓ Currently, I work at NaCl.
         ✓ matz and shyouhei and takaokouji
           are my co-workers.
         ✓ shugo is my boss.
                  ✓ They are CRuby committers.

                                                         17/207
Parallel worlds of CRuby's GC                     Powered by Rabbit 0.9.3
When I started Ruby
                           programming

         ✓ I felt free.
         ✓ This work wasn't similar to
           assembly line work.
                  ✓ I could make the whole product.

                                                             18/207
Parallel worlds of CRuby's GC                         Powered by Rabbit 0.9.3
I was no longer
   a machine!!




      http://www.flickr.com/photos/danzden/121379782/
Garbage Collection for me
         ✓ GC technology is very interesting
           for me.
         ✓ GC is a garbage collecting
           machine.
         ✓ I've been creating it since then.
           It's very fun!!
                                                      21/207
Parallel worlds of CRuby's GC                  Powered by Rabbit 0.9.3
I'm making a machine!!
My relationship to GC
I'm a CRuby Committer



         ✓ I work on GC.



                                           24/207
Parallel worlds of CRuby's GC       Powered by Rabbit 0.9.3
And, I wrote a
book about GC.
But, it's only in Japanese :(
And, I've been creating
   GC with RDD.
What is RDD?
RDD = RubyKaigi Driven
     Development
My RDD history

         ✓ LazySweepGC - RubyKaigi2008
         ✓ LonglifeGC - 2009
         ✓ LazySweepGC - 2010
         ✓ ParallelMarkingGC - 2011

                                                        30/207
Parallel worlds of CRuby's GC                    Powered by Rabbit 0.9.3
My RDD history

         ✓ LazySweepGC - RubyKaigi2008
         ✓ LonglifeGC - 2009
         ✓ LazySweepGC - 2010
         ✓ ParallelMarkingGC - 2011

                                                        31/207
Parallel worlds of CRuby's GC                    Powered by Rabbit 0.9.3
LonglifeGC
         ✓ It treats long-life objects as a
           special case.
                  ✓ similar to Generational GC.

         ✓ LonglifeGC was rejected in
           CRuby 1.9.2 by some reason.
                  ✓ :'(
                                                         32/207
Parallel worlds of CRuby's GC                     Powered by Rabbit 0.9.3
But, LonglifeGC has
                been
      used in Kiji :-)



            http://www.flickr.com/photos/conifer/2389654222/
Kiji

         ✓ Kiji is an optimized version of
           REE by Twitter developers.
         ✓ The twitter team substantially
           extended LonglifeGC.
                  ✓ It's cool!!

                                                    34/207
Parallel worlds of CRuby's GC                Powered by Rabbit 0.9.3
But, Kiji will be rejected also... :'(
My RDD history

         ✓ LazySweepGC - RubyKaigi2008
         ✓ LonglifeGC - 2009
         ✓ LazySweepGC - 2010
         ✓ ParallelMarkingGC - 2011

                                                        36/207
Parallel worlds of CRuby's GC                    Powered by Rabbit 0.9.3
LazySweepGC
         ✓ Traditional M&S GC executes
           mark and sweep atomically.
                  ✓ Ruby application stops during GC
                    (stop-the-world).

         ✓ In Lazy sweeping, sweeping is
           lazy.
                                                              37/207
Parallel worlds of CRuby's GC                          Powered by Rabbit 0.9.3
LazySweepGC


         ✓ Each invocation of the object
           allocation sweeps Ruby's heap
                  ✓ until it finds an appropriate free object.



                                                                 38/207
Parallel worlds of CRuby's GC                             Powered by Rabbit 0.9.3
Improvements

         ✓ This improves the response time
           of GC
         ✓ I.e. the worst case time of GC
           decreases.

                                                      39/207
Parallel worlds of CRuby's GC                  Powered by Rabbit 0.9.3
LazySweepGC


         ✓ You can use LazySweepGC since
           Ruby 1.9.3



                                                     40/207
Parallel worlds of CRuby's GC                 Powered by Rabbit 0.9.3
My RDD history

         ✓ LazySweepGC - RubyKaigi2008
         ✓ LonglifeGC - 2009
         ✓ LazySweepGC - 2010
         ✓ ParallelMarkingGC - 2011

                                                        41/207
Parallel worlds of CRuby's GC                    Powered by Rabbit 0.9.3
Today's topics
Today's topics
         ✓ Why do we need Parallel
           Marking?
         ✓ What to consider?
         ✓ How to implement?
         ✓ How much did performance
           improve?
                                                        43/207
Parallel worlds of CRuby's GC                    Powered by Rabbit 0.9.3
Today's topics
         ✓ Why do we need Parallel
           Marking?
         ✓ What to consider?
         ✓ How to implement?
         ✓ How much did performance
           improve?
                                                        44/207
Parallel worlds of CRuby's GC                    Powered by Rabbit 0.9.3
Why do we need Parallel
      Marking?
This is CRuby's
   current GC.
Current CRuby's GC


         ✓ GC operates on only 1 core.
         ✓ In multi-core environment, other
           cores don't help GC.


                                                    47/207
Parallel worlds of CRuby's GC                Powered by Rabbit 0.9.3
GC:"I'm alone,
    it's so hard."



                     http://www.flickr.com/photos/hortont/2698261070/
We should run GC in
           parallel!!
           http://www.flickr.com/photos/knallaerbse/2863161933/
First, Let me explain a
few GC related concepts.
What is GC?



         ✓ GC collects all dead objects.



                                                     51/207
Parallel worlds of CRuby's GC                 Powered by Rabbit 0.9.3
What is a dead object?

         ✓ A dead object is an object that is
           never referenced by the program.
         ✓ In GC terms, we say a that dead
           object is unreachable from Roots.

                                                  52/207
Parallel worlds of CRuby's GC              Powered by Rabbit 0.9.3
What is Roots?


         ✓ Roots is a set of pointers that
           directly reference objects in the
           program.
                  ✓ e.g. Ruby's local variables, etc..


                                                                53/207
Parallel worlds of CRuby's GC                            Powered by Rabbit 0.9.3
For example




                                                     54/207
Parallel worlds of CRuby's GC                 Powered by Rabbit 0.9.3
Please remember that


         ✓ GC collects objects that are
           unreachable from Roots.



                                                      55/207
Parallel worlds of CRuby's GC                  Powered by Rabbit 0.9.3
Next, Let me explain the
  current CRuby GC
       algorithm.
CRuby's GC algorithm
                         summary

         ✓ CRuby adopts the Mark & Sweep
           algorithm
         ✓ Collector works in separate Mark
           and Sweep phases.

                                                57/207
Parallel worlds of CRuby's GC            Powered by Rabbit 0.9.3
In the Mark phase


         ✓ collector marks live objects that
           are reachable from Roots.



                                                           58/207
Parallel worlds of CRuby's GC                       Powered by Rabbit 0.9.3
For example




                                                     59/207
Parallel worlds of CRuby's GC                 Powered by Rabbit 0.9.3
Mark phase with GC.start




                                          60/207
Parallel worlds of CRuby's GC      Powered by Rabbit 0.9.3
Ruby Heap after marking




                                          61/207
Parallel worlds of CRuby's GC      Powered by Rabbit 0.9.3
In the Sweep phase


         ✓ collector sweeps "dead" objects
                  ✓ "dead" means unmarked
                  ✓ "dead" means unreachable from Roots



                                                            62/207
Parallel worlds of CRuby's GC                        Powered by Rabbit 0.9.3
Sweep phase




                                                     63/207
Parallel worlds of CRuby's GC                 Powered by Rabbit 0.9.3
Characteristics of
  CRuby's GC
Characteristics


         ✓ The stop-the-world algorithm
         ✓ Single thread execution


                                                         65/207
Parallel worlds of CRuby's GC                     Powered by Rabbit 0.9.3
Recently, PC has multi-core
               processors. But,

         ✓ GC executes on a single thread.
         ✓ Other cores don't work during GC.
         ✓ What a waste!!

                                                66/207
Parallel worlds of CRuby's GC            Powered by Rabbit 0.9.3
How can we fix this?
Use
Parallel Marking,
Luke
What is Parallel Marking?
What is Parallel Marking?

         ✓ Collector run several marking
           processes in parallel
                  ✓ by using native threads.

         ✓ We will be happy on multi-core
           machine.

                                                      70/207
Parallel worlds of CRuby's GC                  Powered by Rabbit 0.9.3
Flow diagram for Parallel
                      Marking




                                            71/207
Parallel worlds of CRuby's GC        Powered by Rabbit 0.9.3
BTW:
  Why not perform
sweeping in parallel?
Why not perform sweeping in
              parallel
         ✓ The sweeping is much faster than
           the marking.
                  ✓ You can see ko1's research
                  ✓ <URL:http://www.atdot.net/~ko1/
                    diary/201011.html#d4>

                                                             73/207
Parallel worlds of CRuby's GC                         Powered by Rabbit 0.9.3
Why not perform sweeping in
              parallel

         ✓ So, Mark phase improvement =
           GC improvement
         ✓ And, we already have the lazy
           sweeping.

                                                  74/207
Parallel worlds of CRuby's GC              Powered by Rabbit 0.9.3
Today's topics
         ✓ Why do we need Parallel
           Marking?
         ✓ What to consider?
         ✓ How to implement?
         ✓ How much did performance
           improve?
                                                        75/207
Parallel worlds of CRuby's GC                    Powered by Rabbit 0.9.3
What to consider when
implementing Parallel
     Marking?
We should consider two
                         problems


         ✓ Workload balancing
         ✓ Wait-free algorithm


                                               77/207
Parallel worlds of CRuby's GC           Powered by Rabbit 0.9.3
Workload balancing
How can we divide the
marking task into sub-
       tasks?
I tried think about a
  simple approach.
1 branch of Roots is
marked by 1 thread.
This means..

         ✓ Tasks are distributed to multiple
           threads.
         ✓ The task of marking the entire
           heap is divided into several tasks,
           each marking a single branch.

                                                      84/207
Parallel worlds of CRuby's GC                  Powered by Rabbit 0.9.3
This seems to be no
     problem.
But actually, this solution
suffers from the workload
         problem.
Each thread doesn't know what the other
           threads are doing.
For instance, if A and B finishes work
                 early,
then, they will stop doing anything :(
I think "machines should
     work forever" :D
So, I think A and B
      should ...
http://www.flickr.com/photos/ryanr/157458385/
Parallel Marking with
   Task Stealing.
If A and B finishes work early,
This is called
"Task Stealing"
We should consider two
                         problems


         ✓ Workload balancing
         ✓ Wait-free algorithm


                                               97/207
Parallel worlds of CRuby's GC           Powered by Rabbit 0.9.3
Wait-free algorithm
What does "wait-free" mean?


         ✓ A wait-free program does non-
           blocking execution.
         ✓ It guarantees per-thread progress.


                                                  99/207
Parallel worlds of CRuby's GC              Powered by Rabbit 0.9.3
Why is wait-free
 important?
Amdahl's law
Amdahl's law
                                is used to find the
                                maximum expected
                                improvement to an
                                overall system when
                                only part of the system
                                is improved.
                                     [cited from `Amdahl's law - Wikipedia']
                                                                           102/207
Parallel worlds of CRuby's GC                                         Powered by Rabbit 0.9.3
Amdahl's law is used in
                     parallel computing
         ✓ If parallel portion of the system is
           X%
         ✓ And number of processors is Y,
         ✓ How much speedup can we
           expect?
                                                 103/207
Parallel worlds of CRuby's GC               Powered by Rabbit 0.9.3
It's worse than expected,
          right?
The conclusion so far
The conclusion so far
         ✓ We should consider how we can
           efficiently balance workloads.
                  ✓ So, we use Task Stealing.

         ✓ We should eliminate non-parallel
           parts
                  ✓ by using wait-free algorithm.
                                                         109/207
Parallel worlds of CRuby's GC                       Powered by Rabbit 0.9.3
Today's topics
         ✓ Why do we need Parallel
           Marking?
         ✓ What to consider?
         ✓ How to implement?
         ✓ How much did performance
           improve
                                                      110/207
Parallel worlds of CRuby's GC                    Powered by Rabbit 0.9.3
How to implement
Parallel Marking?
Task Stealing

         ✓ In Task Stealing, threads steal
           tasks from each other
         ✓ Task Stealing is achieved with
           Arora's Deque

                                                     112/207
Parallel worlds of CRuby's GC                   Powered by Rabbit 0.9.3
Arora's Deque

         ✓ Deque stands for the Double-
           Ended Queue.
         ✓ In Arora's Deque, the deque
           contains tasks as elements.
         ✓ It's a wait-free data structure.
                                                     113/207
Parallel worlds of CRuby's GC                   Powered by Rabbit 0.9.3
Arora's Deque has only
   three operations.
Each mark worker has a single deque.
Only the owner can call pop() and push().
Worker can call shift() to steal other
         workers' deque.
"Hey wait a minute,
  doesn't shift() have
contention problems?"
In what ways could shift()
          cause contention problems?
                     e.g...

         ✓ Multi-thread (workers) may call
           shift() of same deque at the same
           time.

                                               122/207
Parallel worlds of CRuby's GC             Powered by Rabbit 0.9.3
In what ways could shift()
          cause contention problems?
                     e.g...

         ✓ shift() and pop() could be called
           at the same time
                  ✓ when deque has only one element.

                                                            123/207
Parallel worlds of CRuby's GC                          Powered by Rabbit 0.9.3
But, Arora's Deque avoids
these contention problems.
Serialization

         ✓ shift() is serialized by using CAS.
                  ✓ CAS = Compare And Swap

         ✓ And, this serialization doesn't use
           a lock.
                  ✓ It's wait-free!!

                                                     125/207
Parallel worlds of CRuby's GC                   Powered by Rabbit 0.9.3
I omit details of the
implementation of the
    serialization.
For the sake of this
presentation, let's assume
that Arora's Deque avoids
  contention problems.
Summary for Arora's Deque

         ✓ A simple data structure for Task
           Stealing.
         ✓ Each worker has a single deque.
         ✓ Stealing (shift operation) is wait-
           free!
                                                 128/207
Parallel worlds of CRuby's GC               Powered by Rabbit 0.9.3
How to use Arora's Deque
  in Parallel Marking?
First try:
A task is an object.
Let's say that worker A has a branch that
        is composed of 4 objects.
We start by marking A and pushing it to
              the deque.
pop A, mark B and C, push B and C.
pop C, mark D, push D
pop D, pop B
This is a branch marking.
How do you steal?
Suppose that worker1 has task B and C.
        Worker2 has no task.
Worker2 steals task B on Worker1 by
           using shift().
Summary

         ✓ Marker uses Arora's Deque as a
           marking stack.
         ✓ A "task" means an object.
                  ✓ The granularity of the task is very fine.

         ✓ This is a naive implementation.
                                                              140/207
Parallel worlds of CRuby's GC                            Powered by Rabbit 0.9.3
I implemented this
    approach.
But..
It's slower
than original GC.
OMG...
http://www.flickr.com/photos/emariephotos/4958245676/
I fell into
the Pitfalls of
Parallel Processing
(PPP!!!)
Why slow?
Why slow?

         ✓ pop(),push(),shift() are called
           frequently.
                  ✓ Because deque has fine-grained tasks.

         ✓ Their overhead is too big.

                                                            147/207
Parallel worlds of CRuby's GC                          Powered by Rabbit 0.9.3
How to fix this?
We can make the tasks
  less fine-grained.
A task is a branch
All branches in Roots are divided
   roughly among the deques.
Each Worker marks a branch in its deque.
When the deque is empty, the worker
steals a branch from another worker.
like this!!
Good point & Bad point
         ✓ Number of calls to Deque's
           operations was reduced.
                  ✓ Marking speed of the worker is
                    improved.

         ✓ However, Coarse-grained tasks
           decrease parallelism.
                                                          155/207
Parallel worlds of CRuby's GC                        Powered by Rabbit 0.9.3
Why do coarse-grained
   tasks decrease
    parallelism?
Tasks may involve a large
        branch.
If an object in B's branch has many child
                 objects..
.. then A can't steal it while B is marking
             the large branch.
So, the worker needs to
treat large branches as
      special cases.
Almost all large branches
 hold large Array objects
and/or large Hash objects.
Treatment for large Array
               objects and Hash objects
         ✓ Each marker has a special deque
           to manage them.
         ✓ A marker divides them into fixed
           size tasks.
                  ✓ e.g. 0-9 elements of Array, 10-19
                    elements of Array...
                                                             162/207
Parallel worlds of CRuby's GC                           Powered by Rabbit 0.9.3
Treatment for Large Array
                  and Hash

         ✓ By doing this, other workers can
           steal divided tasks.
                  ✓ This improves parallelism.


                                                      163/207
Parallel worlds of CRuby's GC                    Powered by Rabbit 0.9.3
Summary
         ✓ The naive implementation was
           slow.
                  ✓ Grain of the task was too fine.

         ✓ A "task" means a branch in Roots
                  ✓ Grain of the task is coarse.

         ✓ It's faster!!
                                                           164/207
Parallel worlds of CRuby's GC                         Powered by Rabbit 0.9.3
Today's topics
         ✓ Why do we need Parallel
           Marking?
         ✓ What to consider?
         ✓ How to implement?
         ✓ How much did performance
           improve?
                                                      165/207
Parallel worlds of CRuby's GC                    Powered by Rabbit 0.9.3
How much did
performance improve?
These are my machine specs


         ✓ My machine has only 2 cores
         ✓ Memory: 8GB
         ✓ OS: Linux

                                              167/207
Parallel worlds of CRuby's GC            Powered by Rabbit 0.9.3
Parallel marking uses 4
  marking threads.
First benchmark program is


         ✓ make benchmark
                  ✓ This is the benchmark which used in
                    CRuby development



                                                           169/207
Parallel worlds of CRuby's GC                         Powered by Rabbit 0.9.3
Why does this seem so slow?


         ✓ I think it's affected by Parallel
           Marking's preparation.
                  ✓ e.g. creating marking threads,
                    allocation of deques.


                                                          171/207
Parallel worlds of CRuby's GC                        Powered by Rabbit 0.9.3
Why does this seem so slow?


         ✓ In most of the benchmarks, the
           mark target objects are few.
                  ✓ In this case, Parallel Marking cost is
                    expensive.


                                                              172/207
Parallel worlds of CRuby's GC                            Powered by Rabbit 0.9.3
Next benchmark program is

         ✓ make rdoc
                  ✓ make rdoc generates the Ruby
                    documentation.
                  ✓ This benchmark measures execution
                    time and the GC execution time of
                    make rdoc.

                                                         173/207
Parallel worlds of CRuby's GC                       Powered by Rabbit 0.9.3
make rdoc
         ✓ It takes about 80 seconds on my
           machine.
         ✓ In fact, 30% of that time is spent
           on GC!!
         ✓ How much did performance
           improve?
                                                 174/207
Parallel worlds of CRuby's GC               Powered by Rabbit 0.9.3
All GC time is improved
       by 40%!
So fast!!
In many core environment

         ✓ I expect we get a large
           improvement.
                  ✓ e.g. 8 core, 16 core...

         ✓ But, my machine has just 2 cores.
                  ✓ I can't see it :(

                                                   178/207
Parallel worlds of CRuby's GC                 Powered by Rabbit 0.9.3
Best case for Parallel GC

         ✓ If the objects are many.
                  ✓ In this case, mark targets is also many.

         ✓ If the objects are long-lived.
                  ✓ Server-side application?


                                                              179/207
Parallel worlds of CRuby's GC                            Powered by Rabbit 0.9.3
Demo
Demonstration

         ✓ I want to show the performance
           improvement with Parallel GC.
         ✓ This demonstration is video game
           style.

                                                     181/207
Parallel worlds of CRuby's GC                   Powered by Rabbit 0.9.3
Let me explain about this
         game.
And, Character has HP.
When GC runs,
the character loses HP while waiting for
            the GC to finish.
We must reach the goal before HP run
                out.
Other characteristics of
                     SUPER NARIO GC

         ✓ GC is running in fixed intervals.
         ✓ A lot of objects are generated to
           increase GC's burden.
                  ✓ Burden = Game Level

                                                187/207
Parallel worlds of CRuby's GC              Powered by Rabbit 0.9.3
Try to compare Original GC
              and Parallel GC

         ✓ Original GC pause time is long.
                  ✓ This game will be difficult.

         ✓ Parallel GC pause time is short.
                  ✓ This game will be easy.

                                                        188/207
Parallel worlds of CRuby's GC                      Powered by Rabbit 0.9.3
OK, Let's try!
DEMO
Original GC version
Oops.. so difficult!!!
DEMO
Parallel GC version
Wow!! Easy!!!!
Let's compare average
       times GC
Fast!!
Remaining Problems
Windows OS is not supported
         ✓ Mark Worker uses pthread as
           native thread.
         ✓ And, uses some gcc built-in
           functions.
         ✓ But, I'll support for Windows
           eventually.
                                                198/207
Parallel worlds of CRuby's GC              Powered by Rabbit 0.9.3
Increased memory usage.

         ✓ Size of 1 Deque is roughly 32KB.
         ✓ But generally multi-core machine
           have plenty of memory.
                  ✓ So, I think it's OK :P


                                                  199/207
Parallel worlds of CRuby's GC                Powered by Rabbit 0.9.3
Conclusion
Conclusion

         ✓ I implemented Parallel Marking
           GC
         ✓ GC was improved!
                  ✓ I'll report to ruby-core soon.


                                                          201/207
Parallel worlds of CRuby's GC                        Powered by Rabbit 0.9.3
Conclusion


         ✓ But, Parallel Marking has some
           problems.
                  ✓ I'll fix these.



                                                  202/207
Parallel worlds of CRuby's GC                Powered by Rabbit 0.9.3
source code
         ✓ Parallel Marking GC
                  ✓ <URL:https://github.com/authorNari/
                    ruby/tree/pmark_div_root2>

         ✓ SUPER NARIO GC
                  ✓ <URL:https://github.com/authorNari/
                    nario/>

                                                          203/207
Parallel worlds of CRuby's GC                        Powered by Rabbit 0.9.3
Acknowledgments

         ✓ Following people helped me
           make this presentation!!
                  ✓ Tor-san!!
                  ✓ matz, shugo, yhara, sada, takaokouji,
                    other co-workers!!

                                                             204/207
Parallel worlds of CRuby's GC                           Powered by Rabbit 0.9.3
Thank you!!!
Do you have any
     questions?


Please short and simple
      questions :)
Sorry

         ✓ It's too difficult for me to
           understand/answer the question.
         ✓ Could be send the question on
           twitter(@nari_en)?

                                                207/207
Parallel worlds of CRuby's GC              Powered by Rabbit 0.9.3

More Related Content

Viewers also liked

20160730tokyor55
20160730tokyor5520160730tokyor55
20160730tokyor55Med_KU
 
SOAR: SENSOR ORIENTED MOBILE AUGMENTED REALITY FOR URBAN LANDSCAPE ASSESSMENT
SOAR: SENSOR ORIENTED MOBILE AUGMENTED REALITY FOR URBAN LANDSCAPE ASSESSMENTSOAR: SENSOR ORIENTED MOBILE AUGMENTED REALITY FOR URBAN LANDSCAPE ASSESSMENT
SOAR: SENSOR ORIENTED MOBILE AUGMENTED REALITY FOR URBAN LANDSCAPE ASSESSMENTTomohiro Fukuda
 
RaspberryPiで日本の子供たちにプログラミングのパッションを伝えよう!
RaspberryPiで日本の子供たちにプログラミングのパッションを伝えよう!RaspberryPiで日本の子供たちにプログラミングのパッションを伝えよう!
RaspberryPiで日本の子供たちにプログラミングのパッションを伝えよう!Antoine Choppin
 
DISTRIBUTED AND SYNCHRONISED VR MEETING USING CLOUD COMPUTING: Availability a...
DISTRIBUTED AND SYNCHRONISED VR MEETING USING CLOUD COMPUTING: Availability a...DISTRIBUTED AND SYNCHRONISED VR MEETING USING CLOUD COMPUTING: Availability a...
DISTRIBUTED AND SYNCHRONISED VR MEETING USING CLOUD COMPUTING: Availability a...Tomohiro Fukuda
 
A STUDY OF VARIATION OF NORMAL OF POLY-GONS CREATED BY POINT CLOUD DATA FOR A...
A STUDY OF VARIATION OF NORMAL OF POLY-GONS CREATED BY POINT CLOUD DATA FOR A...A STUDY OF VARIATION OF NORMAL OF POLY-GONS CREATED BY POINT CLOUD DATA FOR A...
A STUDY OF VARIATION OF NORMAL OF POLY-GONS CREATED BY POINT CLOUD DATA FOR A...Tomohiro Fukuda
 
PyCon JP 2016 Talk#024 ja
 PyCon JP 2016 Talk#024 ja PyCon JP 2016 Talk#024 ja
PyCon JP 2016 Talk#024 jadrillan
 
型ヒントについて考えよう!
型ヒントについて考えよう!型ヒントについて考えよう!
型ヒントについて考えよう!Yusuke Miyazaki
 
人工知能の技術で有名なニューラルネットワークのフレームワークである #Chainer を用いた対話botを使った俺の屍を越えてゆけ slide share
人工知能の技術で有名なニューラルネットワークのフレームワークである #Chainer を用いた対話botを使った俺の屍を越えてゆけ  slide share人工知能の技術で有名なニューラルネットワークのフレームワークである #Chainer を用いた対話botを使った俺の屍を越えてゆけ  slide share
人工知能の技術で有名なニューラルネットワークのフレームワークである #Chainer を用いた対話botを使った俺の屍を越えてゆけ slide shareOgushi Masaya
 
Factorization machines with r
Factorization machines with rFactorization machines with r
Factorization machines with rShota Yasui
 
Capillary electrophoresis principles and applications
Capillary electrophoresis principles and applications   Capillary electrophoresis principles and applications
Capillary electrophoresis principles and applications Indira Shastry
 
可視化周辺の進化がヤヴァイ 〜2016〜
可視化周辺の進化がヤヴァイ 〜2016〜可視化周辺の進化がヤヴァイ 〜2016〜
可視化周辺の進化がヤヴァイ 〜2016〜Takashi Kitano
 
GOAR: GIS Oriented Mobile Augmented Reality for Urban Landscape Assessment
GOAR: GIS Oriented Mobile Augmented Reality for Urban Landscape AssessmentGOAR: GIS Oriented Mobile Augmented Reality for Urban Landscape Assessment
GOAR: GIS Oriented Mobile Augmented Reality for Urban Landscape AssessmentTomohiro Fukuda
 
Availability of Mobile Augmented Reality System for Urban Landscape Simulation
Availability of Mobile Augmented Reality System for Urban Landscape SimulationAvailability of Mobile Augmented Reality System for Urban Landscape Simulation
Availability of Mobile Augmented Reality System for Urban Landscape SimulationTomohiro Fukuda
 
高速・省メモリにlibsvm形式で ダンプする方法を研究してみた
高速・省メモリにlibsvm形式で ダンプする方法を研究してみた高速・省メモリにlibsvm形式で ダンプする方法を研究してみた
高速・省メモリにlibsvm形式で ダンプする方法を研究してみたKeisuke Hosaka
 
心理学における「再現性」の問題とBayes Factor
心理学における「再現性」の問題とBayes Factor心理学における「再現性」の問題とBayes Factor
心理学における「再現性」の問題とBayes FactorShushi Namba
 
てかLINEやってる? (Japan.R 2016 LT) #JapanR
てかLINEやってる? (Japan.R 2016 LT) #JapanRてかLINEやってる? (Japan.R 2016 LT) #JapanR
てかLINEやってる? (Japan.R 2016 LT) #JapanRcancolle
 
ビックデータとPythonではじめる野球の統計分析 #pyconjp
ビックデータとPythonではじめる野球の統計分析 #pyconjpビックデータとPythonではじめる野球の統計分析 #pyconjp
ビックデータとPythonではじめる野球の統計分析 #pyconjpShinichi Nakagawa
 
Pythonで入門するApache Spark at PyCon2016
Pythonで入門するApache Spark at PyCon2016Pythonで入門するApache Spark at PyCon2016
Pythonで入門するApache Spark at PyCon2016Tatsuya Atsumi
 
データ分析スクリプトのツール化入門 - PyConJP 2016
データ分析スクリプトのツール化入門 - PyConJP 2016データ分析スクリプトのツール化入門 - PyConJP 2016
データ分析スクリプトのツール化入門 - PyConJP 2016Akinori Kohno
 
20161127 doradora09 japanr2016_lt
20161127 doradora09 japanr2016_lt20161127 doradora09 japanr2016_lt
20161127 doradora09 japanr2016_ltNobuaki Oshiro
 

Viewers also liked (20)

20160730tokyor55
20160730tokyor5520160730tokyor55
20160730tokyor55
 
SOAR: SENSOR ORIENTED MOBILE AUGMENTED REALITY FOR URBAN LANDSCAPE ASSESSMENT
SOAR: SENSOR ORIENTED MOBILE AUGMENTED REALITY FOR URBAN LANDSCAPE ASSESSMENTSOAR: SENSOR ORIENTED MOBILE AUGMENTED REALITY FOR URBAN LANDSCAPE ASSESSMENT
SOAR: SENSOR ORIENTED MOBILE AUGMENTED REALITY FOR URBAN LANDSCAPE ASSESSMENT
 
RaspberryPiで日本の子供たちにプログラミングのパッションを伝えよう!
RaspberryPiで日本の子供たちにプログラミングのパッションを伝えよう!RaspberryPiで日本の子供たちにプログラミングのパッションを伝えよう!
RaspberryPiで日本の子供たちにプログラミングのパッションを伝えよう!
 
DISTRIBUTED AND SYNCHRONISED VR MEETING USING CLOUD COMPUTING: Availability a...
DISTRIBUTED AND SYNCHRONISED VR MEETING USING CLOUD COMPUTING: Availability a...DISTRIBUTED AND SYNCHRONISED VR MEETING USING CLOUD COMPUTING: Availability a...
DISTRIBUTED AND SYNCHRONISED VR MEETING USING CLOUD COMPUTING: Availability a...
 
A STUDY OF VARIATION OF NORMAL OF POLY-GONS CREATED BY POINT CLOUD DATA FOR A...
A STUDY OF VARIATION OF NORMAL OF POLY-GONS CREATED BY POINT CLOUD DATA FOR A...A STUDY OF VARIATION OF NORMAL OF POLY-GONS CREATED BY POINT CLOUD DATA FOR A...
A STUDY OF VARIATION OF NORMAL OF POLY-GONS CREATED BY POINT CLOUD DATA FOR A...
 
PyCon JP 2016 Talk#024 ja
 PyCon JP 2016 Talk#024 ja PyCon JP 2016 Talk#024 ja
PyCon JP 2016 Talk#024 ja
 
型ヒントについて考えよう!
型ヒントについて考えよう!型ヒントについて考えよう!
型ヒントについて考えよう!
 
人工知能の技術で有名なニューラルネットワークのフレームワークである #Chainer を用いた対話botを使った俺の屍を越えてゆけ slide share
人工知能の技術で有名なニューラルネットワークのフレームワークである #Chainer を用いた対話botを使った俺の屍を越えてゆけ  slide share人工知能の技術で有名なニューラルネットワークのフレームワークである #Chainer を用いた対話botを使った俺の屍を越えてゆけ  slide share
人工知能の技術で有名なニューラルネットワークのフレームワークである #Chainer を用いた対話botを使った俺の屍を越えてゆけ slide share
 
Factorization machines with r
Factorization machines with rFactorization machines with r
Factorization machines with r
 
Capillary electrophoresis principles and applications
Capillary electrophoresis principles and applications   Capillary electrophoresis principles and applications
Capillary electrophoresis principles and applications
 
可視化周辺の進化がヤヴァイ 〜2016〜
可視化周辺の進化がヤヴァイ 〜2016〜可視化周辺の進化がヤヴァイ 〜2016〜
可視化周辺の進化がヤヴァイ 〜2016〜
 
GOAR: GIS Oriented Mobile Augmented Reality for Urban Landscape Assessment
GOAR: GIS Oriented Mobile Augmented Reality for Urban Landscape AssessmentGOAR: GIS Oriented Mobile Augmented Reality for Urban Landscape Assessment
GOAR: GIS Oriented Mobile Augmented Reality for Urban Landscape Assessment
 
Availability of Mobile Augmented Reality System for Urban Landscape Simulation
Availability of Mobile Augmented Reality System for Urban Landscape SimulationAvailability of Mobile Augmented Reality System for Urban Landscape Simulation
Availability of Mobile Augmented Reality System for Urban Landscape Simulation
 
高速・省メモリにlibsvm形式で ダンプする方法を研究してみた
高速・省メモリにlibsvm形式で ダンプする方法を研究してみた高速・省メモリにlibsvm形式で ダンプする方法を研究してみた
高速・省メモリにlibsvm形式で ダンプする方法を研究してみた
 
心理学における「再現性」の問題とBayes Factor
心理学における「再現性」の問題とBayes Factor心理学における「再現性」の問題とBayes Factor
心理学における「再現性」の問題とBayes Factor
 
てかLINEやってる? (Japan.R 2016 LT) #JapanR
てかLINEやってる? (Japan.R 2016 LT) #JapanRてかLINEやってる? (Japan.R 2016 LT) #JapanR
てかLINEやってる? (Japan.R 2016 LT) #JapanR
 
ビックデータとPythonではじめる野球の統計分析 #pyconjp
ビックデータとPythonではじめる野球の統計分析 #pyconjpビックデータとPythonではじめる野球の統計分析 #pyconjp
ビックデータとPythonではじめる野球の統計分析 #pyconjp
 
Pythonで入門するApache Spark at PyCon2016
Pythonで入門するApache Spark at PyCon2016Pythonで入門するApache Spark at PyCon2016
Pythonで入門するApache Spark at PyCon2016
 
データ分析スクリプトのツール化入門 - PyConJP 2016
データ分析スクリプトのツール化入門 - PyConJP 2016データ分析スクリプトのツール化入門 - PyConJP 2016
データ分析スクリプトのツール化入門 - PyConJP 2016
 
20161127 doradora09 japanr2016_lt
20161127 doradora09 japanr2016_lt20161127 doradora09 japanr2016_lt
20161127 doradora09 japanr2016_lt
 

Similar to Parallel worlds of CRuby's GC

Scripting Support in GFv3 Prelude - Full Version
Scripting Support in GFv3 Prelude - Full VersionScripting Support in GFv3 Prelude - Full Version
Scripting Support in GFv3 Prelude - Full VersionEduardo Pelegri-Llopart
 
MongoDB, Cloudformation and Chef
MongoDB, Cloudformation and ChefMongoDB, Cloudformation and Chef
MongoDB, Cloudformation and ChefMongoDB
 
Deployments with rails
Deployments with railsDeployments with rails
Deployments with railsGourav Tiwari
 
Kubernetes & Google Container Engine @ mabl
Kubernetes & Google Container Engine @ mablKubernetes & Google Container Engine @ mabl
Kubernetes & Google Container Engine @ mablJoseph Lust
 
GraalVM - OpenSlava 2019-10-18
GraalVM - OpenSlava 2019-10-18GraalVM - OpenSlava 2019-10-18
GraalVM - OpenSlava 2019-10-18Jorge Hidalgo
 
GraalVM - MadridJUG 2019-10-22
GraalVM - MadridJUG 2019-10-22GraalVM - MadridJUG 2019-10-22
GraalVM - MadridJUG 2019-10-22Jorge Hidalgo
 
Dmytro Patkovskyi "Practical tips regarding build optimization for those who ...
Dmytro Patkovskyi "Practical tips regarding build optimization for those who ...Dmytro Patkovskyi "Practical tips regarding build optimization for those who ...
Dmytro Patkovskyi "Practical tips regarding build optimization for those who ...Fwdays
 
Groovy, to Infinity and Beyond - Groovy/Grails eXchange 2009
Groovy, to Infinity and Beyond - Groovy/Grails eXchange 2009Groovy, to Infinity and Beyond - Groovy/Grails eXchange 2009
Groovy, to Infinity and Beyond - Groovy/Grails eXchange 2009Guillaume Laforge
 
[GREE Tech Talk #08] You Don't Know WebGL
[GREE Tech Talk #08] You Don't Know WebGL[GREE Tech Talk #08] You Don't Know WebGL
[GREE Tech Talk #08] You Don't Know WebGLgree_tech
 
You Don't Know WebGL at GREE Tech Talk #08
You Don't Know WebGL at GREE Tech Talk #08You Don't Know WebGL at GREE Tech Talk #08
You Don't Know WebGL at GREE Tech Talk #08Guangyao Liu
 

Similar to Parallel worlds of CRuby's GC (11)

GC FAQ
GC FAQGC FAQ
GC FAQ
 
Scripting Support in GFv3 Prelude - Full Version
Scripting Support in GFv3 Prelude - Full VersionScripting Support in GFv3 Prelude - Full Version
Scripting Support in GFv3 Prelude - Full Version
 
MongoDB, Cloudformation and Chef
MongoDB, Cloudformation and ChefMongoDB, Cloudformation and Chef
MongoDB, Cloudformation and Chef
 
Deployments with rails
Deployments with railsDeployments with rails
Deployments with rails
 
Kubernetes & Google Container Engine @ mabl
Kubernetes & Google Container Engine @ mablKubernetes & Google Container Engine @ mabl
Kubernetes & Google Container Engine @ mabl
 
GraalVM - OpenSlava 2019-10-18
GraalVM - OpenSlava 2019-10-18GraalVM - OpenSlava 2019-10-18
GraalVM - OpenSlava 2019-10-18
 
GraalVM - MadridJUG 2019-10-22
GraalVM - MadridJUG 2019-10-22GraalVM - MadridJUG 2019-10-22
GraalVM - MadridJUG 2019-10-22
 
Dmytro Patkovskyi "Practical tips regarding build optimization for those who ...
Dmytro Patkovskyi "Practical tips regarding build optimization for those who ...Dmytro Patkovskyi "Practical tips regarding build optimization for those who ...
Dmytro Patkovskyi "Practical tips regarding build optimization for those who ...
 
Groovy, to Infinity and Beyond - Groovy/Grails eXchange 2009
Groovy, to Infinity and Beyond - Groovy/Grails eXchange 2009Groovy, to Infinity and Beyond - Groovy/Grails eXchange 2009
Groovy, to Infinity and Beyond - Groovy/Grails eXchange 2009
 
[GREE Tech Talk #08] You Don't Know WebGL
[GREE Tech Talk #08] You Don't Know WebGL[GREE Tech Talk #08] You Don't Know WebGL
[GREE Tech Talk #08] You Don't Know WebGL
 
You Don't Know WebGL at GREE Tech Talk #08
You Don't Know WebGL at GREE Tech Talk #08You Don't Know WebGL at GREE Tech Talk #08
You Don't Know WebGL at GREE Tech Talk #08
 

More from Narihiro Nakamura

桐島、Rubyやめるってよ
桐島、Rubyやめるってよ桐島、Rubyやめるってよ
桐島、RubyやめるってよNarihiro Nakamura
 
G1GCへ伸びていた「いばらの道」
G1GCへ伸びていた「いばらの道」G1GCへ伸びていた「いばらの道」
G1GCへ伸びていた「いばらの道」Narihiro Nakamura
 
円環の理(Garbage Collection)
円環の理(Garbage Collection)円環の理(Garbage Collection)
円環の理(Garbage Collection)Narihiro Nakamura
 
地獄のGC本スピンオフ
地獄のGC本スピンオフ地獄のGC本スピンオフ
地獄のGC本スピンオフNarihiro Nakamura
 
シャイなRubyistがRubyKaigiでできること
シャイなRubyistがRubyKaigiでできることシャイなRubyistがRubyKaigiでできること
シャイなRubyistがRubyKaigiでできることNarihiro Nakamura
 
われわれは、GCをX倍遅くできる
われわれは、GCをX倍遅くできるわれわれは、GCをX倍遅くできる
われわれは、GCをX倍遅くできるNarihiro Nakamura
 
GC本をGCしないための100の方法
GC本をGCしないための100の方法GC本をGCしないための100の方法
GC本をGCしないための100の方法Narihiro Nakamura
 
GC生誕50周年を祝って
GC生誕50周年を祝ってGC生誕50周年を祝って
GC生誕50周年を祝ってNarihiro Nakamura
 
シャイなRubyistにできること
シャイなRubyistにできることシャイなRubyistにできること
シャイなRubyistにできることNarihiro Nakamura
 
Railsハイパー実践講座-第35回NaCl勉強会
Railsハイパー実践講座-第35回NaCl勉強会Railsハイパー実践講座-第35回NaCl勉強会
Railsハイパー実践講座-第35回NaCl勉強会Narihiro Nakamura
 
Androidの中身-第26回NaCl社内勉強会
Androidの中身-第26回NaCl社内勉強会Androidの中身-第26回NaCl社内勉強会
Androidの中身-第26回NaCl社内勉強会Narihiro Nakamura
 
RubyのGC改善による私のエコライフ
RubyのGC改善による私のエコライフRubyのGC改善による私のエコライフ
RubyのGC改善による私のエコライフNarihiro Nakamura
 

More from Narihiro Nakamura (20)

Symbol GC
Symbol GCSymbol GC
Symbol GC
 
RUBYLAND
RUBYLANDRUBYLAND
RUBYLAND
 
桐島、Rubyやめるってよ
桐島、Rubyやめるってよ桐島、Rubyやめるってよ
桐島、Rubyやめるってよ
 
Rubyによる本気のGC
Rubyによる本気のGCRubyによる本気のGC
Rubyによる本気のGC
 
Fxxking gc.c
Fxxking gc.cFxxking gc.c
Fxxking gc.c
 
G1GCへ伸びていた「いばらの道」
G1GCへ伸びていた「いばらの道」G1GCへ伸びていた「いばらの道」
G1GCへ伸びていた「いばらの道」
 
CRubyGCの並列世界
CRubyGCの並列世界CRubyGCの並列世界
CRubyGCの並列世界
 
円環の理(Garbage Collection)
円環の理(Garbage Collection)円環の理(Garbage Collection)
円環の理(Garbage Collection)
 
地獄のGC本スピンオフ
地獄のGC本スピンオフ地獄のGC本スピンオフ
地獄のGC本スピンオフ
 
シャイなRubyistがRubyKaigiでできること
シャイなRubyistがRubyKaigiでできることシャイなRubyistがRubyKaigiでできること
シャイなRubyistがRubyKaigiでできること
 
われわれは、GCをX倍遅くできる
われわれは、GCをX倍遅くできるわれわれは、GCをX倍遅くできる
われわれは、GCをX倍遅くできる
 
GCが止まらない
GCが止まらないGCが止まらない
GCが止まらない
 
GC本をGCしないための100の方法
GC本をGCしないための100の方法GC本をGCしないための100の方法
GC本をGCしないための100の方法
 
GC生誕50周年を祝って
GC生誕50周年を祝ってGC生誕50周年を祝って
GC生誕50周年を祝って
 
GC本のツクリカタ
GC本のツクリカタGC本のツクリカタ
GC本のツクリカタ
 
シャイなRubyistにできること
シャイなRubyistにできることシャイなRubyistにできること
シャイなRubyistにできること
 
Railsハイパー実践講座-第35回NaCl勉強会
Railsハイパー実践講座-第35回NaCl勉強会Railsハイパー実践講座-第35回NaCl勉強会
Railsハイパー実践講座-第35回NaCl勉強会
 
GC黄金時代
GC黄金時代GC黄金時代
GC黄金時代
 
Androidの中身-第26回NaCl社内勉強会
Androidの中身-第26回NaCl社内勉強会Androidの中身-第26回NaCl社内勉強会
Androidの中身-第26回NaCl社内勉強会
 
RubyのGC改善による私のエコライフ
RubyのGC改善による私のエコライフRubyのGC改善による私のエコライフ
RubyのGC改善による私のエコライフ
 

Recently uploaded

Manual 508 Accessibility Compliance Audit
Manual 508 Accessibility Compliance AuditManual 508 Accessibility Compliance Audit
Manual 508 Accessibility Compliance AuditSkynet Technologies
 
Decarbonising Buildings: Making a net-zero built environment a reality
Decarbonising Buildings: Making a net-zero built environment a realityDecarbonising Buildings: Making a net-zero built environment a reality
Decarbonising Buildings: Making a net-zero built environment a realityIES VE
 
Genislab builds better products and faster go-to-market with Lean project man...
Genislab builds better products and faster go-to-market with Lean project man...Genislab builds better products and faster go-to-market with Lean project man...
Genislab builds better products and faster go-to-market with Lean project man...Farhan Tariq
 
Assure Ecommerce and Retail Operations Uptime with ThousandEyes
Assure Ecommerce and Retail Operations Uptime with ThousandEyesAssure Ecommerce and Retail Operations Uptime with ThousandEyes
Assure Ecommerce and Retail Operations Uptime with ThousandEyesThousandEyes
 
[Webinar] SpiraTest - Setting New Standards in Quality Assurance
[Webinar] SpiraTest - Setting New Standards in Quality Assurance[Webinar] SpiraTest - Setting New Standards in Quality Assurance
[Webinar] SpiraTest - Setting New Standards in Quality AssuranceInflectra
 
Passkey Providers and Enabling Portability: FIDO Paris Seminar.pptx
Passkey Providers and Enabling Portability: FIDO Paris Seminar.pptxPasskey Providers and Enabling Portability: FIDO Paris Seminar.pptx
Passkey Providers and Enabling Portability: FIDO Paris Seminar.pptxLoriGlavin3
 
Long journey of Ruby standard library at RubyConf AU 2024
Long journey of Ruby standard library at RubyConf AU 2024Long journey of Ruby standard library at RubyConf AU 2024
Long journey of Ruby standard library at RubyConf AU 2024Hiroshi SHIBATA
 
Connecting the Dots for Information Discovery.pdf
Connecting the Dots for Information Discovery.pdfConnecting the Dots for Information Discovery.pdf
Connecting the Dots for Information Discovery.pdfNeo4j
 
Testing tools and AI - ideas what to try with some tool examples
Testing tools and AI - ideas what to try with some tool examplesTesting tools and AI - ideas what to try with some tool examples
Testing tools and AI - ideas what to try with some tool examplesKari Kakkonen
 
TeamStation AI System Report LATAM IT Salaries 2024
TeamStation AI System Report LATAM IT Salaries 2024TeamStation AI System Report LATAM IT Salaries 2024
TeamStation AI System Report LATAM IT Salaries 2024Lonnie McRorey
 
Time Series Foundation Models - current state and future directions
Time Series Foundation Models - current state and future directionsTime Series Foundation Models - current state and future directions
Time Series Foundation Models - current state and future directionsNathaniel Shimoni
 
How AI, OpenAI, and ChatGPT impact business and software.
How AI, OpenAI, and ChatGPT impact business and software.How AI, OpenAI, and ChatGPT impact business and software.
How AI, OpenAI, and ChatGPT impact business and software.Curtis Poe
 
Data governance with Unity Catalog Presentation
Data governance with Unity Catalog PresentationData governance with Unity Catalog Presentation
Data governance with Unity Catalog PresentationKnoldus Inc.
 
The Role of FIDO in a Cyber Secure Netherlands: FIDO Paris Seminar.pptx
The Role of FIDO in a Cyber Secure Netherlands: FIDO Paris Seminar.pptxThe Role of FIDO in a Cyber Secure Netherlands: FIDO Paris Seminar.pptx
The Role of FIDO in a Cyber Secure Netherlands: FIDO Paris Seminar.pptxLoriGlavin3
 
The Future Roadmap for the Composable Data Stack - Wes McKinney - Data Counci...
The Future Roadmap for the Composable Data Stack - Wes McKinney - Data Counci...The Future Roadmap for the Composable Data Stack - Wes McKinney - Data Counci...
The Future Roadmap for the Composable Data Stack - Wes McKinney - Data Counci...Wes McKinney
 
TrustArc Webinar - How to Build Consumer Trust Through Data Privacy
TrustArc Webinar - How to Build Consumer Trust Through Data PrivacyTrustArc Webinar - How to Build Consumer Trust Through Data Privacy
TrustArc Webinar - How to Build Consumer Trust Through Data PrivacyTrustArc
 
Sample pptx for embedding into website for demo
Sample pptx for embedding into website for demoSample pptx for embedding into website for demo
Sample pptx for embedding into website for demoHarshalMandlekar2
 
Transcript: New from BookNet Canada for 2024: Loan Stars - Tech Forum 2024
Transcript: New from BookNet Canada for 2024: Loan Stars - Tech Forum 2024Transcript: New from BookNet Canada for 2024: Loan Stars - Tech Forum 2024
Transcript: New from BookNet Canada for 2024: Loan Stars - Tech Forum 2024BookNet Canada
 
From Family Reminiscence to Scholarly Archive .
From Family Reminiscence to Scholarly Archive .From Family Reminiscence to Scholarly Archive .
From Family Reminiscence to Scholarly Archive .Alan Dix
 
How to Effectively Monitor SD-WAN and SASE Environments with ThousandEyes
How to Effectively Monitor SD-WAN and SASE Environments with ThousandEyesHow to Effectively Monitor SD-WAN and SASE Environments with ThousandEyes
How to Effectively Monitor SD-WAN and SASE Environments with ThousandEyesThousandEyes
 

Recently uploaded (20)

Manual 508 Accessibility Compliance Audit
Manual 508 Accessibility Compliance AuditManual 508 Accessibility Compliance Audit
Manual 508 Accessibility Compliance Audit
 
Decarbonising Buildings: Making a net-zero built environment a reality
Decarbonising Buildings: Making a net-zero built environment a realityDecarbonising Buildings: Making a net-zero built environment a reality
Decarbonising Buildings: Making a net-zero built environment a reality
 
Genislab builds better products and faster go-to-market with Lean project man...
Genislab builds better products and faster go-to-market with Lean project man...Genislab builds better products and faster go-to-market with Lean project man...
Genislab builds better products and faster go-to-market with Lean project man...
 
Assure Ecommerce and Retail Operations Uptime with ThousandEyes
Assure Ecommerce and Retail Operations Uptime with ThousandEyesAssure Ecommerce and Retail Operations Uptime with ThousandEyes
Assure Ecommerce and Retail Operations Uptime with ThousandEyes
 
[Webinar] SpiraTest - Setting New Standards in Quality Assurance
[Webinar] SpiraTest - Setting New Standards in Quality Assurance[Webinar] SpiraTest - Setting New Standards in Quality Assurance
[Webinar] SpiraTest - Setting New Standards in Quality Assurance
 
Passkey Providers and Enabling Portability: FIDO Paris Seminar.pptx
Passkey Providers and Enabling Portability: FIDO Paris Seminar.pptxPasskey Providers and Enabling Portability: FIDO Paris Seminar.pptx
Passkey Providers and Enabling Portability: FIDO Paris Seminar.pptx
 
Long journey of Ruby standard library at RubyConf AU 2024
Long journey of Ruby standard library at RubyConf AU 2024Long journey of Ruby standard library at RubyConf AU 2024
Long journey of Ruby standard library at RubyConf AU 2024
 
Connecting the Dots for Information Discovery.pdf
Connecting the Dots for Information Discovery.pdfConnecting the Dots for Information Discovery.pdf
Connecting the Dots for Information Discovery.pdf
 
Testing tools and AI - ideas what to try with some tool examples
Testing tools and AI - ideas what to try with some tool examplesTesting tools and AI - ideas what to try with some tool examples
Testing tools and AI - ideas what to try with some tool examples
 
TeamStation AI System Report LATAM IT Salaries 2024
TeamStation AI System Report LATAM IT Salaries 2024TeamStation AI System Report LATAM IT Salaries 2024
TeamStation AI System Report LATAM IT Salaries 2024
 
Time Series Foundation Models - current state and future directions
Time Series Foundation Models - current state and future directionsTime Series Foundation Models - current state and future directions
Time Series Foundation Models - current state and future directions
 
How AI, OpenAI, and ChatGPT impact business and software.
How AI, OpenAI, and ChatGPT impact business and software.How AI, OpenAI, and ChatGPT impact business and software.
How AI, OpenAI, and ChatGPT impact business and software.
 
Data governance with Unity Catalog Presentation
Data governance with Unity Catalog PresentationData governance with Unity Catalog Presentation
Data governance with Unity Catalog Presentation
 
The Role of FIDO in a Cyber Secure Netherlands: FIDO Paris Seminar.pptx
The Role of FIDO in a Cyber Secure Netherlands: FIDO Paris Seminar.pptxThe Role of FIDO in a Cyber Secure Netherlands: FIDO Paris Seminar.pptx
The Role of FIDO in a Cyber Secure Netherlands: FIDO Paris Seminar.pptx
 
The Future Roadmap for the Composable Data Stack - Wes McKinney - Data Counci...
The Future Roadmap for the Composable Data Stack - Wes McKinney - Data Counci...The Future Roadmap for the Composable Data Stack - Wes McKinney - Data Counci...
The Future Roadmap for the Composable Data Stack - Wes McKinney - Data Counci...
 
TrustArc Webinar - How to Build Consumer Trust Through Data Privacy
TrustArc Webinar - How to Build Consumer Trust Through Data PrivacyTrustArc Webinar - How to Build Consumer Trust Through Data Privacy
TrustArc Webinar - How to Build Consumer Trust Through Data Privacy
 
Sample pptx for embedding into website for demo
Sample pptx for embedding into website for demoSample pptx for embedding into website for demo
Sample pptx for embedding into website for demo
 
Transcript: New from BookNet Canada for 2024: Loan Stars - Tech Forum 2024
Transcript: New from BookNet Canada for 2024: Loan Stars - Tech Forum 2024Transcript: New from BookNet Canada for 2024: Loan Stars - Tech Forum 2024
Transcript: New from BookNet Canada for 2024: Loan Stars - Tech Forum 2024
 
From Family Reminiscence to Scholarly Archive .
From Family Reminiscence to Scholarly Archive .From Family Reminiscence to Scholarly Archive .
From Family Reminiscence to Scholarly Archive .
 
How to Effectively Monitor SD-WAN and SASE Environments with ThousandEyes
How to Effectively Monitor SD-WAN and SASE Environments with ThousandEyesHow to Effectively Monitor SD-WAN and SASE Environments with ThousandEyes
How to Effectively Monitor SD-WAN and SASE Environments with ThousandEyes
 

Parallel worlds of CRuby's GC

  • 1. Parallel worlds of CRuby's GC nari/Narihiro Nakamura/ @nari_en Network Applied Communication Laboratory Ltd. Parallel worlds of CRuby's GC Powered by Rabbit 0.9.3
  • 3. Today is my first presentation in English.
  • 4. My English is not good.
  • 5. But, I'll do my best. Please bear with me :)
  • 7.
  • 8.
  • 9. Ice-cream factory ✓ I worked in an assembly line ✓ For example, I made many cardboard boxes. ✓ I was a professional cardboard box maker :) 8/207 Parallel worlds of CRuby's GC Powered by Rabbit 0.9.3
  • 10. Ice-cream factory ✓ I made 150 boxes per hour (ZOMG) 9/207 Parallel worlds of CRuby's GC Powered by Rabbit 0.9.3
  • 11. I was like a machine!! http://www.flickr.com/photos/kevincollins123/5887984753/
  • 12.
  • 13.
  • 14. Working with Java ✓ I worked in a big company. ✓ This work was similar to assembly line work.. ✓ I made a part of a product. I didn't understand whole product. 13/207 Parallel worlds of CRuby's GC Powered by Rabbit 0.9.3
  • 15. I was still like a machine!! http://www.flickr.com/photos/kevincollins123/5887984753/
  • 16.
  • 17.
  • 18. My current work ✓ Currently, I work at NaCl. ✓ matz and shyouhei and takaokouji are my co-workers. ✓ shugo is my boss. ✓ They are CRuby committers. 17/207 Parallel worlds of CRuby's GC Powered by Rabbit 0.9.3
  • 19. When I started Ruby programming ✓ I felt free. ✓ This work wasn't similar to assembly line work. ✓ I could make the whole product. 18/207 Parallel worlds of CRuby's GC Powered by Rabbit 0.9.3
  • 20. I was no longer a machine!! http://www.flickr.com/photos/danzden/121379782/
  • 21.
  • 22. Garbage Collection for me ✓ GC technology is very interesting for me. ✓ GC is a garbage collecting machine. ✓ I've been creating it since then. It's very fun!! 21/207 Parallel worlds of CRuby's GC Powered by Rabbit 0.9.3
  • 23. I'm making a machine!!
  • 25. I'm a CRuby Committer ✓ I work on GC. 24/207 Parallel worlds of CRuby's GC Powered by Rabbit 0.9.3
  • 26. And, I wrote a book about GC.
  • 27. But, it's only in Japanese :(
  • 28. And, I've been creating GC with RDD.
  • 30. RDD = RubyKaigi Driven Development
  • 31. My RDD history ✓ LazySweepGC - RubyKaigi2008 ✓ LonglifeGC - 2009 ✓ LazySweepGC - 2010 ✓ ParallelMarkingGC - 2011 30/207 Parallel worlds of CRuby's GC Powered by Rabbit 0.9.3
  • 32. My RDD history ✓ LazySweepGC - RubyKaigi2008 ✓ LonglifeGC - 2009 ✓ LazySweepGC - 2010 ✓ ParallelMarkingGC - 2011 31/207 Parallel worlds of CRuby's GC Powered by Rabbit 0.9.3
  • 33. LonglifeGC ✓ It treats long-life objects as a special case. ✓ similar to Generational GC. ✓ LonglifeGC was rejected in CRuby 1.9.2 by some reason. ✓ :'( 32/207 Parallel worlds of CRuby's GC Powered by Rabbit 0.9.3
  • 34. But, LonglifeGC has been used in Kiji :-) http://www.flickr.com/photos/conifer/2389654222/
  • 35. Kiji ✓ Kiji is an optimized version of REE by Twitter developers. ✓ The twitter team substantially extended LonglifeGC. ✓ It's cool!! 34/207 Parallel worlds of CRuby's GC Powered by Rabbit 0.9.3
  • 36. But, Kiji will be rejected also... :'(
  • 37. My RDD history ✓ LazySweepGC - RubyKaigi2008 ✓ LonglifeGC - 2009 ✓ LazySweepGC - 2010 ✓ ParallelMarkingGC - 2011 36/207 Parallel worlds of CRuby's GC Powered by Rabbit 0.9.3
  • 38. LazySweepGC ✓ Traditional M&S GC executes mark and sweep atomically. ✓ Ruby application stops during GC (stop-the-world). ✓ In Lazy sweeping, sweeping is lazy. 37/207 Parallel worlds of CRuby's GC Powered by Rabbit 0.9.3
  • 39. LazySweepGC ✓ Each invocation of the object allocation sweeps Ruby's heap ✓ until it finds an appropriate free object. 38/207 Parallel worlds of CRuby's GC Powered by Rabbit 0.9.3
  • 40. Improvements ✓ This improves the response time of GC ✓ I.e. the worst case time of GC decreases. 39/207 Parallel worlds of CRuby's GC Powered by Rabbit 0.9.3
  • 41. LazySweepGC ✓ You can use LazySweepGC since Ruby 1.9.3 40/207 Parallel worlds of CRuby's GC Powered by Rabbit 0.9.3
  • 42. My RDD history ✓ LazySweepGC - RubyKaigi2008 ✓ LonglifeGC - 2009 ✓ LazySweepGC - 2010 ✓ ParallelMarkingGC - 2011 41/207 Parallel worlds of CRuby's GC Powered by Rabbit 0.9.3
  • 44. Today's topics ✓ Why do we need Parallel Marking? ✓ What to consider? ✓ How to implement? ✓ How much did performance improve? 43/207 Parallel worlds of CRuby's GC Powered by Rabbit 0.9.3
  • 45. Today's topics ✓ Why do we need Parallel Marking? ✓ What to consider? ✓ How to implement? ✓ How much did performance improve? 44/207 Parallel worlds of CRuby's GC Powered by Rabbit 0.9.3
  • 46. Why do we need Parallel Marking?
  • 47. This is CRuby's current GC.
  • 48. Current CRuby's GC ✓ GC operates on only 1 core. ✓ In multi-core environment, other cores don't help GC. 47/207 Parallel worlds of CRuby's GC Powered by Rabbit 0.9.3
  • 49. GC:"I'm alone, it's so hard." http://www.flickr.com/photos/hortont/2698261070/
  • 50. We should run GC in parallel!! http://www.flickr.com/photos/knallaerbse/2863161933/
  • 51. First, Let me explain a few GC related concepts.
  • 52. What is GC? ✓ GC collects all dead objects. 51/207 Parallel worlds of CRuby's GC Powered by Rabbit 0.9.3
  • 53. What is a dead object? ✓ A dead object is an object that is never referenced by the program. ✓ In GC terms, we say a that dead object is unreachable from Roots. 52/207 Parallel worlds of CRuby's GC Powered by Rabbit 0.9.3
  • 54. What is Roots? ✓ Roots is a set of pointers that directly reference objects in the program. ✓ e.g. Ruby's local variables, etc.. 53/207 Parallel worlds of CRuby's GC Powered by Rabbit 0.9.3
  • 55. For example 54/207 Parallel worlds of CRuby's GC Powered by Rabbit 0.9.3
  • 56. Please remember that ✓ GC collects objects that are unreachable from Roots. 55/207 Parallel worlds of CRuby's GC Powered by Rabbit 0.9.3
  • 57. Next, Let me explain the current CRuby GC algorithm.
  • 58. CRuby's GC algorithm summary ✓ CRuby adopts the Mark & Sweep algorithm ✓ Collector works in separate Mark and Sweep phases. 57/207 Parallel worlds of CRuby's GC Powered by Rabbit 0.9.3
  • 59. In the Mark phase ✓ collector marks live objects that are reachable from Roots. 58/207 Parallel worlds of CRuby's GC Powered by Rabbit 0.9.3
  • 60. For example 59/207 Parallel worlds of CRuby's GC Powered by Rabbit 0.9.3
  • 61. Mark phase with GC.start 60/207 Parallel worlds of CRuby's GC Powered by Rabbit 0.9.3
  • 62. Ruby Heap after marking 61/207 Parallel worlds of CRuby's GC Powered by Rabbit 0.9.3
  • 63. In the Sweep phase ✓ collector sweeps "dead" objects ✓ "dead" means unmarked ✓ "dead" means unreachable from Roots 62/207 Parallel worlds of CRuby's GC Powered by Rabbit 0.9.3
  • 64. Sweep phase 63/207 Parallel worlds of CRuby's GC Powered by Rabbit 0.9.3
  • 65. Characteristics of CRuby's GC
  • 66. Characteristics ✓ The stop-the-world algorithm ✓ Single thread execution 65/207 Parallel worlds of CRuby's GC Powered by Rabbit 0.9.3
  • 67. Recently, PC has multi-core processors. But, ✓ GC executes on a single thread. ✓ Other cores don't work during GC. ✓ What a waste!! 66/207 Parallel worlds of CRuby's GC Powered by Rabbit 0.9.3
  • 68. How can we fix this?
  • 70. What is Parallel Marking?
  • 71. What is Parallel Marking? ✓ Collector run several marking processes in parallel ✓ by using native threads. ✓ We will be happy on multi-core machine. 70/207 Parallel worlds of CRuby's GC Powered by Rabbit 0.9.3
  • 72. Flow diagram for Parallel Marking 71/207 Parallel worlds of CRuby's GC Powered by Rabbit 0.9.3
  • 73. BTW: Why not perform sweeping in parallel?
  • 74. Why not perform sweeping in parallel ✓ The sweeping is much faster than the marking. ✓ You can see ko1's research ✓ <URL:http://www.atdot.net/~ko1/ diary/201011.html#d4> 73/207 Parallel worlds of CRuby's GC Powered by Rabbit 0.9.3
  • 75. Why not perform sweeping in parallel ✓ So, Mark phase improvement = GC improvement ✓ And, we already have the lazy sweeping. 74/207 Parallel worlds of CRuby's GC Powered by Rabbit 0.9.3
  • 76. Today's topics ✓ Why do we need Parallel Marking? ✓ What to consider? ✓ How to implement? ✓ How much did performance improve? 75/207 Parallel worlds of CRuby's GC Powered by Rabbit 0.9.3
  • 77. What to consider when implementing Parallel Marking?
  • 78. We should consider two problems ✓ Workload balancing ✓ Wait-free algorithm 77/207 Parallel worlds of CRuby's GC Powered by Rabbit 0.9.3
  • 80. How can we divide the marking task into sub- tasks?
  • 81. I tried think about a simple approach.
  • 82. 1 branch of Roots is marked by 1 thread.
  • 83.
  • 84.
  • 85. This means.. ✓ Tasks are distributed to multiple threads. ✓ The task of marking the entire heap is divided into several tasks, each marking a single branch. 84/207 Parallel worlds of CRuby's GC Powered by Rabbit 0.9.3
  • 86. This seems to be no problem.
  • 87. But actually, this solution suffers from the workload problem.
  • 88. Each thread doesn't know what the other threads are doing.
  • 89. For instance, if A and B finishes work early,
  • 90. then, they will stop doing anything :(
  • 91. I think "machines should work forever" :D
  • 92. So, I think A and B should ...
  • 94. Parallel Marking with Task Stealing.
  • 95. If A and B finishes work early,
  • 96.
  • 97. This is called "Task Stealing"
  • 98. We should consider two problems ✓ Workload balancing ✓ Wait-free algorithm 97/207 Parallel worlds of CRuby's GC Powered by Rabbit 0.9.3
  • 100. What does "wait-free" mean? ✓ A wait-free program does non- blocking execution. ✓ It guarantees per-thread progress. 99/207 Parallel worlds of CRuby's GC Powered by Rabbit 0.9.3
  • 101. Why is wait-free important?
  • 103. Amdahl's law is used to find the maximum expected improvement to an overall system when only part of the system is improved. [cited from `Amdahl's law - Wikipedia'] 102/207 Parallel worlds of CRuby's GC Powered by Rabbit 0.9.3
  • 104. Amdahl's law is used in parallel computing ✓ If parallel portion of the system is X% ✓ And number of processors is Y, ✓ How much speedup can we expect? 103/207 Parallel worlds of CRuby's GC Powered by Rabbit 0.9.3
  • 105.
  • 106.
  • 107.
  • 108. It's worse than expected, right?
  • 110. The conclusion so far ✓ We should consider how we can efficiently balance workloads. ✓ So, we use Task Stealing. ✓ We should eliminate non-parallel parts ✓ by using wait-free algorithm. 109/207 Parallel worlds of CRuby's GC Powered by Rabbit 0.9.3
  • 111. Today's topics ✓ Why do we need Parallel Marking? ✓ What to consider? ✓ How to implement? ✓ How much did performance improve 110/207 Parallel worlds of CRuby's GC Powered by Rabbit 0.9.3
  • 113. Task Stealing ✓ In Task Stealing, threads steal tasks from each other ✓ Task Stealing is achieved with Arora's Deque 112/207 Parallel worlds of CRuby's GC Powered by Rabbit 0.9.3
  • 114. Arora's Deque ✓ Deque stands for the Double- Ended Queue. ✓ In Arora's Deque, the deque contains tasks as elements. ✓ It's a wait-free data structure. 113/207 Parallel worlds of CRuby's GC Powered by Rabbit 0.9.3
  • 115. Arora's Deque has only three operations.
  • 116.
  • 117.
  • 118.
  • 119. Each mark worker has a single deque.
  • 120. Only the owner can call pop() and push().
  • 121. Worker can call shift() to steal other workers' deque.
  • 122. "Hey wait a minute, doesn't shift() have contention problems?"
  • 123. In what ways could shift() cause contention problems? e.g... ✓ Multi-thread (workers) may call shift() of same deque at the same time. 122/207 Parallel worlds of CRuby's GC Powered by Rabbit 0.9.3
  • 124. In what ways could shift() cause contention problems? e.g... ✓ shift() and pop() could be called at the same time ✓ when deque has only one element. 123/207 Parallel worlds of CRuby's GC Powered by Rabbit 0.9.3
  • 125. But, Arora's Deque avoids these contention problems.
  • 126. Serialization ✓ shift() is serialized by using CAS. ✓ CAS = Compare And Swap ✓ And, this serialization doesn't use a lock. ✓ It's wait-free!! 125/207 Parallel worlds of CRuby's GC Powered by Rabbit 0.9.3
  • 127. I omit details of the implementation of the serialization.
  • 128. For the sake of this presentation, let's assume that Arora's Deque avoids contention problems.
  • 129. Summary for Arora's Deque ✓ A simple data structure for Task Stealing. ✓ Each worker has a single deque. ✓ Stealing (shift operation) is wait- free! 128/207 Parallel worlds of CRuby's GC Powered by Rabbit 0.9.3
  • 130. How to use Arora's Deque in Parallel Marking?
  • 131. First try: A task is an object.
  • 132. Let's say that worker A has a branch that is composed of 4 objects.
  • 133. We start by marking A and pushing it to the deque.
  • 134. pop A, mark B and C, push B and C.
  • 135. pop C, mark D, push D
  • 137. This is a branch marking.
  • 138. How do you steal?
  • 139. Suppose that worker1 has task B and C. Worker2 has no task.
  • 140. Worker2 steals task B on Worker1 by using shift().
  • 141. Summary ✓ Marker uses Arora's Deque as a marking stack. ✓ A "task" means an object. ✓ The granularity of the task is very fine. ✓ This is a naive implementation. 140/207 Parallel worlds of CRuby's GC Powered by Rabbit 0.9.3
  • 142. I implemented this approach.
  • 143. But..
  • 146. I fell into the Pitfalls of Parallel Processing (PPP!!!)
  • 148. Why slow? ✓ pop(),push(),shift() are called frequently. ✓ Because deque has fine-grained tasks. ✓ Their overhead is too big. 147/207 Parallel worlds of CRuby's GC Powered by Rabbit 0.9.3
  • 149. How to fix this?
  • 150. We can make the tasks less fine-grained.
  • 151. A task is a branch
  • 152. All branches in Roots are divided roughly among the deques.
  • 153. Each Worker marks a branch in its deque.
  • 154. When the deque is empty, the worker steals a branch from another worker.
  • 156. Good point & Bad point ✓ Number of calls to Deque's operations was reduced. ✓ Marking speed of the worker is improved. ✓ However, Coarse-grained tasks decrease parallelism. 155/207 Parallel worlds of CRuby's GC Powered by Rabbit 0.9.3
  • 157. Why do coarse-grained tasks decrease parallelism?
  • 158. Tasks may involve a large branch.
  • 159. If an object in B's branch has many child objects..
  • 160. .. then A can't steal it while B is marking the large branch.
  • 161. So, the worker needs to treat large branches as special cases.
  • 162. Almost all large branches hold large Array objects and/or large Hash objects.
  • 163. Treatment for large Array objects and Hash objects ✓ Each marker has a special deque to manage them. ✓ A marker divides them into fixed size tasks. ✓ e.g. 0-9 elements of Array, 10-19 elements of Array... 162/207 Parallel worlds of CRuby's GC Powered by Rabbit 0.9.3
  • 164. Treatment for Large Array and Hash ✓ By doing this, other workers can steal divided tasks. ✓ This improves parallelism. 163/207 Parallel worlds of CRuby's GC Powered by Rabbit 0.9.3
  • 165. Summary ✓ The naive implementation was slow. ✓ Grain of the task was too fine. ✓ A "task" means a branch in Roots ✓ Grain of the task is coarse. ✓ It's faster!! 164/207 Parallel worlds of CRuby's GC Powered by Rabbit 0.9.3
  • 166. Today's topics ✓ Why do we need Parallel Marking? ✓ What to consider? ✓ How to implement? ✓ How much did performance improve? 165/207 Parallel worlds of CRuby's GC Powered by Rabbit 0.9.3
  • 168. These are my machine specs ✓ My machine has only 2 cores ✓ Memory: 8GB ✓ OS: Linux 167/207 Parallel worlds of CRuby's GC Powered by Rabbit 0.9.3
  • 169. Parallel marking uses 4 marking threads.
  • 170. First benchmark program is ✓ make benchmark ✓ This is the benchmark which used in CRuby development 169/207 Parallel worlds of CRuby's GC Powered by Rabbit 0.9.3
  • 171.
  • 172. Why does this seem so slow? ✓ I think it's affected by Parallel Marking's preparation. ✓ e.g. creating marking threads, allocation of deques. 171/207 Parallel worlds of CRuby's GC Powered by Rabbit 0.9.3
  • 173. Why does this seem so slow? ✓ In most of the benchmarks, the mark target objects are few. ✓ In this case, Parallel Marking cost is expensive. 172/207 Parallel worlds of CRuby's GC Powered by Rabbit 0.9.3
  • 174. Next benchmark program is ✓ make rdoc ✓ make rdoc generates the Ruby documentation. ✓ This benchmark measures execution time and the GC execution time of make rdoc. 173/207 Parallel worlds of CRuby's GC Powered by Rabbit 0.9.3
  • 175. make rdoc ✓ It takes about 80 seconds on my machine. ✓ In fact, 30% of that time is spent on GC!! ✓ How much did performance improve? 174/207 Parallel worlds of CRuby's GC Powered by Rabbit 0.9.3
  • 176.
  • 177. All GC time is improved by 40%!
  • 179. In many core environment ✓ I expect we get a large improvement. ✓ e.g. 8 core, 16 core... ✓ But, my machine has just 2 cores. ✓ I can't see it :( 178/207 Parallel worlds of CRuby's GC Powered by Rabbit 0.9.3
  • 180. Best case for Parallel GC ✓ If the objects are many. ✓ In this case, mark targets is also many. ✓ If the objects are long-lived. ✓ Server-side application? 179/207 Parallel worlds of CRuby's GC Powered by Rabbit 0.9.3
  • 181. Demo
  • 182. Demonstration ✓ I want to show the performance improvement with Parallel GC. ✓ This demonstration is video game style. 181/207 Parallel worlds of CRuby's GC Powered by Rabbit 0.9.3
  • 183. Let me explain about this game.
  • 186. the character loses HP while waiting for the GC to finish.
  • 187. We must reach the goal before HP run out.
  • 188. Other characteristics of SUPER NARIO GC ✓ GC is running in fixed intervals. ✓ A lot of objects are generated to increase GC's burden. ✓ Burden = Game Level 187/207 Parallel worlds of CRuby's GC Powered by Rabbit 0.9.3
  • 189. Try to compare Original GC and Parallel GC ✓ Original GC pause time is long. ✓ This game will be difficult. ✓ Parallel GC pause time is short. ✓ This game will be easy. 188/207 Parallel worlds of CRuby's GC Powered by Rabbit 0.9.3
  • 196.
  • 197. Fast!!
  • 199. Windows OS is not supported ✓ Mark Worker uses pthread as native thread. ✓ And, uses some gcc built-in functions. ✓ But, I'll support for Windows eventually. 198/207 Parallel worlds of CRuby's GC Powered by Rabbit 0.9.3
  • 200. Increased memory usage. ✓ Size of 1 Deque is roughly 32KB. ✓ But generally multi-core machine have plenty of memory. ✓ So, I think it's OK :P 199/207 Parallel worlds of CRuby's GC Powered by Rabbit 0.9.3
  • 202. Conclusion ✓ I implemented Parallel Marking GC ✓ GC was improved! ✓ I'll report to ruby-core soon. 201/207 Parallel worlds of CRuby's GC Powered by Rabbit 0.9.3
  • 203. Conclusion ✓ But, Parallel Marking has some problems. ✓ I'll fix these. 202/207 Parallel worlds of CRuby's GC Powered by Rabbit 0.9.3
  • 204. source code ✓ Parallel Marking GC ✓ <URL:https://github.com/authorNari/ ruby/tree/pmark_div_root2> ✓ SUPER NARIO GC ✓ <URL:https://github.com/authorNari/ nario/> 203/207 Parallel worlds of CRuby's GC Powered by Rabbit 0.9.3
  • 205. Acknowledgments ✓ Following people helped me make this presentation!! ✓ Tor-san!! ✓ matz, shugo, yhara, sada, takaokouji, other co-workers!! 204/207 Parallel worlds of CRuby's GC Powered by Rabbit 0.9.3
  • 207. Do you have any questions? Please short and simple questions :)
  • 208. Sorry ✓ It's too difficult for me to understand/answer the question. ✓ Could be send the question on twitter(@nari_en)? 207/207 Parallel worlds of CRuby's GC Powered by Rabbit 0.9.3