On Dec 13, 2011, at 1:34 PM, danm wrote:

> A meaty issue for the networking gurus out there.  I am using my
> development and production environments over a VPN that I have set up
> between two office locations.  The issue is that my production
> application instance runs as fast as I could want, but the development
> environment is extremely slow, like "click a link and get some coffee"
> slow.  Both instances are plain vanilla from the manual, they both run
> on Ubuntu 10.04LTS and both use a MySQL back end.  The main difference
> is that the development instance runs on a WebBrick server and the
> Production instance runs on Apache2 with Passenger Phusion.  All of
> the servers are on the same subnet and in fact, the boxes sit right
> next to each other on the same Gigabit bridge.  The development
> database is actually on a separate machine from the web server whereas
> the Production Web Server and Database run on separate Virtual
> Machines on the same server.  The real nub is that when I am on the
> same subnet, I can hardly tell the difference between the two
> instances - they run pretty much at the same speed.  It's only when I
> am running on a separate subnet over the VPN that the performance
> difference is so drastic.
> 
> Any ideas?  Does WebBrick send out a lot more data to the browser than
> Apache?  I run the development instance (Rails Server) in a terminal
> in the foreground on the development box so I can see the log file
> when I need to and kill the server easily.  Should I run it in the
> background?  Is there any communication between the browser and the
> foreground process?  I'm just trying to figure out what is being sent
> over the VPN since that seems to be the bottleneck.
----
the difference is almost certainly caching... Rails_env production uses caching 
and rails_env development does not. The reasons for this should become evident 
to anyone developing on rails for any period of time.

Suggest that instead of trying to force your html sessions through the VPN 
tunnel, use a remote desktop like freenx.
You install freenx server somewhere on that remote office and get the free 
client from nomachine.com and you can then run firefox on the remote end and 
they will run at roughly the same speed (let alone the obvious benefits to 
trying to make code changes remotely).

Craig

-- 
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+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/rubyonrails-talk?hl=en.

Reply via email to