简体   繁体   中英

Database querying performance when using shared and dedicated hosting servers

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 hosting 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...

PS: 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.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM