LinuxQuestions.org
Help answer threads with 0 replies.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie
User Name
Password
Linux - Newbie This Linux forum is for members that are new to Linux.
Just starting out and have a question? If it is not in the man pages or the how-to's this is the place!

Notices


Reply
  Search this Thread
Old 06-30-2007, 12:21 AM   #1
karthi26
Member
 
Registered: Mar 2007
Posts: 62

Rep: Reputation: 15
capacity planning for the linux webserver


Hi guys,

I am running a tomcat 4.1.29 in the remote linux server. The no of user using this website was increased from 2000 to 5000 so the now the server goes down when large no of people accessing the website. i am running another tomcat 5.0.28 service for the testing and mysql 5.0.18 for the database. i came to here about the capacity planning for this linux server with your help.
The output of top cmd:

asks: 86 total, 1 running, 85 sleeping, 0 stopped, 0 zombie
Cpu(s): 1.6% us, 0.1% sy, 0.0% ni, 98.3% id, 0.0% wa, 0.0% hi, 0.0% si
Mem: 1034352k total, 1004184k used, 30168k free, 52608k buffers
Swap: 2048276k total, 451380k used, 1596896k free, 137248k cached

PID USER PR NI VIRT RES SHR S %CPU %MEM TIME+ COMMAND
1 root 16 0 1692 440 408 S 0.0 0.0 0:01.07 init
2 root RT 0 0 0 0 S 0.0 0.0 0:00.00 migration/0
3 root 34 19 0 0 0 S 0.0 0.0 0:00.00 ksoftirqd/0
4 root RT 0 0 0 0 S 0.0 0.0 0:00.00 migration/1
5 root 34 19 0 0 0 S 0.0 0.0 0:00.00 ksoftirqd/1
6 root RT 0 0 0 0 S 0.0 0.0 0:00.08 migration/2
7 root 34 19 0 0 0 S 0.0 0.0 0:00.00 ksoftirqd/2
8 root RT 0 0 0 0 S 0.0 0.0 0:00.01 migration/3
9 root 34 19 0 0 0 S 0.0 0.0 0:00.00 ksoftirqd/3
10 root 10 -5 0 0 0 S 0.0 0.0 0:00.00 events/0
11 root 10 -5 0 0 0 S 0.0 0.0 0:00.00 events/1
12 root 10 -5 0 0 0 S 0.0 0.0 0:00.00 events/2
13 root 10 -5 0 0 0 S 0.0 0.0 0:00.00 events/3
14 root 13 -5 0 0 0 S 0.0 0.0 0:00.00 khelper
15 root 10 -5 0 0 0 S 0.0 0.0 0:00.00 kthread
20 root 12 -5 0 0 0 S 0.0 0.0 0:00.00 kacpid
108 root 10 -5 0 0 0 S 0.0 0.0 0:00.00 kblockd/0

I think i have explained well. so plz kindly help me to figure out how to do the capacity planning and say your suggestion about the output.so it can be helpfull for me to proceed.

thank you guys in advance,
karthikeyan
 
Old 06-30-2007, 02:38 AM   #2
unSpawn
Moderator
 
Registered: May 2001
Posts: 29,415
Blog Entries: 55

Rep: Reputation: 3600Reputation: 3600Reputation: 3600Reputation: 3600Reputation: 3600Reputation: 3600Reputation: 3600Reputation: 3600Reputation: 3600Reputation: 3600Reputation: 3600
I think that before you go into any capacity planning you should thoroughly understand what you're dealing with. I hope these questions can serve as a lead for that:

You say "server goes down when large no of people accessing the website" but you don't show any client and server-side details about that. Does the server or the service become unresponsive or slow? (BTW, your 'top' output is partial as it only shows system processes.) Does it crash to the point where you have to power cycle it? What do the system logs say? What was done to the system to configure it to run with non-default values? Do you run any form of resource monitoring like Atsar or SAR? Do you run any form of service monitoring like Monit? You can run Tomcat but it's "just" a server. How is Tomcat configured? What does Tomcat serve? Is the .jar stuff production ready? Does it allow for (verbose or debug) logging to help TS this? How about placing a proxy in front of the webserver? Could that lighten the load?
 
Old 06-30-2007, 03:52 AM   #3
karthi26
Member
 
Registered: Mar 2007
Posts: 62

