Unix Technical Forum

SEO

vBulletin Search Engine Optimization


Go Back   Unix Technical Forum > Unix Operating Systems > HP-UX Operating System

Register FAQ Members List Calendar Search Today's Posts Mark Forums Read
  #1 (permalink)  
Old 01-16-2008, 05:34 PM
Irfan Bondre
 
Posts: n/a
Default High kernel time while reusing the same socket?

Our product uses distributed computing to share load among various
servers.
The main server receices requests for client and dispatches them to
the worker server for doing the actual work.

The main server does connection pooling with the worker server to
avoid recreating the connection.

We see very high kernel time when we reuse the same connection.

However, if we close the connection after every request to the worker
server and that forces it ot open new connection for every request
than the main server show very low kernel time.

This kernel time avoids us from pushing the main server to receive
more request even when the total cpu usage is only 60%


Any tool we would use to figure out the reason for the high kernel
time.

Do we need to set any socket option.

Any Suggestins why that would happen.

It happens on HP-UX 11.00 and 11i
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #2 (permalink)  
Old 01-16-2008, 05:34 PM
Rick Jones
 
Posts: n/a
Default Re: High kernel time while reusing the same socket?

When you reuse connections, do you see more work being done?

You might consider using prospect (I think there is a copy on the dspp
site, if not, then ftp.cup.hp.com under dist/networking/tools/) to get
a combined profile of your application and the kernel at the same
time.

rick jones
--
oxymoron n, commuter in a gas-guzzling luxury SUV with an American flag
these opinions are mine, all mine; HP might not want them anyway...
feel free to post, OR email to raj in cup.hp.com but NOT BOTH...
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #3 (permalink)  
Old 01-16-2008, 05:38 PM
Irfan Bondre
 
Posts: n/a
Default Re: High kernel time while reusing the same socket?

Our System has 4 CPUs.
If we reuse the connection, the throughput drastically drops. As all
CPUs cannot be fully utilize.

However, if open a new connection for each communication. Then I can
max out the CPUs and throughput is much better.

So No, if we reuse the connection less work is actually done.

I will try to run prospect.

Thanks For the help.

Rick Jones <foo@bar.baz.invalid> wrote in message news:<j3mNb.12394$qA4.7257@news.cpqcorp.net>...
> When you reuse connections, do you see more work being done?
>
> You might consider using prospect (I think there is a copy on the dspp
> site, if not, then ftp.cup.hp.com under dist/networking/tools/) to get
> a combined profile of your application and the kernel at the same
> time.
>
> rick jones

Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #4 (permalink)  
Old 01-16-2008, 05:39 PM
Irfan Bondre
 
Posts: n/a
Default Re: High kernel time while reusing the same socket?

The output from prospect is attached below for both the cases
1. When the connection is closed right away after every request.
2. If the connection is polled, however, since http 1.0 is used the
other end closes the connection and this node determines that when
reusing the socket and verifies that its already closed.

My Cluster is made up of HP-UX node which does the forwarding and
windows nodes which does the actual work of processing the data and
stuff. I am concerned about the HP node, which takes up too much
kernel time in CASE 2 described above.

================================================== ===========================
The prospect output when the socket kept open so that it can be
reused....


encycsrvr7 (07388)NM Birth (pre-exist) ps:=
(/actu01/ibondre/DEV040120/AcServer/bin/encycs
rvr7 -Spmd -Q81)
Process did not END - use last SLEEP

First execution after benchmark start = -0.000 Seconds

KI Elapsed Time = 60.023909 100.000% Total
KTC Elapsed Time = 196.386652 327.181% Total
KTC Run Time = 60.068209 30.587%
KTC Not Charged Time = 136.318444 69.413%

Sorted List of SPUs Used for this Process: [(0:41%), (3:22%), (2:21%),
(1:15%)]

-------------------------------------------------------------------------------
Section 1.0: Sorted Execution+Blocked=Elapsed Clocks for this Process,
EPB
-------------------------------------------------------------------------------
Clock Type Seconds % Elapsed uSec/Count
Counts

ELAPSED TOTAL 60.068209 100.000% Total
EXECUTION TOTAL 57.401422 95.560% Total
Execution Sys 29.720966 49.479% 83.7
355107
Execution UseR 19.771522 32.915% 14.6
1350200
Execution CsW 3.099385 5.160% 3.2
960013
BLOCKED TOTAL 2.666787 4.440% 844.7
3157
Execution IntSys 2.589765 4.311% 94.2
27498
Blocked misc 2.164232 3.603% 1372.4
1577
Execution IntUseR 2.155384 3.588% 75.4
28568
Blocked PreempT 0.502555 0.837% 318.1
1580
Execution TraP 0.063200 0.105% 9.7
6503
Execution VfaulT 0.001200 0.002% 133.4
9

