Performance/Rails/Launch/Hosting Question.

6 views
Skip to first unread message

jumph4x

unread,
Nov 6, 2009, 1:34:37 PM11/6/09
to Spree
Hey, this is a pretty relevant and valuable question to have answered
on the public usergroups.

I am preparing to purchase a server my company will be using to host
their ecommerce - a custom Spree installation. We want only the best.
We know all too well, how an extra second or two in loading can reduce
revenue.

Some very important things on can do that are well known include:
- Using Passenger on Apache
- Using Yahoo's YSlow (for Firefox) which includes, CDN, GZip
compression, javascript placement and all sorts of other optimization.

On the rails side, we can use caching of both layout segments, as well
as stylesheets and javascript files.

However, when it comes to processing ruby code in Rails as well as
heavy interaction with both MySQL (and in my case - PostgreSQL), what
is my best bet?

I figured one gig of DDR2 would be ample. So we might be getting 2
just in case. After a certain point, probably 512MBs, more ram will
only help with concurrency load handling, since the Passenger spawner
can create more children processes to reply to requests, but the
replies themselves wont be any faster.

So key here is clearly CPU speed. That is what will enable the server
to respond to requests quickly.

But where does rails stand within the whole Multi-core optimization
gig? Correct me if I am wrong, but:

- Rails is a single threaded processes
- Apache + Passenger can spawn multiple of these for different
clients*

* - meaning two users buy two things might be interacting with 2
instances of your application.

Does that make sense? Meaning going for a dual or a quad-core
processor with 2 or 4GBs of ram could be a very smart move in terms of
load\concurrency handling.
Reply all
Reply to author
Forward
0 new messages