Original Poster
Rep: Reputation: 15
[root@admin ~]# cat /proc/cpuinfo
processor : 0
vendor_id : GenuineIntel
cpu family : 15
model : 4
model name : Intel(R) Xeon(TM) CPU 2.80GHz
stepping : 3
cpu MHz : 2801.912
cache size : 2048 KB
physical id : 0
siblings : 2
core id : 0
cpu cores : 1
fdiv_bug : no
hlt_bug : no
f00f_bug : no
coma_bug : no
fpu : yes
fpu_exception : yes
cpuid level : 5
wp : yes
flags : fpu vme de pse tsc msr pae mce cx8 apic mtrr pge mca cmov pat pse36 clflush dts acpi mmx fxsr sse sse2 ss ht tm pbe lm pni monitor ds_cpl cid cx16 xtpr
bogomips : 5554.17

processor : 1
vendor_id : GenuineIntel
cpu family : 15
model : 4
model name : Intel(R) Xeon(TM) CPU 2.80GHz
stepping : 3
cpu MHz : 2801.912
cache size : 2048 KB
physical id : 0
siblings : 2
core id : 0
cpu cores : 1
fdiv_bug : no
hlt_bug : no
f00f_bug : no
coma_bug : no
fpu : yes
fpu_exception : yes
cpuid level : 5
wp : yes
flags : fpu vme de pse tsc msr pae mce cx8 apic mtrr pge mca cmov pat pse36 clflush dts acpi mmx fxsr sse sse2 ss ht tm pbe lm pni monitor ds_cpl cid cx16 xtpr
bogomips : 5586.94

processor : 2
vendor_id : GenuineIntel
cpu family : 15
model : 4
model name : Intel(R) Xeon(TM) CPU 2.80GHz
stepping : 3
cpu MHz : 2801.912
cache size : 2048 KB
physical id : 3
siblings : 2
core id : 3
cpu cores : 1
fdiv_bug : no
hlt_bug : no
f00f_bug : no
coma_bug : no
fpu : yes
fpu_exception : yes
cpuid level : 5
wp : yes
flags : fpu vme de pse tsc msr pae mce cx8 apic mtrr pge mca cmov pat pse36 clflush dts acpi mmx fxsr sse sse2 ss ht tm pbe lm pni monitor ds_cpl cid cx16 xtpr
bogomips : 5586.94

processor : 3
vendor_id : GenuineIntel
cpu family : 15
model : 4
model name : Intel(R) Xeon(TM) CPU 2.80GHz
stepping : 3
cpu MHz : 2801.912
cache size : 2048 KB
physical id : 3
siblings : 2
core id : 3
cpu cores : 1
fdiv_bug : no
hlt_bug : no
f00f_bug : no
coma_bug : no
fpu : yes
fpu_exception : yes
cpuid level : 5
wp : yes
flags : fpu vme de pse tsc msr pae mce cx8 apic mtrr pge mca cmov pat pse36 clflush dts acpi mmx fxsr sse sse2 ss ht tm pbe lm pni monitor ds_cpl cid cx16 xtpr
bogomips : 5603.32


top cmd output

top - 10:02:09 up 5 days, 4:32, 1 user, load average: 0.22, 0.07, 0.02
Tasks: 87 total, 1 running, 86 sleeping, 0 stopped, 0 zombie
Cpu(s): 0.0% us, 0.0% sy, 0.0% ni, 100.0% id, 0.0% wa, 0.0% hi, 0.0% si
Mem: 1034352k total, 1018468k used, 15884k free, 139976k buffers
Swap: 2048276k total, 253956k used, 1794320k free, 178536k cached