-------------------------------------------------------------------------------
Section 1.1: Time Process Executed during System Calls
-------------------------------------------------------------------------------
TOTAL Sys 29.720966 100.000% 83.7
355107
write Sys 2.792251 9.395% 14.0
199533
read Sys 1.695414 5.704% 39.4
43019
poll Sys 1.157552 3.895% 19.5
59297
close Sys 0.559656 1.883% 103.7
5398
accept Sys 0.535603 1.802% 99.1
5407
lwp_create Sys 0.226134 0.761% 41.8
5407
lwp_detached_exit Sys 0.144207 0.485% 26.7
5392
recv Sys 0.132989 0.447% 12.3
10816
ioctl Sys 0.098347 0.331% 9.1
10814
gettimeofday Sys 0.063984 0.215% 5.8
10966
sched_yield Sys 0.055425 0.186% 18.6
2973
ksleep Sys 0.016261 0.055% 43.2
376
kwakeup Sys 0.006200 0.021% 30.5
203
time Sys 0.004303 0.014% 6.8
637
sigtimedwait Sys 0.002511 0.008% 33.9
74
clock_gettime Sys 0.001374 0.005% 8.2
167
- Skip remainder, SPU of 0.0005 is below '-m 0.0010' Sec

-------------------------------------------------------------------------------
Section 1.2: Time Process Preempted in System Calls
-------------------------------------------------------------------------------
TOTAL PreempT 0.502555 100.000% 318.1
1580
poll PreempT 0.232173 46.199% 240.6
965
recv PreempT 0.179577 35.733% 1026.2
175
write PreempT 0.025858 5.145% 114.9
225
kwakeup PreempT 0.017337 3.450% 4334.2
4
read PreempT 0.016161 3.216% 256.5
63
ioctl PreempT 0.013858 2.757% 533.0
26
sigtimedwait PreempT 0.004531 0.902% 453.1
10
gettimeofday PreempT 0.003971 0.790% 152.7
26
lwp_create PreempT 0.003628 0.722% 181.4
20
ksleep PreempT 0.001939 0.386% 121.2
16
close PreempT 0.001631 0.325% 81.6
20
- Skip remainder, SPU of 0.0008 is below '-m 0.0010' Sec

-------------------------------------------------------------------------------
Section 1.3: Time Process Blocked
-------------------------------------------------------------------------------
TOTAL BlockeD 2.666787 100.000% 844.7
3157
poll BlockeD 2.002994 75.109% 2101.8
953
Preempt PreempT 0.502555 18.845% 318.1
1580
recv BlockeD 0.068728 2.577% 384.0
179
write BlockeD 0.046070 1.728% 202.1
228
ksleep BlockeD 0.034905 1.309% 2181.6
16
ioctl BlockeD 0.014497 0.544% 536.9
27
sigtimedwait BlockeD 0.013226 0.496% 1322.6
10
accept BlockeD 0.004590 0.172% 327.8
14
- Skip remainder, SPU of 0.0010 is below '-m 0.0010' Sec




================================================== ===========================
================================================== ===========================
The prospect output when the socket is closed after every request is
as follows.


encycsrvr7 (07410)NM Birth (pre-exist) ps:=
(/actu01/ibondre/DEV040120/AcServer/bin/encycs
rvr7 -Spmd -Q81)
Process did not END - use last SLEEP

First execution after benchmark start = 0.003 Seconds

KI Elapsed Time = 60.003979 100.000% Total
KTC Elapsed Time = 217.871878 363.096% Total
KTC Run Time = 27.716669 12.722%
KTC Not Charged Time = 190.155208 87.278%

Sorted List of SPUs Used for this Process: [(2:26%), (0:25%), (1:25%),
(3:24%)]

-------------------------------------------------------------------------------
Section 1.0: Sorted Execution+Blocked=Elapsed Clocks for this Process,
EPB
-------------------------------------------------------------------------------
Clock Type Seconds % Elapsed uSec/Count
Counts

