Posts Topics Forums Images
Search videos from message boards Videos Search messages from microblogs Microblogs Search messages from imdb.com Imdb Search messages from yuku.com Yuku Search messages from lefora.com (free forums) Lefora
My account: Login | Sign Up
Loading... 

Thread: Server and MySQL Setup for High Traffic/Database Usage Site

Started 1 month, 4 weeks ago by beeker
Hi all, I'm having a tough time choosing the best route to go with this. I have a site that's expected to get about 500k unique visitors per day, with page views at around 600k. The traffic is split up like this: 94% - Just a script is being called which executes some MySQL and closes connection right away (<1 second). 5% - Users visiting the site for the first ...
Site: Dev Shed Forums - Open Source web development  Dev Shed Forums - Open Source web development - site profile
Forum: MySQL Help  MySQL Help - forum profile
Total authors: 3 authors
Total thread posts: 17 posts
Thread activity: no new posts during last week
Domain info for: devshed.com

Other posts in this thread:

sr replied 1 month, 4 weeks ago
The max_connections problem can be due to that connection pooling on your webserver is bad. It can very often leave stale connections. You will have to check this with SHOW PROCESSLIST during operation and if you have a lot of rows where the Command = Sleep and the Time value is high then you have this problem. What you can do get rid of these stale connections is to reduce ...

beeker replied 1 month, 3 weeks ago
Hi sr, Thanks for the response. I've been checking out the processes via phpMyAdmin ever since we had the 'Too many connections' error, and it's been perfect if any active processes do show when I check, they are gone immediately and nothing is stale. Also, the max. concurrent connections seems to be holding now at 32. We've been looking at different dedicated server ...

sr replied 1 month, 3 weeks ago
Good thing that you don't have a problem with stale mysql connections. The HW sounds good. The raw cpu power of that machine will be about 10 times faster than the P4 that you currently have (which you said didn't have a problem to keep up with the current load). As for the memory: How large is your database? The most optimal is if you can basically cache the entire ...

beeker replied 1 month, 3 weeks ago
I've been talking it over with my partner and we're afraid this may not be enough down the road. It's possible that we will be receiving way more than 500k page views per day, it may actually be closer to 1 mil very soon, and as more people join and use our site it could get much higher. The thing is we don't want to have to keep upgrading the server and have the possibility of ...

beeker replied 1 month, 3 weeks ago
I forgot to mention, one reason the database is so small currently is because all of the tables are using the MyISAM engine. If we do transfer over to multiple servers, we're thinking about having the master server tables running on the InnoDB engine, and have the slave replication servers all MyISAM. All writing and modification to the database will be done on the master server, and ...

sr replied 1 month, 3 weeks ago
I would recommend you to run InnoDB tables from the beginning. I think the advantages with row locking (too many high performance sites has had a problem with this on MyISAM tables, which locks the entire table), transactions and foreign keys are worth it. The main drawback in my opinion is the 3 times large footprint of the database on disk. But then again your database seems to ...

beeker replied 1 month, 3 weeks ago
Yeah I wish I would've started it off with InnoDB, but I was familiar with MyISAM not knowing the table locking and other issues. Luckily, the database is still small should it should be relatively painless converting it, setting up foreign keys and all that. Switching from MyISAM to InnoDB, should we expect any big changes in performance? I've seen benchmarks over at ...

sr replied 1 month, 3 weeks ago
I don't think you will notice any direct difference in performance between MyISAM and InnoDB. Very few does. And changing the tables to InnoDB is as easy as: Code: ALTER TABLE yourTable ENGINE=InnoDB; You don't even have to add the foreign keys if you don't want to. Granted it is an extra security from possible inconsistency in the database a lot of ...

beeker replied 1 month, 3 weeks ago
I had a conversation with the people over at Rackspace, very knowledgeable and friendly, and here's the set up we've decided on: A firewall, load balancer, and two of the servers I mentioned above but set to RAID 10. Apache and MySQL will be installed on both servers, with MySQL in a master/slave configuration. Two virtual IP addresses will be created for the load balancer - one ...

sr replied 1 month, 3 weeks ago
Ah, your going full out. Yes if you have customers lined up that can bring that kind of traffic from the beginning then it's probably the best. Small comment, RAID 10 is the top of the line choice for DB servers hence I'm guessing the suggestion from Rackspace. The thing is that your database is so small (even with the calculated growth) and in my opinion the overall ...

 

Top contributing authors

Name
Posts
sr
7
user's latest post:
Server and MySQL Setup for High...
Published (2009-11-12 13:51:00)
Quote: Originally Posted by srisa 20MB*365=730MB? My calculation says that it is 7300MB = 7GB+. google too seconds my calculation Of course, sorry about that! Yes it is larger but the entire DB will still fit within the 16GB RAM so it doesn't really change the argument that much.
beeker
6
user's latest post:
Server and MySQL Setup for High...
Published (2009-11-10 18:43:00)
I had a conversation with the people over at Rackspace, very knowledgeable and friendly, and here's the set up we've decided on: A firewall, load balancer, and two of the servers I mentioned above but set to RAID 10. Apache and MySQL will be installed on both servers, with MySQL in a master/slave configuration. Two virtual IP addresses will be created for the load balancer - one to direct Apache traffic and the other to direct all...
srisa
4
user's latest post:
Server and MySQL Setup for High...
Published (2009-11-12 12:27:00)
Quote: Originally Posted by sr And if we calculate 20MB * 365 = 730MB + 65MB gives that in a years time you should still not have broken the 1GB limit. 20MB*365=730MB? My calculation says that it is 7300MB = 7GB+. google too seconds my calculation [offtopic]If you serve just php pages from Apache, you can consider lighttpd. I am not a sys. admin but i have read that it is less resource intensive.[/offtopic] @beeker: All the best with all that...

Related threads on "Dev Shed Forums - Open Source web development":

Related threads on other sites:

Thread profile page for "Server and MySQL Setup for High Traffic/Database Usage Site" on http://www.devshed.com. This report page is a snippet summary view from a single thread "Server and MySQL Setup for High Traffic/Database Usage Site", located on the Message Board at http://www.devshed.com. This thread profile page shows the thread statistics for: Total Authors, Total Thread Posts, and Thread Activity