Gmail Calendar Documents Reader Web more »
Recently Visited Groups | Help | Sign in
Google Groups Home
Shared memory with vendor/rails
There are currently too many topics in this group that display first. To make this topic appear first, remove this option from another topic.
There was an error processing your request. Please try again.
flag
  5 messages - Collapse all  -  Translate all to Translated (View all originals)
The group you are posting to is a Usenet group. Messages posted to this group will make your email address visible to anyone on the Internet.
Your reply message has not been sent.
Your post was successful
 
From:
To:
Cc:
Followup To:
Add Cc | Add Followup-to | Edit Subject
Subject:
Validation:
For verification purposes please type the characters you see in the picture below or the numbers you hear by clicking the accessibility icon. Listen and type the numbers you hear
 
Trevor Turk  
View profile  
 More options Nov 18 2008, 2:12 pm
From: Trevor Turk <trevort...@gmail.com>
Date: Tue, 18 Nov 2008 11:12:23 -0800 (PST)
Local: Tues, Nov 18 2008 2:12 pm
Subject: Shared memory with vendor/rails
I've just started using REE in production, and I couldn't be happier.
I'm trying to get the most out of the memory savings, though, and I'm
not clear on some points.

The way I read it, REE would be able to share the Rails code between
different applications provided that they use the same gem version of
Rails. Is that right? If I have 3 apps all using Rails 2.1 (or
whatever), are they able to save memory by sharing the code from that
gem?

Then, as a follow-up, what if you're using a frozen copy of Rails in
vendor/rails? My guess would be that a single application can share
the Rails code found in vendor/rails, but that this copy of Rails
would not be shared between applications.

Can you explain this in a bit more detail, or point me to a place that
explains this? I'm sorry to be a bother, but I just haven't been able
to determine the details of how this works.

Thanks,
- Trevor


    Reply to author    Forward  
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
David Welton  
View profile  
 More options Nov 18 2008, 3:38 pm
From: "David Welton" <davidnwel...@gmail.com>
Date: Tue, 18 Nov 2008 21:38:53 +0100
Local: Tues, Nov 18 2008 3:38 pm
Subject: Re: Shared memory with vendor/rails

> Can you explain this in a bit more detail, or point me to a place that
> explains this? I'm sorry to be a bother, but I just haven't been able
> to determine the details of how this works.

http://en.wikipedia.org/wiki/Copy-on-write

Basically, you load up several copies of the code, and in the parts
where they don't differ, they share memory.  If all your copies of
Rails reference a string "FOOBAR" for instance, they might as well all
keep it in the same memory on your computer as long as they're only
reading from it.  If one writes to it, changing it, that means that it
has to now keep a separate copy, because it's now different from the
other copies.

--
David N. Welton

http://www.welton.it/davidw/

http://www.dedasys.com/


    Reply to author    Forward  
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
Hongli Lai  
View profile  
 More options Nov 18 2008, 3:57 pm
From: Hongli Lai <hon...@phusion.nl>
Date: Tue, 18 Nov 2008 21:57:58 +0100
Local: Tues, Nov 18 2008 3:57 pm
Subject: Re: Shared memory with vendor/rails

Trevor Turk wrote:
> Then, as a follow-up, what if you're using a frozen copy of Rails in
> vendor/rails? My guess would be that a single application can share
> the Rails code found in vendor/rails, but that this copy of Rails
> would not be shared between applications.

This is correct. There's no way to fix this. If you vendor Rails, then
the framework memory won't be shared between different applications
(though each application instance still shares memory with other
instances of the same application).

No way to solve this, other than not vendoring Rails.

--
Phusion | The Computer Science Company

Web: http://www.phusion.nl/
E-mail: i...@phusion.nl
Chamber of commerce no: 08173483 (The Netherlands)


    Reply to author    Forward  
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
Trevor Turk  
View profile  
 More options Nov 18 2008, 5:00 pm
From: Trevor Turk <trevort...@gmail.com>
Date: Tue, 18 Nov 2008 14:00:10 -0800 (PST)
Local: Tues, Nov 18 2008 5:00 pm
Subject: Re: Shared memory with vendor/rails
On Nov 18, 2:57 pm, Hongli Lai <hon...@phusion.nl> wrote:

> If you vendor Rails, then
> the framework memory won't be shared between different applications
> (though each application instance still shares memory with other
> instances of the same application).

Thanks very much for your responses.

Just to clarify - please correct me if I'm wrong:

1) Multiple instances of the same application will share a gem OR
vendored version of Rails.
2) Multiple instances of different applications will share a gem
version of Rails, but NOT a vendored version of Rails (even if they're
the same version).

Thanks again,
- Trevor


    Reply to author    Forward  
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
Hongli Lai  
View profile  
 More options Nov 18 2008, 5:45 pm
From: Hongli Lai <hon...@phusion.nl>
Date: Tue, 18 Nov 2008 23:45:38 +0100
Local: Tues, Nov 18 2008 5:45 pm
Subject: Re: Shared memory with vendor/rails

Trevor Turk wrote:
> Thanks very much for your responses.

> Just to clarify - please correct me if I'm wrong:

> 1) Multiple instances of the same application will share a gem OR
> vendored version of Rails.
> 2) Multiple instances of different applications will share a gem
> version of Rails, but NOT a vendored version of Rails (even if they're
> the same version).

Correct.

--
Phusion | The Computer Science Company

Web: http://www.phusion.nl/
E-mail: i...@phusion.nl
Chamber of commerce no: 08173483 (The Netherlands)


    Reply to author    Forward  
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
End of messages
« Back to Discussions « Newer topic     Older topic »

Create a group - Google Groups - Google Home - Terms of Service - Privacy Policy
©2009 Google