ELAPSED TOTAL 27.716669 100.000% Total
EXECUTION TOTAL 25.600633 92.365% Total
Execution UseR 18.064501 65.176% 38.9
464853
Execution Sys 6.038643 21.787% 16.4
367401
BLOCKED TOTAL 2.116037 7.635% 1284.0
1648
Blocked misc 2.031626 7.330% 2486.7
817
Execution IntUseR 0.993137 3.583% 32.8
30318
Execution IntSys 0.269954 0.974% 22.7
11870
Execution CsW 0.225448 0.813% 3.4
66172
Blocked PreempT 0.084410 0.305% 101.6
831
Execution TraP 0.006501 0.023% 6.9
945
Execution VfaulT 0.002450 0.009% 144.1
17

-------------------------------------------------------------------------------
Section 1.1: Time Process Executed during System Calls
-------------------------------------------------------------------------------
TOTAL Sys 6.038643 100.000% 16.4
367401
write Sys 1.858111 30.770% 10.0
186610
poll Sys 0.863837 14.305% 13.2
65285
read Sys 0.780819 12.930% 15.7
49699
close Sys 0.763243 12.639% 73.8
10343
accept Sys 0.398319 6.596% 77.1
5165
socket Sys 0.396285 6.562% 76.7
5167
connect Sys 0.336425 5.571% 65.1
5167
lwp_create Sys 0.171709 2.843% 33.2
5165
setsockopt Sys 0.127257 2.107% 24.6
5165
lwp_detached_exit Sys 0.106290 1.760% 20.6
5170
recv Sys 0.103426 1.713% 20.0
5166
gettimeofday Sys 0.054678 0.905% 5.2
10502
sched_yield Sys 0.042005 0.696% 17.6
2384
time Sys 0.035094 0.581% 3.2
10962
ksleep Sys 0.010853 0.180% 40.5
268
kwakeup Sys 0.003401 0.056% 32.7
104
sigtimedwait Sys 0.001524 0.025% 20.9
73
clock_gettime Sys 0.001089 0.018% 6.5
167
- Skip remainder, SPU of 0.0005 is below '-m 0.0010' Sec

-------------------------------------------------------------------------------
Section 1.2: Time Process Preempted in System Calls
-------------------------------------------------------------------------------
TOTAL PreempT 0.084410 100.000% 101.6
831
recv PreempT 0.038530 45.646% 458.7
84
poll PreempT 0.038076 45.108% 62.4
610
read PreempT 0.002635 3.122% 90.9
29
connect PreempT 0.001419 1.681% 67.6
21
write PreempT 0.001276 1.512% 24.5
52
- Skip remainder, SPU of 0.0006 is below '-m 0.0010' Sec

-------------------------------------------------------------------------------
Section 1.3: Time Process Blocked
-------------------------------------------------------------------------------
TOTAL BlockeD 2.116037 100.000% 1284.0
1648
poll BlockeD 1.744862 82.459% 2917.8
598
recv BlockeD 0.136402 6.446% 1684.0
81
Preempt PreempT 0.084410 3.989% 101.6
831
write BlockeD 0.046357 2.191% 874.7
53
read BlockeD 0.037055 1.751% 1235.2
30
sigtimedwait BlockeD 0.026671 1.260% 13335.6
2
connect BlockeD 0.025623 1.211% 1220.2
21
ksleep BlockeD 0.011171 0.528% 1861.8
6
lwp_create BlockeD 0.001687 0.080% 843.3
2
time BlockeD 0.001244 0.059% 177.7
7
- Skip remainder, SPU of 0.0004 is below '-m 0.0010' Sec
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #5 (permalink)  
Old 01-16-2008, 05:39 PM
Rick Jones
 
Posts: n/a
Default Re: High kernel time while reusing the same socket?

Irfan Bondre <ibondre@yahoo.com> wrote:
> The output from prospect is attached below for both the cases
> 1. When the connection is closed right away after every request.
> 2. If the connection is polled, however, since http 1.0 is used the
> other end closes the connection and this node determines that when
> reusing the socket and verifies that its already closed.


Indeed, if this is only ever going to be HTTP 1.0 without keepalives,
there is little point to keeping the connection open. When you said
earlier that you kept the connection open, I thought it was going to
be doing useful work.

If indeed, in case 2, there is no useful work to be done on the
connection after the first and only query, all it will be doing is
adding another FD to the list of FD's being polled (I'm assuming you
have multiple connections open at once?), and you will indeed have to
have stuff going up to the user when the remote closes the connection.

rick jones
--
portable adj, code that compiles under more than one compiler
these opinions are mine, all mine; HP might not want them anyway...
feel free to post, OR email to raj in cup.hp.com but NOT BOTH...
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #6 (permalink)  
Old 01-16-2008, 05:39 PM
Irfan Bondre
 
Posts: n/a
Default Re: High kernel time while reusing the same socket?

Oops, I made a mistake in my last question?

Also we have multiple connections open between the two nodes.

Yes, we use http 1.0 between the two nodes, but We have hacked the
code to not close the connection and hence do real connection pooling.

Sorry for the confusion.

So to repeat the previous details....



The output from prospect is attached below for both the cases
1. When the connection is closed right away after every request.
2. If the connection is polled. We pool the connection.

My Cluster is made up of HP-UX node which does the forwarding and
windows nodes which does the actual work of processing the data and
stuff. I am concerned about the HP node, which takes up too much
kernel time in CASE 2 described above.

================================================== ===========================
The prospect output when the socket kept open so that it can be
reused....


encycsrvr7 (07388)NM Birth (pre-exist) ps:=
(/actu01/ibondre/DEV040120/AcServer/bin/encycs
rvr7 -Spmd -Q81)
Process did not END - use last SLEEP

First execution after benchmark start = -0.000 Seconds

KI Elapsed Time = 60.023909 100.000% Total
KTC Elapsed Time = 196.386652 327.181% Total
KTC Run Time = 60.068209 30.587%
KTC Not Charged Time = 136.318444 69.413%

Sorted List of SPUs Used for this Process: [(0:41%), (3:22%), (2:21%),
(1:15%)]

-------------------------------------------------------------------------------
Section 1.0: Sorted Execution+Blocked=Elapsed Clocks for this Process,
EPB
-------------------------------------------------------------------------------
Clock Type Seconds % Elapsed uSec/Count
Counts

ELAPSED TOTAL 60.068209 100.000% Total
EXECUTION TOTAL 57.401422 95.560% Total
Execution Sys 29.720966 49.479% 83.7
355107
Execution UseR 19.771522 32.915% 14.6
1350200
Execution CsW 3.099385 5.160% 3.2
960013
BLOCKED TOTAL 2.666787 4.440% 844.7
3157
Execution IntSys 2.589765 4.311% 94.2
27498
Blocked misc 2.164232 3.603% 1372.4
1577
Execution IntUseR 2.155384 3.588% 75.4
28568
Blocked PreempT 0.502555 0.837% 318.1
1580
Execution TraP 0.063200 0.105% 9.7
6503
Execution VfaulT 0.001200 0.002% 133.4
9

-------------------------------------------------------------------------------
Section 1.1: Time Process Executed during System Calls
-------------------------------------------------------------------------------
TOTAL Sys 29.720966 100.000% 83.7
355107
write Sys 2.792251 9.395% 14.0
199533
read Sys 1.695414 5.704% 39.4
43019
poll Sys 1.157552 3.895% 19.5
59297
close Sys 0.559656 1.883% 103.7
5398
accept Sys 0.535603 1.802% 99.1
5407
lwp_create Sys 0.226134 0.761% 41.8
5407
lwp_detached_exit Sys 0.144207 0.485% 26.7
5392
recv Sys 0.132989 0.447% 12.3
10816
ioctl Sys 0.098347 0.331% 9.1
10814
gettimeofday Sys 0.063984 0.215% 5.8
10966
sched_yield Sys 0.055425 0.186% 18.6
2973
ksleep Sys 0.016261 0.055% 43.2
376
kwakeup Sys 0.006200 0.021% 30.5
203
time Sys 0.004303 0.014% 6.8
637
sigtimedwait Sys 0.002511 0.008% 33.9
74
clock_gettime Sys 0.001374 0.005% 8.2
167
- Skip remainder, SPU of 0.0005 is below '-m 0.0010' Sec

-------------------------------------------------------------------------------
Section 1.2: Time Process Preempted in System Calls
-------------------------------------------------------------------------------
TOTAL PreempT 0.502555 100.000% 318.1
1580
poll PreempT 0.232173 46.199% 240.6
965
recv PreempT 0.179577 35.733% 1026.2
175
write PreempT 0.025858 5.145% 114.9
225
kwakeup PreempT 0.017337 3.450% 4334.2
4
read PreempT 0.016161 3.216% 256.5
63
ioctl PreempT 0.013858 2.757% 533.0
26
sigtimedwait PreempT 0.004531 0.902% 453.1
10
gettimeofday PreempT 0.003971 0.790% 152.7
26
lwp_create PreempT 0.003628 0.722% 181.4
20
ksleep PreempT 0.001939 0.386% 121.2
16
close PreempT 0.001631 0.325% 81.6
20
- Skip remainder, SPU of 0.0008 is below '-m 0.0010' Sec