PID USER PR NI VIRT RES SHR S %CPU %MEM TIME+ COMMAND
1 root 16 0 1692 544 476 S 0.0 0.1 0:01.44 init
2 root RT 0 0 0 0 S 0.0 0.0 0:00.04 migration/0
3 root 34 19 0 0 0 S 0.0 0.0 0:00.00 ksoftirqd/0
4 root RT 0 0 0 0 S 0.0 0.0 0:00.02 migration/1
5 root 34 19 0 0 0 S 0.0 0.0 0:00.00 ksoftirqd/1
6 root RT 0 0 0 0 S 0.0 0.0 0:20.41 migration/2
7 root 34 19 0 0 0 S 0.0 0.0 0:00.01 ksoftirqd/2
8 root RT 0 0 0 0 S 0.0 0.0 0:03.42 migration/3
9 root 34 19 0 0 0 S 0.0 0.0 0:00.11 ksoftirqd/3
10 root 10 -5 0 0 0 S 0.0 0.0 0:00.12 events/0
11 root 10 -5 0 0 0 S 0.0 0.0 0:00.00 events/1
12 root 10 -5 0 0 0 S 0.0 0.0 0:00.01 events/2
13 root 10 -5 0 0 0 S 0.0 0.0 0:00.03 events/3
14 root 12 -5 0 0 0 S 0.0 0.0 0:00.00 khelper
15 root 10 -5 0 0 0 S 0.0 0.0 0:00.00 kthread
20 root 13 -5 0 0 0 S 0.0 0.0 0:00.00 kacpid
110 root 10 -5 0 0 0 S 0.0 0.0 0:00.00 kblockd/0
111 root 10 -5 0 0 0 S 0.0 0.0 0:00.00 kblockd/1
112 root 10 -5 0 0 0 S 0.0 0.0 0:00.00 kblockd/2
113 root 10 -5 0 0 0 S 0.0 0.0 0:00.00 kblockd/3
116 root 15 0 0 0 0 S 0.0 0.0 0:00.00 khubd
177 root 15 0 0 0 0 S 0.0 0.0 0:00.78 pdflush
178 root 15 0 0 0 0 S 0.0 0.0 0:00.28 pdflush
179 root 15 0 0 0 0 S 0.0 0.0 0:06.29 kswapd0
180 root 11 -5 0 0 0 S 0.0 0.0 0:00.00 aio/0
181 root 11 -5 0 0 0 S 0.0 0.0 0:00.00 aio/1
182 root 12 -5 0 0 0 S 0.0 0.0 0:00.00 aio/2
183 root 12 -5 0 0 0 S 0.0 0.0 0:00.00 aio/3
271 root 15 0 0 0 0 S 0.0 0.0 0:00.25 kseriod
433 root 14 -5 0 0 0 S 0.0 0.0 0:00.00 ata/0
434 root 14 -5 0 0 0 S 0.0 0.0 0:00.00 ata/1
435 root 14 -5 0 0 0 S 0.0 0.0 0:00.00 ata/2


we don't have any monitoring tool in this server and the free space available in ram is [root@admin ~]# free
total used free shared buffers cached
Mem: 1034352 1021400 12952 0 137684 178488
-/+ buffers/cache: 705228 329124
Swap: 2048276 253956 1794320


can you help me to fix the problem why the system is getting slow. say what are the things i have to show you and just teach i am new to this topic and help me to solve this crirical position where this work is assigned to me to solve with in monday. please
 
Old 06-30-2007, 11:22 AM   #4
this213
Member
 
Registered: Dec 2001
Location: ./
Distribution: Fedora, CentOS, RHEL, Gentoo
Posts: 167

Rep: Reputation: 34
Let me see if I understand this correctly: You have a Quad Xeon 2.8 processor system with only 1GB of RAM? The money on those extra processors would have been better spent in some RAM chips. But that's beside the point.

Was the Tomcat server even running when you pulled that "top"? Try it again under load. If this was taken under normal operation, there should be something in /var/tomcat{v}/logs (unless that was changed to somewhere else) because you're not touching either RAM or processor here and only have 1 running process.

Quote:
Originally Posted by unSpawn
You say "server goes down when large no of people accessing the website" but you don't show any client and server-side details about that. Does the server or the service become unresponsive or slow? (BTW, your 'top' output is partial as it only shows system processes.) Does it crash to the point where you have to power cycle it? What do the system logs say? What was done to the system to configure it to run with non-default values? Do you run any form of resource monitoring like Atsar or SAR? Do you run any form of service monitoring like Monit? You can run Tomcat but it's "just" a server. How is Tomcat configured? What does Tomcat serve? Is the .jar stuff production ready? Does it allow for (verbose or debug) logging to help TS this? How about placing a proxy in front of the webserver? Could that lighten the load?
Try answering some of these and then maybe we can help you. Especially these three:
Does it crash to the point where you have to power cycle it?
What do the system logs say?
What was done to the system to configure it to run with non-default values?
 
  


Reply



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
windows/linux hard drive capacity Vensan Linux - Hardware 2 01-19-2007 10:39 AM
Planning OS migration but which linux eagle_y2j Linux - Newbie 17 05-23-2006 09:02 AM
mysql capacity in Linux Entreprise 3 leenuxius Linux - Enterprise 2 08-15-2004 11:59 PM
Planning Linux install on old Netserver ragboy Linux - Newbie 1 07-13-2001 11:59 PM
Planning Linux install on old Netserver ragboy Linux - Software 1 07-13-2001 11:33 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie

All times are GMT -5. The time now is 03:28 AM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration