If this is your first visit, be sure to check out the FAQ by clicking the link above. You may have to register before you can post: click the register link above to proceed. To start viewing messages, select the forum that you want to visit from the selection below.

 
Go Back  dBforums > Database Server Software > Informix > Bad server performance

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1 (permalink)  
Old 01-28-09, 06:43
mallik2004 mallik2004 is offline
Registered User
 
Join Date: Sep 2008
Posts: 33
Bad server performance

Hi Gurus,

I have a server with poor performance.I have checked the TOP and found that one of the process was taking 90% CPU time.I was unable to track that session with PID.I guess that might be unix process.Is there anyway we track the session using the PID of the process from top command.

Any Answers are greatly appreciated....


Thanks&&Regards
Mallik.
Reply With Quote
  #2 (permalink)  
Old 01-28-09, 09:30
stanislav.ondac stanislav.ondac is offline
Registered User
 
Join Date: Aug 2005
Posts: 140
What's the name of the process?
I dont understand why do you want to find out the corresponding informix session if you think its unix(not informix) process.
Reply With Quote
  #3 (permalink)  
Old 01-28-09, 09:36
mallik2004 mallik2004 is offline
Registered User
 
Join Date: Sep 2008
Posts: 33
Hi,

Am sorry that was informix process(oninit) but i am unable to trace that session.
Reply With Quote
  #4 (permalink)  
Old 01-28-09, 11:09
stanislav.ondac stanislav.ondac is offline
Registered User
 
Join Date: Aug 2005
Posts: 140
in onstat -g glo, find the process number of your process(column PID)-you get the virtual processor number and virtaul process class that are interesting for you.

in onstat -g ath - find the threads that are running on this virtual processor (column VP-CLASS).

Take the value of RSTC column for these threads(from onstat -g ath), and find the coresponding sessions in onstat -u (comparing the RSTC value with column ADDRESS)

hope this helps
Reply With Quote
  #5 (permalink)  
Old 02-06-09, 05:58
stanislav.ondac stanislav.ondac is offline
Registered User
 
Join Date: Aug 2005
Posts: 140
as i was thinking about that...it's not a good solution. Becasue thread from one session can run on several virtual processors(of course not at the same time). So I think if you have more VP of the same class... there is no direct way how to assign informix session to the operating system process number.
Reply With Quote
  #6 (permalink)  
Old 02-06-09, 06:20
mallik2004 mallik2004 is offline
Registered User
 
Join Date: Sep 2008
Posts: 33
HI stanislav,

Thanks for your reply,I have tried to find out but I could not trace that session bacause there were many VP's running in the same class.But if we can exactly figure out that session(which is taking 95% CPU time from top)that would really help me..

Regards
Mallik
Reply With Quote
  #7 (permalink)  
Old 02-06-09, 06:35
ceinma ceinma is offline
Registered User
 
Join Date: Apr 2007
Location: Jundiai / SP - Brasil
Posts: 311
Before the IDS 11.50 this kind of identification are very annoying and must be manually or with shell script...

In IDS 11.50 you can get the CPU utilization of each thread with command:
onstat -g cpu

Before this version, so far I know, you need to get a statical sample... something with this logical:

Code:
> act.out
i = 0
while i < 60
do
   onstat -g act | awk '/tid/,/^ *$/ { print $1 } ' | egrep -v "tid|^ *$" >> act.out
  i=$((i+1))
done 
cat act.out | sort -n | uniq -c  | sort -n
This code, are not exactly a shell, I just write the logic to get the thread where use more CPU.
The Idea above is repeat the commant "onstat -g act" 60 times and see who appear more time...
but, remember , you will get the thread number, you still need identificate the session id of this thread what can be do with this SQL:
Code:
select us_tid as tid , us_sid as sid , us_name as user from sysuserthreads
__________________
________________________________________
César Inacio Martins
Jundiai / SP - Brasil
http://www.imartins.com.br/informix - em Português
http://www.imartins.com.br/informix - English (translated by Google).
________________________________________
Reply With Quote
  #8 (permalink)  
Old 02-06-09, 06:55
mallik2004 mallik2004 is offline
Registered User
 
Join Date: Sep 2008
Posts: 33
Hi Cienma,

Thanks a ton!!!!!!!!!!!!!Will try to work out with this.

Regards-Mallik
Reply With Quote
  #9 (permalink)  
Old 02-06-09, 06:57
stanislav.ondac stanislav.ondac is offline
Registered User
 
Join Date: Aug 2005
Posts: 140
ceinma is right...and just for info,
you can idenfificate the session id from "onstat -g act" output also by comparing column "address" in "onstat - u" with column "rstcb" in "onstat -g act" (if they are user threads) ....as i mentioned before. So you don't have to use system tables.
Reply With Quote
Reply

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

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
Trackbacks are On
Pingbacks are On
Refbacks are On