-------------------------------------------------------------------------------
Section 1.3: Time Process Blocked
-------------------------------------------------------------------------------
TOTAL BlockeD 2.666787 100.000% 844.7
3157
poll BlockeD 2.002994 75.109% 2101.8
953
Preempt PreempT 0.502555 18.845% 318.1
1580
recv BlockeD 0.068728 2.577% 384.0
179
write BlockeD 0.046070 1.728% 202.1
228
ksleep BlockeD 0.034905 1.309% 2181.6
16
ioctl BlockeD 0.014497 0.544% 536.9
27
sigtimedwait BlockeD 0.013226 0.496% 1322.6
10
accept BlockeD 0.004590 0.172% 327.8
14
- Skip remainder, SPU of 0.0010 is below '-m 0.0010' Sec




================================================== ===========================
================================================== ===========================
The prospect output when the socket is closed after every request is
as follows.


encycsrvr7 (07410)NM Birth (pre-exist) ps:=
(/actu01/ibondre/DEV040120/AcServer/bin/encycs
rvr7 -Spmd -Q81)
Process did not END - use last SLEEP

First execution after benchmark start = 0.003 Seconds

KI Elapsed Time = 60.003979 100.000% Total
KTC Elapsed Time = 217.871878 363.096% Total
KTC Run Time = 27.716669 12.722%
KTC Not Charged Time = 190.155208 87.278%

Sorted List of SPUs Used for this Process: [(2:26%), (0:25%), (1:25%),
(3:24%)]

-------------------------------------------------------------------------------
Section 1.0: Sorted Execution+Blocked=Elapsed Clocks for this Process,
EPB
-------------------------------------------------------------------------------
Clock Type Seconds % Elapsed uSec/Count
Counts

ELAPSED TOTAL 27.716669 100.000% Total
EXECUTION TOTAL 25.600633 92.365% Total
Execution UseR 18.064501 65.176% 38.9
464853
Execution Sys 6.038643 21.787% 16.4
367401
BLOCKED TOTAL 2.116037 7.635% 1284.0
1648
Blocked misc 2.031626 7.330% 2486.7
817
Execution IntUseR 0.993137 3.583% 32.8
30318
Execution IntSys 0.269954 0.974% 22.7
11870
Execution CsW 0.225448 0.813% 3.4
66172
Blocked PreempT 0.084410 0.305% 101.6
831
Execution TraP 0.006501 0.023% 6.9
945
Execution VfaulT 0.002450 0.009% 144.1
17

-------------------------------------------------------------------------------
Section 1.1: Time Process Executed during System Calls
-------------------------------------------------------------------------------
TOTAL Sys 6.038643 100.000% 16.4
367401
write Sys 1.858111 30.770% 10.0
186610
poll Sys 0.863837 14.305% 13.2
65285
read Sys 0.780819 12.930% 15.7
49699
close Sys 0.763243 12.639% 73.8
10343
accept Sys 0.398319 6.596% 77.1
5165
socket Sys 0.396285 6.562% 76.7
5167
connect Sys 0.336425 5.571% 65.1
5167
lwp_create Sys 0.171709 2.843% 33.2
5165
setsockopt Sys 0.127257 2.107% 24.6
5165
lwp_detached_exit Sys 0.106290 1.760% 20.6
5170
recv Sys 0.103426 1.713% 20.0
5166
gettimeofday Sys 0.054678 0.905% 5.2
10502
sched_yield Sys 0.042005 0.696% 17.6
2384
time Sys 0.035094 0.581% 3.2
10962
ksleep Sys 0.010853 0.180% 40.5
268
kwakeup Sys 0.003401 0.056% 32.7
104
sigtimedwait Sys 0.001524 0.025% 20.9
73
clock_gettime Sys 0.001089 0.018% 6.5
167
- Skip remainder, SPU of 0.0005 is below '-m 0.0010' Sec

-------------------------------------------------------------------------------
Section 1.2: Time Process Preempted in System Calls
-------------------------------------------------------------------------------
TOTAL PreempT 0.084410 100.000% 101.6
831
recv PreempT 0.038530 45.646% 458.7
84
poll PreempT 0.038076 45.108% 62.4
610
read PreempT 0.002635 3.122% 90.9
29
connect PreempT 0.001419 1.681% 67.6
21
write PreempT 0.001276 1.512% 24.5
52
- Skip remainder, SPU of 0.0006 is below '-m 0.0010' Sec

