Solved

Unix server slowness

Posted on 2006-07-03
6
422 Views
Last Modified: 2012-06-21
We are running our web site on a unix server running Solaris 2.9, Apache 2.055 and Coldfusion MX 7.0.1.
Our web server hosted on this unix machine has slowed way down with the process that serves coldfusion pages (jrun) hogging the CPU around 30-50% bringing our web server to a crawl. (below is a snapshot of the top CPU processes). Are there any unix or coldfusion commands that can get a specific look at exactly what is causing this slowness i.e. see a more specific job or code that is exactly causing these problems. Running top or prstat isn't helpful since we know Jrun is hogging the cpu but not which specific code or jobs.
Thank you!

327 root     201   0   10  551M  471M cpu/0   30.4H 44.23% jrun
21599 cbeverly   1   9    0 1864K 1296K cpu/1    0:00  0.41% top
4102 webapp    18  29   10  144M   63M sleep    2:39  0.02% java
21559 apache     1  59    0   10M 3728K sleep    0:00  0.02% httpd
21597 apache     1  59    0   10M 3096K sleep    0:00  0.02% httpd
21534 apache     1  59    0   10M 3792K sleep    0:00  0.02% httpd
21548 apache     1  59    0   10M 3760K sleep    0:00  0.02% httpd
21581 apache     1  59    0   10M 3640K sleep    0:00  0.02% httpd
21574 apache     1  59    0   10M 3640K sleep    0:00  0.02% httpd
21587 apache     1  59    0   10M 3632K sleep    0:00  0.01% httpd
21535 apache     1  59    0   10M 3792K sleep    0:00  0.01% httpd
21582 apache     1  59    0   10M 3656K sleep    0:00  0.01% httpd
21573 apache     1  59    0   10M 3632K sleep    0:00  0.01% httpd
21571 apache     1  59    0   10M 3776K sleep    0:00  0.00% httpd
0
Comment
Question by:cbeverly
6 Comments
 
LVL 38

Accepted Solution

by:
yuzh earned 125 total points
Comment Utility
You can try to use "top" or prstat or ""/usr/ucb/ps -uax | head -10"
to find out which process is eating the system resource, then use
"truss" to find out more details about the process.

man truss
to learn more details
0
 
LVL 1

Assisted Solution

by:shmukler
shmukler earned 125 total points
Comment Utility
Try to look with DTrace which is avaiable is a separate module for 2.9.

You might want to play with scripts from http://users.tpg.com.au/bdgcvb/dtrace.html or other script collections available on google.

Otherwise, so understand exactly, one has to use profiling tools.

It not easy to say what's wrong without getting the whole picture. DTrace can help to localize the problem, if you are using JRun for Java there is a document covering profiling JRun with OptimizeIt and such tools.
0
 
LVL 1

Assisted Solution

by:bengtbj
bengtbj earned 125 total points
Comment Utility
OK, it looks like your java engine is using up quite a lot of space and CPU time

The 2.39 is the amount of time on the kernel run queue, divided by two for every run queue cycle it has not been processed, something along those lines, and not really anything I could put in my answer here. 2.39 is not really bad, it just means it using a lot of CPU time (this depends off cause how long the java engine has been up as well). It might be worth to see if there are any other processes that are using up time, but remember that daemons are always on the run queue, so don’t get alarmed by finding syncd at a couple of hours, and don’t kill it, its job is to sync disks.

Also worth checking with normal performance tools such as iostat, vmstat, sar. Check Wait IO and page swapping, normally a good hint that something other then running low on CPU cycles. Also, if you have control over a test system, check to load the java application without any data, and then add just a bit of the data. Have seen java memory manager getting problems when building large tables or large number of objects. If that is the case I can’t help you much, not any good at java coding.
0
 
LVL 6

Assisted Solution

by:JJSmith
JJSmith earned 125 total points
Comment Utility

I don't see any real evidence that your 2 CPU's are under any pressure. I would suggest you may need to look to the other 'balancing' components of memory and/or disk I/O if you system is running slowly.

It may also be that your application is 'contending' for the same resources - even though you machine has plenty of spare, the 'app' threads may be blocking each others access to the same objects. ( forcing serialized processing instead of parallel ).

Cheers
JJ
0

Featured Post

What Security Threats Are You Missing?

Enhance your security with threat intelligence from the web. Get trending threat insights on hackers, exploits, and suspicious IP addresses delivered to your inbox with our free Cyber Daily.

Join & Write a Comment

In tuning file systems on the Solaris Operating System, changing some parameters of a file system usually destroys the data on it. For instance, changing the cache segment block size in the volume of a T3 requires that you delete the existing volu…
Using libpcap/Jpcap to capture and send packets on Solaris version (10/11) Library used: 1.      Libpcap (http://www.tcpdump.org) Version 1.2 2.      Jpcap(http://netresearch.ics.uci.edu/kfujii/Jpcap/doc/index.html) Version 0.6 Prerequisite: 1.      GCC …
Learn how to find files with the shell using the find and locate commands. Use locate to find a needle in a haystack.: With locate, check if the file still exists.: Use find to get the actual location of the file.:
This video shows how to set up a shell script to accept a positional parameter when called, pass that to a SQL script, accept the output from the statement back and then manipulate it in the Shell.

763 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

7 Experts available now in Live!

Get 1:1 Help Now