开发者

Database querying performance when using shared and dedicated hosting servers

开发者 https://www.devze.com 2023-02-19 02:28 出处:网络
I would like to know how many database requests per page view (that is, every page that an user browses will start multiple requests to retrieve data from the database) should be made in order to have

I would like to know how many database requests per page view (that is, every page that an user browses will start multiple requests to retrieve data from the database) should be made in order to have an "optimum" performance when I am using shared or dedicated 开发者_如何学Gohosting servers whose hardware is the most "commonly" provided (for example that that offer HostMonster or Bluehost providers). For both cases, I would like to know that when

  • I use MySQL or another database system
  • The database size is 1, 10, 100, 1000 Megabyte
  • I don't or I do use cache optimization
  • Users browsing pages are 10, 100, 1000, 10000 per second

In few word, under what conditions (considering the above cases) the server will begin to slow down and the user experience will be affected in a negative way? I appreciate some statistics...

P.S.: At this time I am using Ruby on Rails 3, so it is "easy" to increase requests!


I've had Facebook apps hosted on a shared host that did about a million pages per month without too many issues. I generally did 5-8 queries per page request. The number of queries isn't usually the issue, it's how long each query takes. You can have a small data set that is poorly indexed and you'll start having issue. The hosting provider usually kills your query after a certain length of time.

If you are causing the CPU on the server to spike, for whatever reason, then they may start killing processes on you. That is usually the issue.

0

精彩评论

暂无评论...
验证码 换一张
取 消

关注公众号