Ruby on Rails Sunday, January 2, 2011

On 2 January 2011 01:57, gezope <gezope@gmail.com> wrote:
> Hi Colin and all,
>
> I had exactly the same here: 1GB RAM, Ubuntu, RVM with Ruby1.9 and
> Rails - and it's terribly slow comparing with the elder Ruby and Rails
> combo. Did you figured out anything?
>
> Also how did you speed up your server running? I already use Thin
> locally, and found it"s faster then Webrick, but still have to wait a
> lot after loading. Any trick?

I use mongrel. The server startup time is not really an issue for me
in development as starting the server is not something that happens
repeatedly. I don't know whether the response time once the server is
up and running is significantly different between 1.9.2 and 1.8.7, I
had not noticed an obvious difference. It is the test cycle time
particularly that is a pain. I use autotest and when I make a change
I have to wait while the tests get underway, which is tedious.

Colin

>
> Thanks,
> Zoli
>
> On 2010 dec. 30, 20:32, Conrad Taylor <conra...@gmail.com> wrote:
>> On Thu, Dec 30, 2010 at 7:59 AM, Colin Law <clan...@googlemail.com> wrote:
>> > On 29 December 2010 23:18, Conrad Taylor <conra...@gmail.com> wrote:
>> > > ...
>> > > Colin, do you have a sample application?  Next, it really depends
>> > > on your overall system and Rails app configuration.  For example,
>> > > if you don't have enough RAM, your system move data from memory
>> > > to the disk and vice-versa.  This is a huge performance hit.  Can you
>> > > provide more information?
>>
>> > I have 1GByte RAM and while running the test it shows less than half
>> > used and the disk is not rattling.  The processor shows 100%
>> > utilisation whilst the test is running, with rake being the process
>> > using most of it.
>>
>> > I have tried making a new rails 3.0.3 app
>> > rails new testruby
>> > then using rvm to switch between 1.8.7 p302 and 1.9.2 p136
>>
>> > On each ruby I ran
>> > time rake db:migrate
>> > a couple of times to let the disk cache settle out then for 1.8.7 I got
>> > real    0m2.111s
>> > user    0m1.804s
>> > sys     0m0.220s
>>
>> > and on 1.9.2
>> > real    0m4.098s
>> > user    0m3.512s
>> > sys     0m0.424s
>>
>> > I also tried rake test and got, on 1.8.7
>> > real    0m3.615s
>> > user    0m3.104s
>> > sys     0m0.316s
>>
>> > and on 1.9.2
>> > real    0m6.487s
>> > user    0m5.320s
>> > sys     0m0.684s
>>
>> > It seems as if 1.9.2 takes about twice as long for some reason.
>>
>> > Colin
>>
>> Colin, do you have a test case that I can run locally?  Or can you
>> tell me the specifics?  Next, I'm not sure that 1 GB RAM is sufficient
>> because other resources outside the actual application uses the RAM.
>> For example, on my slower machine, iMac, with 4 GB Ram, the RAM
>> utilization for some common applications are as follows:
>>
>> Safari 5       ~554.0 MB
>> Textmate      ~96.1 MB
>> Terminal       ~14.0 MB
>> Chrome        ~199.6 MB
>> Firefox         ~128.2 MB
>> and so on
>>
>> Note:  The above doesn't include any of the OS specific processes but
>> you can see that this adds up.  Also, most modern OS will reserve RAM
>> for its use that cannot be used by the end user.  Just something to keep
>> in mind.
>>
>> Lastly, in regards to running spec, I tend to use Ruby Spork gem because
>> anytime you do 'rake spec', the Rails framework needs to be loaded before
>> the application specific code can be executed.  This is also true when
>> running
>> 'rake db:migrate'
>>
>> Good luck,
>>
>> -Conrad
>>
>>
>>
>>
>>
>>
>>
>> > --
>> > You received this message because you are subscribed to the Google Groups
>> > "Ruby on Rails: Talk" group.
>> > To post to this group, send email to rubyonrails-talk@googlegroups.com.
>> > To unsubscribe from this group, send email to
>> > rubyonrails-talk+unsubscribe@googlegroups.com<rubyonrails-talk%2Bunsubscrib e@googlegroups.com>
>> > .
>> > For more options, visit this group at
>> >http://groups.google.com/group/rubyonrails-talk?hl=en.
>
> --
> You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group.
> To post to this group, send email to rubyonrails-talk@googlegroups.com.
> To unsubscribe from this group, send email to rubyonrails-talk+unsubscribe@googlegroups.com.
> For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en.
>
>

--
You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group.
To post to this group, send email to rubyonrails-talk@googlegroups.com.
To unsubscribe from this group, send email to rubyonrails-talk+unsubscribe@googlegroups.com.
For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en.

No comments:

Post a Comment