-------------------------------------------------------------------------------
Section 1.3: Time Process Blocked
-------------------------------------------------------------------------------
TOTAL BlockeD 2.116037 100.000% 1284.0
1648
poll BlockeD 1.744862 82.459% 2917.8
598
recv BlockeD 0.136402 6.446% 1684.0
81
Preempt PreempT 0.084410 3.989% 101.6
831
write BlockeD 0.046357 2.191% 874.7
53
read BlockeD 0.037055 1.751% 1235.2
30
sigtimedwait BlockeD 0.026671 1.260% 13335.6
2
connect BlockeD 0.025623 1.211% 1220.2
21
ksleep BlockeD 0.011171 0.528% 1861.8
6
lwp_create BlockeD 0.001687 0.080% 843.3
2
time BlockeD 0.001244 0.059% 177.7
7
- Skip remainder, SPU of 0.0004 is below '-m 0.0010' Sec
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #7 (permalink)  
Old 01-16-2008, 05:40 PM
Rick Jones
 
Posts: n/a
Default Re: High kernel time while reusing the same socket?

Irfan Bondre <ibondre@yahoo.com> wrote:
> Oops, I made a mistake in my last question?


> Also we have multiple connections open between the two nodes.


> Yes, we use http 1.0 between the two nodes, but We have hacked the
> code to not close the connection and hence do real connection pooling.


> Sorry for the confusion.


> So to repeat the previous details....




> The output from prospect is attached below for both the cases


BTW, I thought there was a mode in prospect that would give a simple
kernel profile - if that is the case, such a profile may be quite
helpful.

> 1. When the connection is closed right away after every request.
> 2. If the connection is polled. We pool the connection.


> My Cluster is made up of HP-UX node which does the forwarding and
> windows nodes which does the actual work of processing the data and
> stuff. I am concerned about the HP node, which takes up too much
> kernel time in CASE 2 described above.


OK, so there are sockets between the HP-UX and Windows systems that
are used for forwarding work, and then there are sockets between the
HP-UX and other systems on which requests arrive. Is that correct?

And then in case two, where the socket is kept open, you mean the
socket between the HP-UX and and the Windows compute servers yes?

> ================================================== ===========================
> The prospect output when the socket kept open so that it can be
> reused....



> encycsrvr7 (07388)NM Birth (pre-exist) ps:=
> (/actu01/ibondre/DEV040120/AcServer/bin/encycs
> rvr7 -Spmd -Q81)
> Process did not END - use last SLEEP


> First execution after benchmark start = -0.000 Seconds


> KI Elapsed Time = 60.023909 100.000% Total
> KTC Elapsed Time = 196.386652 327.181% Total
> KTC Run Time = 60.068209 30.587%
> KTC Not Charged Time = 136.318444 69.413%


> Sorted List of SPUs Used for this Process: [(0:41%), (3:22%), (2:21%),
> (1:15%)]


> -------------------------------------------------------------------------------
> Section 1.0: Sorted Execution+Blocked=Elapsed Clocks for this Process,
> EPB
> -------------------------------------------------------------------------------
> Clock Type Seconds % Elapsed uSec/Count
> Counts


> ELAPSED TOTAL 60.068209 100.000% Total
> EXECUTION TOTAL 57.401422 95.560% Total
> Execution Sys 29.720966 49.479% 83.7
> 355107
> Execution UseR 19.771522 32.915% 14.6
> 1350200
> Execution CsW 3.099385 5.160% 3.2
> 960013
> BLOCKED TOTAL 2.666787 4.440% 844.7
> 3157
> Execution IntSys 2.589765 4.311% 94.2
> 27498
> Blocked misc 2.164232 3.603% 1372.4
> 1577
> Execution IntUseR 2.155384 3.588% 75.4
> 28568
> Blocked PreempT 0.502555 0.837% 318.1
> 1580
> Execution TraP 0.063200 0.105% 9.7
> 6503
> Execution VfaulT 0.001200 0.002% 133.4
> 9


> -------------------------------------------------------------------------------
> Section 1.1: Time Process Executed during System Calls
> -------------------------------------------------------------------------------
> TOTAL Sys 29.720966 100.000% 83.7
> 355107
> write Sys 2.792251 9.395% 14.0
> 199533
> read Sys 1.695414 5.704% 39.4
> 43019
> poll Sys 1.157552 3.895% 19.5
> 59297
> close Sys 0.559656 1.883% 103.7
> 5398
> accept Sys 0.535603 1.802% 99.1
> 5407


I find it interesting that there would be soooo many write calls for
only ~5400 connections. Something on the order of 37 calls to write
for each connection. Does that sound right to you based on how the
app should work? How much data is being transfered here?

