LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Newbie (https://www.linuxquestions.org/questions/linux-newbie-8/)
-   -   Mysql and Apache configuration for busy Server ? (https://www.linuxquestions.org/questions/linux-newbie-8/mysql-and-apache-configuration-for-busy-server-866523/)

kshitiz 03-04-2011 09:02 PM

Mysql and Apache configuration for busy Server ?
 
Dear All,

I am pretty stuck with this thing.I need to tune the mysql and apache server for the comparatively busy webserver.My scenario is like this.

1. The Web request is around 2000 request at a time or more.
2. Each web request will generate one mysql query.
3. The query to database is all read.
4. This server load will be at peak for around 3-4 hours after that the load will subside. As the task will be published, around 300,000 will be viewing the page.

5 quad servers are deployed, load is balanced via DNS but performance is not as expected.
Centos 5.5 is used as OS.
Top command shows The mysql process is around 185%!!!

Please provide the viable solution.

salasi 03-05-2011 06:12 AM

I am sorry, but not only do I not have an answer for you, but what you have written is not quite clear enough:

Quote:

Originally Posted by kshitiz (Post 4279497)

1. The Web request is around 2000 request at a time or more.

are you saying that you have 2000 requests queued at one time, or something else?

Quote:

2. Each web request will generate one mysql query.
I think I am clear on what you mean, but:
  • is there any other software involved (eg, a CMS, php, etc, etc)?
  • are there many, many different queries, or there many of the queries repeats?

Quote:

As the task will be published, around 300,000 will be viewing the page.
I don't know what that means: what is publishing the task? A single page being viewed by 300,000 viewers? how does that relate to the 2000 number earlier?

kshitiz 03-05-2011 08:03 AM

Dear Salasi,
Thanks for your response.

1. The 2000 connections is the number of connection/sec as shown by the server-status handler of apache.
It is not the exact, but from the past experience the number of user logging at a time is around 1000-2000/sec.

2. No CMS, No PHP its simple html. Here user will provide some text token given to them and they will get the result by querying the database. Therefor one web request will generate just one query.

3. On overall time span which is around 5-7 hours of publication, the servers will have their peak load. And the target users number is around 300,000.


Waiting for your reply.
Regards.
Kshitiz

salasi 03-06-2011 08:34 AM

Quote:

Originally Posted by kshitiz (Post 4279771)

2. No CMS, No PHP its simple html. Here user will provide some text token given to them and they will get the result by querying the database. Therefor one web request will generate just one query.

OK, I'll guess that there are a small number of unique pages that can be generated, or are likely to be requested at any one time, in which case you could consider using something like squid in httpd accelerator mode. There may also be configuration directives with your webserver that could help.

Quote:

3. On overall time span which is around 5-7 hours of publication, the servers will have their peak load. And the target users number is around 300,000.
When I thought that you might be using a CMS, I thought that I might know exactly what you meant by 'publication'. As you aren't, I can only think that you mean the first time that a piece of content is made available.


All times are GMT -5. The time now is 05:48 AM.