►
Description
Discussion for Chapter 12: Garbage Collection in MRI, JRuby, and Rubinius.
A
B
You
know
I
felt
kind
of
disconnected
to
jruby
and
rubinius
since
we're
not
using
it,
and
the
memory
group
has
done
a
lot
of
work
with
different
tactics
for
garbage
collection
to
reduce
memory
pressure,
so
sure
we've
been
playing
with
j.e
malik
and
the
nakiyoshi
fork
in
puma
right
now.
So
it
was
interesting
to
kind
of
think
about
the
work
we've
been
doing
recently
and
understanding
the
underpinnings
of
garbage
collection
within
ruby.
B
Even
you
know,
through
the
different
frameworks
and
once
again,
the
there
were
some
similarities
to
net,
with
the
way
that
they
were
talking
about
what
jay,
ruby
and
rabinius
doing
the
generational
garbage
collection.
So
because
that's
the
layout
that
does
it
okay.
A
B
A
Management,
that's
what
garbage
collection
is
all
about
here,
more
than
a
deal
more
than
I
guess
it
relates
to
my
daily
work.
Although
I
did
like
the
phrase,
I
think
it
was
somewhere
near
the
end,
maybe
in
the
summary
where
it
was
talking
about
how
garbage
collection
is
a
very
important
aspect
of
probably
any
programming
language,
but
it's
usually
one
of
the
least
understood
sort
of
undertop
aspects
of
it,
especially
when
you're,
like
you
know,
you
go
to
learn
ruby
online,
like
they're,
not
going
to
teach
you
garbage
collection.
A
First,
it's
like
here's
how
to
like
write
some
code
and
make
something
work
so
yeah,
it's
kind
of
it
was
nice,
nice
and
eye-opening.
I
guess
from
my
perspective
to
understand
that
you
know
the
garbage
collector
isn't
just
like
going
through
your
program
every
every
now
and
then
to
like
find
things
so
they
can
reap.
A
But
it's
actually
the
thing
that
is
responsible
for
allocating
the
memory
in
the
first
place,
which
makes
a
lot
of
sense,
because
then
it
knows
where
your
memory
is
and
what
it's
put
in
there
and
then
it
can
go
through
and
kind
of
mark
things
as
being
used
or
not
used
and
sweep
it
up
so
yeah.
That
was
really
that
was
really
kind
of
something
new.
That
I
learned
is
that
it
does
both
those
things
which
makes
a
lot
of
sense,
but.
B
Mri
blocks
execution,
there's
no
at
least
from
what
I
recall,
but
there's
no
concept
of
concurrent
which
jruby
and
robinius
had,
and
they
even
admitted
that
it's
slow
doing
garbage
collection,
so
it
just
it
makes
you
wonder,
like
do
people
really
push
ruby
to
scale
to
to
the
point
where
they'll
see
some
of
the
bottlenecks
that
garbage
collection
and
if
they
do
it,
is
that
the
point
where
they
jump
to
another
language,
or
do
they
perhaps
jump
over
to
jay,
ruby
or
rubinius
at
that
point
in
time?
B
What's
the
what's
the
failover
point
for
people
when
they
run
into
these
garbage
collections,
or
do
they
even
know
that
it's
a
garbage
collection
problem
once
they
get
to
that
level?
They
just
see
that
ruby's
not
working
for
them
anymore
and
they
need
to
move
to
whatever
hot
language
is
at
the
time.
A
Yeah
yeah,
that's
a
fair
point
because
I
feel
like
there
have
been
a
lot
of.
I
don't
know,
naysayers,
I
suppose,
of
ruby
and
ruby
on
rails
for
some
of
its
performance
aspects,
and
how
much
of
that
is.
You
know,
memory
management
of
let's
say
how
rails
is
allocating
things
itself,
which
maybe
a
lot
of
developers
can't
directly
influence
versus.
I
guess
how
their
code
is
managing
memory
on
its
own.
A
I
think
there
was
a
point
in
here
where
it
said
like
it's
far
better
to
try
to
fine-tune
the
memory
management
of
your
application
before
you
start
worrying
about
increasing
your
memory
size
or
trying
to
go
concurrent
or
all
these
other
things
like
that,
if
your
application
is
just
under
performance
and
how
it
deals
with
allocating
you
know,
lots
of
objects
like
you're,
probably
in
hot
water,
no
matter
where
you
take
it.
Yeah.
A
That's
the
cheapest
way
to
go
right,
yeah,
it
kind
of
reminded
me
of
a.
I
think
it
was
an
issue
maybe
opened
by
camille
earlier
this
week
or
maybe
last
week
where
he
was.
He
was
looking
at
doing
string
concatenation.
So
there
was
lots
of
places
in
the
code
base
where
he
found
that
somebody
would
have
a
string
and
then
they
would
say.
Okay,
now
the
string
plus
equals
this
other
string
versus
saying
this
string,
dot,
concat,
other
string
or
string.
A
You
know,
there's
a
double
left
bracket,
left,
angle,
bracket,
other
string,
yeah,
chevron,
type
thing
yeah
and
the
memory
management
there,
because
in
the
plus
equals
you're
creating
a
brand
new
object
every
time
so
you're
taking
an
existing
object,
making
a
new
object
and
adding
you
know
the
two
things
together.
Maybe
even
third
object,
I
don't
know,
but
the
memory
allocation
was
like
10
times
more
or
something
for
that
approach
like
it.
Just
just
didn't.
Even
compare
like
the
concatenation
was
just
like.
B
A
Yeah
and
I
just
realized-
I'm
not
taking
any
notes
the
last
one,
nobody
will
notice
yeah,
that's
fine!
So
let's
see
chapter
11
and
12
related
11
and
12
together.
A
A
A
B
A
Yeah
so
let's
see
the
string
plus
equals.
A
A
Difference
yeah,
it's
pretty
wild
when
you
think
about
it
and
that's
only
a
thousand
times
like
that's,
not
even
you
know
a
million
times
like
they
were
doing
some
or
what
10
million
times.
I
think
they
did
in
this
garbage
collection.
Chapter
they'd
do
something
like
10
million
times
just
to
see
it
yeah.
A
A
Yeah
but
yeah
without
reading
this
chapter,
I
wouldn't
really
understand
you
know
I
wouldn't
have
I've
understood
as
well.
I
guess
like
how
easily
that's
you
know.
That's
adding
a
whole
bunch
of
objects
into
the
space
that
are
currently
like
new
referenced
objects
or
whatever
versus
garbage.
Collectible
objects.
Yeah.
B
A
Yeah,
what
was
that
number?
I
think
it
was
40
40.
B
A
Yeah
that
was
interesting
when
we
kind
of
got
to
the
the
j,
ruby
and
rubinius
section,
and
this
bump
allocation,
which
I
thought
like
that
seems
really
smart,
like
just
allocate
exactly
how
much
you
need,
and
you
keep
all
of
your
sort
of
memory-
pointers
for
a
specific
area
of
code
all
together,
so
they
can
be
cached
at
the
cpu
layer,
which
you
know
is
well
beyond
my
understanding
of
how
things
work.
A
So
it's
kind
of
just
like
messing
with
my
mind
in
general,
but
yeah,
the
idea
of
like
the
sort
of
young
objects
and
mature
objects,
and
then
I
think
jbm
even
had
this
like
permanent
type
space
where
it
said
like
these
objects,
are
just
gonna
live
forever
and
and
how
that
promotion
process
works,
and
like
does
that
mean
that
then
there's
essentially
three
or
four
or
five
different
segments
of
memory
allocation
all
going
on.
B
B
Yeah,
I
didn't
read
too
much
into
that.
I
think
I
was
blasting
through
that
part
thinking
all
right,
I'm
not
going
to
get
too
far
into
any
of
this,
because
we're
not
going
to
use
any
of
this
right.
B
A
Yeah,
so
they
do
talk
about
how
from
ruby
two
moving
forward
they're
using
more
generational,
concurrent,
garbage
collection
of
stuff
in
mri,
which
is
nice,
so
maybe
it
is
becoming
more
relevant.
I
was
kind
of
curious
about
that
as
well
like,
since
we're
now
entering
the
realm
of
mb
3.0
like
how.
How
much
farther
have
we
progressed
in
what
garbage
collection
looks
like
in
mri.
A
A
Nicholas
so
one
of
my
one
of
my
colleagues
in
growth
nicholas
duvar
dular,
he
suggested
it
and
I
don't
know
it
sounded
like
somebody
suggested
it
to
him,
or
he
just
thought.
It'd
be
a
good
idea
to
like
somebody
else's
thread
about
what
books
to
read
and
thought.
This
would
be
a
good
one
to
have
a
book
club
around.
B
A
A
A
You'll
have
to
you
have
to
troll
around
youtube
to
find
out.
I
guess.
B
All
right
man,
well
thanks
for
setting
this
up
and
moderating.