It is also interesting to me that there would be 10X the number of
poll calls as there are accepts(). A tusc trace would show roughly
how many fds are being polled each time.

ftp://ftp.cup.hp.com/dist/networking...eventports.txt

> lwp_create Sys 0.226134 0.761% 41.8
> 5407
> lwp_detached_exit Sys 0.144207 0.485% 26.7
> 5392


I take it you are creating and destroying threads on the fly?

> recv Sys 0.132989 0.447% 12.3
> 10816
> ioctl Sys 0.098347 0.331% 9.1
> 10814
> gettimeofday Sys 0.063984 0.215% 5.8
> 10966


If the gettimeofday calls are just for measuring time deltas, HP-UX
(might need some patches) has a gethrtime() call these days.

> sched_yield Sys 0.055425 0.186% 18.6
> 2973
> ksleep Sys 0.016261 0.055% 43.2
> 376
> kwakeup Sys 0.006200 0.021% 30.5
> 203


Sched_yield in conjunction with ksleep and kwakeup are indications of
possible mutex contention in an application. If you take a tusc trace
(have it include lwpids in the output) the arguments to ksleep/kwakeup
can point to the mutex(es) in question. Of course at this low
percentage of time it proibably isnt a big deal, but if/when you try
to scale this up, it may become an issue.

> time Sys 0.004303 0.014% 6.8
> 637
> sigtimedwait Sys 0.002511 0.008% 33.9
> 74
> clock_gettime Sys 0.001374 0.005% 8.2
> 167
> - Skip remainder, SPU of 0.0005 is below '-m 0.0010' Sec


> -------------------------------------------------------------------------------
> Section 1.2: Time Process Preempted in System Calls
> -------------------------------------------------------------------------------
> TOTAL PreempT 0.502555 100.000% 318.1
> 1580
> poll PreempT 0.232173 46.199% 240.6
> 965
> recv PreempT 0.179577 35.733% 1026.2
> 175
> write PreempT 0.025858 5.145% 114.9
> 225
> kwakeup PreempT 0.017337 3.450% 4334.2
> 4
> read PreempT 0.016161 3.216% 256.5
> 63
> ioctl PreempT 0.013858 2.757% 533.0
> 26
> sigtimedwait PreempT 0.004531 0.902% 453.1
> 10
> gettimeofday PreempT 0.003971 0.790% 152.7
> 26
> lwp_create PreempT 0.003628 0.722% 181.4
> 20
> ksleep PreempT 0.001939 0.386% 121.2
> 16
> close PreempT 0.001631 0.325% 81.6
> 20
> - Skip remainder, SPU of 0.0008 is below '-m 0.0010' Sec


> -------------------------------------------------------------------------------
> Section 1.3: Time Process Blocked
> -------------------------------------------------------------------------------
> TOTAL BlockeD 2.666787 100.000% 844.7
> 3157
> poll BlockeD 2.002994 75.109% 2101.8
> 953
> Preempt PreempT 0.502555 18.845% 318.1
> 1580
> recv BlockeD 0.068728 2.577% 384.0
> 179
> write BlockeD 0.046070 1.728% 202.1
> 228
> ksleep BlockeD 0.034905 1.309% 2181.6
> 16
> ioctl BlockeD 0.014497 0.544% 536.9
> 27
> sigtimedwait BlockeD 0.013226 0.496% 1322.6
> 10
> accept BlockeD 0.004590 0.172% 327.8
> 14
> - Skip remainder, SPU of 0.0010 is below '-m 0.0010' Sec


>



> ================================================== ===========================
> ================================================== ===========================
> The prospect output when the socket is closed after every request is
> as follows.



> encycsrvr7 (07410)NM Birth (pre-exist) ps:=
> (/actu01/ibondre/DEV040120/AcServer/bin/encycs
> rvr7 -Spmd -Q81)
> Process did not END - use last SLEEP


> First execution after benchmark start = 0.003 Seconds


> KI Elapsed Time = 60.003979 100.000% Total
> KTC Elapsed Time = 217.871878 363.096% Total
> KTC Run Time = 27.716669 12.722%
> KTC Not Charged Time = 190.155208 87.278%


> Sorted List of SPUs Used for this Process: [(2:26%), (0:25%), (1:25%),
> (3:24%)]


> -------------------------------------------------------------------------------
> Section 1.0: Sorted Execution+Blocked=Elapsed Clocks for this Process,
> EPB
> -------------------------------------------------------------------------------
> Clock Type Seconds % Elapsed uSec/Count
> Counts


> ELAPSED TOTAL 27.716669 100.000% Total
> EXECUTION TOTAL 25.600633 92.365% Total
> Execution UseR 18.064501 65.176% 38.9
> 464853
> Execution Sys 6.038643 21.787% 16.4
> 367401
> BLOCKED TOTAL 2.116037 7.635% 1284.0
> 1648
> Blocked misc 2.031626 7.330% 2486.7
> 817
> Execution IntUseR 0.993137 3.583% 32.8
> 30318
> Execution IntSys 0.269954 0.974% 22.7
> 11870
> Execution CsW 0.225448 0.813% 3.4
> 66172
> Blocked PreempT 0.084410 0.305% 101.6
> 831
> Execution TraP 0.006501 0.023% 6.9
> 945
> Execution VfaulT 0.002450 0.009% 144.1
> 17


> -------------------------------------------------------------------------------
> Section 1.1: Time Process Executed during System Calls
> -------------------------------------------------------------------------------
> TOTAL Sys 6.038643 100.000% 16.4
> 367401
> write Sys 1.858111 30.770% 10.0
> 186610
> poll Sys 0.863837 14.305% 13.2
> 65285
> read Sys 0.780819 12.930% 15.7
> 49699
> close Sys 0.763243 12.639% 73.8
> 10343
> accept Sys 0.398319 6.596% 77.1
> 5165
> socket Sys 0.396285 6.562% 76.7
> 5167
> connect Sys 0.336425 5.571% 65.1
> 5167
> lwp_create Sys 0.171709 2.843% 33.2
> 5165
> setsockopt Sys 0.127257 2.107% 24.6
> 5165
> lwp_detached_exit Sys 0.106290 1.760% 20.6
> 5170
> recv Sys 0.103426 1.713% 20.0
> 5166
> gettimeofday Sys 0.054678 0.905% 5.2
> 10502
> sched_yield Sys 0.042005 0.696% 17.6
> 2384
> time Sys 0.035094 0.581% 3.2
> 10962
> ksleep Sys 0.010853 0.180% 40.5
> 268
> kwakeup Sys 0.003401 0.056% 32.7
> 104
> sigtimedwait Sys 0.001524 0.025% 20.9
> 73
> clock_gettime Sys 0.001089 0.018% 6.5
> 167
> - Skip remainder, SPU of 0.0005 is below '-m 0.0010' Sec


> -------------------------------------------------------------------------------
> Section 1.2: Time Process Preempted in System Calls
> -------------------------------------------------------------------------------
> TOTAL PreempT 0.084410 100.000% 101.6
> 831
> recv PreempT 0.038530 45.646% 458.7
> 84
> poll PreempT 0.038076 45.108% 62.4
> 610
> read PreempT 0.002635 3.122% 90.9
> 29
> connect PreempT 0.001419 1.681% 67.6
> 21
> write PreempT 0.001276 1.512% 24.5
> 52
> - Skip remainder, SPU of 0.0006 is below '-m 0.0010' Sec


> -------------------------------------------------------------------------------
> Section 1.3: Time Process Blocked
> -------------------------------------------------------------------------------
> TOTAL BlockeD 2.116037 100.000% 1284.0
> 1648
> poll BlockeD 1.744862 82.459% 2917.8
> 598
> recv BlockeD 0.136402 6.446% 1684.0
> 81
> Preempt PreempT 0.084410 3.989% 101.6
> 831
> write BlockeD 0.046357 2.191% 874.7
> 53
> read BlockeD 0.037055 1.751% 1235.2
> 30
> sigtimedwait BlockeD 0.026671 1.260% 13335.6
> 2
> connect BlockeD 0.025623 1.211% 1220.2
> 21
> ksleep BlockeD 0.011171 0.528% 1861.8
> 6
> lwp_create BlockeD 0.001687 0.080% 843.3
> 2
> time BlockeD 0.001244 0.059% 177.7
> 7
> - Skip remainder, SPU of 0.0004 is below '-m 0.0010' Sec


--
portable adj, code that compiles under more than one compiler
these opinions are mine, all mine; HP might not want them anyway...
feel free to post, OR email to raj in cup.hp.com but NOT BOTH...
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
Reply


Thread Tools
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

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On
Forum Jump


All times are GMT. The time now is 09:01 PM.


Powered by vBulletin® Version 3.6.5
Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
SEO by vBSEO 3.2.0
UnixAdminTalk.com

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 201 202 203 204 205 206 207 208 209 210 211 212 213 214 215 216 217 218 219 220 221 222 223 224 225 226 227 228 229 230 231 232 233 234 235 236 237 238 239 240 241 242 243 244 245 246 247