From: Rick K. <rk...@nc...> - 2007-01-16 14:37:03
|
Dawei, I can point out a few things that may help you think about your experiments: - The wall clock time reported is just that: the amount of time elapsed from when the measurement started until it stopped. There is not necessarily a correspondence between the wall clock time and amount of "work" done (whatever you define "work" to be) - By default, PerfSuite measures a process in "user" mode, and does not account for "system", or "kernel" time, that is, time spent executing in system calls on behalf of the user process. If a process spends a lot of time in requests for system services (for example, I/O), you may get a large underestimate in the resulting XML documents. One can request a different counting mode through either the psrun option "-d" or the environment variable PS_HWPC_DOMAIN. See the psrun man page or the output of "psrun -h" for syntax. - It helps to know a little bit about the CPU you are working with and what events mean. Usually, one has to refer to the CPU vendor documentation that describes the implemented events. In the case of the Itanium 2, one unusual thing is that some data bypasses the level 1 cache altogether. This has been discussed on this list a few times in the past, when people wonder why there are more level 2 cache misses than level 1 cache misses for runs on Itanium systems. I hesistate to post a URL for the reference to performance events on Itanium 2 because it seems to me that it has been moved around in the past, but some searching at Intel's web site should eventually turn it up. Rick On Sun, 14 Jan 2007, liudawei wrote: > Dear Rick: > > I am still confused by my monitor work, this time is not a simple test program, this is a real senario. > 1. "psrun -f ttDaemonAdmin -start" // start the Timesten database server.here the ttDaemonAdmin is a script file. the file contents listed in the end of this letter. > 2. "ps -A" // to show you that once the database server is start, there will be five processes started. > ------ > 13366 ? 00:00:00 timestend > 13369 ? 00:00:00 timestensubd > 13370 ? 00:00:00 timestensubd > 13371 ? 00:00:00 timestensubd > 13372 ? 00:00:00 timestensubd > ------ > 3. "tpcb" // This will start a test program which will connect the datbaseerver and send a few of queries to database,indeed, the connect request will be replied by a process (13372), it will fetch data from the database and > return the results to the request. I use the command "top" to show a snapshot when the tpcb programm is running. > 4 "top" > -------------- > PID USER PR NI VIRT RES SHR S %CPU %MEM TIME+ COMMAND > 13400 root 25 0 65680 46m 36m R 49.8 1.2 0:01.49 tpcb > 13372 root 25 0 63712 14m 12m S 5.4 0.4 0:00.17 timestensub > 269 root 15 0 0 0 0 D 2.0 0.0 0:03.82 kjournald > 13366 root 25 0 26672 7248 3856 S 0.2 0.2 0:00.01 timestend > -------------- > Through this snapshot, it can clearly seen that it is the process(13372) which is serving tpcb to access data stored in database. I just to show you that this process(13372) will do a lot of work than others. > 5. "ttdaemonAdmin -stop" //This will stop the database server and all the processes(the five)will dead. So, my monitor work is finished, and I got the following monitor results files > --------------- > -rw-r--r-- 1 root root 2466 Jan 14 20:32 sh.13361.Node4.xml > -rw-r--r-- 1 root root 2464 Jan 14 20:32 sh.13362.Node4.xml > -rw------- 1 root root 2463 Jan 14 20:32 timestend.13364.Node4.xml > -rw------- 1 root root 2470 Jan 14 20:32 timestend.13365.Node4.xml > -rw-rw-rw- 1 root root 2482 Jan 14 20:43 timestensubd.13369.Node4.xml > -rw-rw-rw- 1 root root 2482 Jan 14 20:43 timestensubd.13370.Node4.xml > -rw-rw-rw- 1 root root 2482 Jan 14 20:43 timestensubd.13371.Node4.xml > -rw-rw-rw- 1 root root 2482 Jan 14 20:43 timestensubd.13372.Node4.xml > -rw-r--r-- 1 root root 2455 Jan 14 20:32 tr.13363.Node4.xml > -rw-r--r-- 1 root root 2471 Jan 14 20:32 ttDaemonAdmin.13360.Node4.xml > --------------- > 7. Here, do you think there will be much more differences between "timestensubd.13372.Node4.xml" and others? > I think so ,because it is this process (133702) really do the data acess work, while others do not. but when > I use "psprocess" to watch the results, I found the differece in not distinguish. I do not know why. > I do not know wether the method I used to monitor a database server is right? It seem there is something wrong whith > the wall clock time of "13372". It have done some much work, but why there is no distinguish with other process ? > It is impossible that this process(13372) consume so little resource (I mean L1_ICM L1_DCM numbers) and is also approximate > to other processes. Attached the resutls below. > 8. Could I added up all the L1_DCM number caused by these processes,say N. Could I believe the total L1 cache miss numbers > caused by database server is N? > ---------------------------------- > PerfSuite Hardware Performance Summary Report > Version : 1.0 > Created : Sun Jan 14 08:48:42 PM CST 2007 > Generator : psprocess 0.3 > XML Source : timestensubd.13369.Node4.xml > [......] > Index Description Counter Value > ============================================================================================ > 1 Level 1 instruction cache misses................................. 6158 > 2 Level 1 data cache misses........................................ 13377 > 3 Level 2 instruction cache misses................................. 4452 > Event Index > ============================================================================================ > 1: PAPI_L1_ICM 2: PAPI_L1_DCM 3: PAPI_L2_ICM > Statistics > ============================================================================================ > Counting domain........................................................ user > Multiplexed............................................................ no > Wall clock time (seconds).............................................. 635.387 > > ----------------------------------- > PerfSuite Hardware Performance Summary Report > Version : 1.0 > Created : Sun Jan 14 08:48:43 PM CST 2007 > Generator : psprocess 0.3 > XML Source : timestensubd.13370.Node4.xml > Index Description Counter Value > ============================================================================================ > 1 Level 1 instruction cache misses................................. 6219 > 2 Level 1 data cache misses........................................ 13464 > 3 Level 2 instruction cache misses................................. 4465 > [.....] > Event Index > ============================================================================================ > 1: PAPI_L1_ICM 2: PAPI_L1_DCM 3: PAPI_L2_ICM > Statistics > ============================================================================================ > Counting domain........................................................ user > Multiplexed............................................................ no > Wall clock time (seconds).............................................. 635.411 > ----------------------------------------------------------------------------------------------- > PerfSuite Hardware Performance Summary Report > Version : 1.0 > Created : Sun Jan 14 08:48:43 PM CST 2007 > Generator : psprocess 0.3 > XML Source : timestensubd.13371.Node4.xml > [......] > Index Description Counter Value > ============================================================================================ > 1 Level 1 instruction cache misses................................. 5901 > 2 Level 1 data cache misses........................................ 13461 > 3 Level 2 instruction cache misses................................. 4430 > Event Index > ============================================================================================ > 1: PAPI_L1_ICM 2: PAPI_L1_DCM 3: PAPI_L2_ICM > Statistics > ============================================================================================ > Counting domain........................................................ user > Multiplexed............................................................ no > Wall clock time (seconds).............................................. 635.403 > ------------------------------------------------------------------------------------------------ > PerfSuite Hardware Performance Summary Report > Version : 1.0 > Created : Sun Jan 14 08:48:43 PM CST 2007 > Generator : psprocess 0.3 > XML Source : timestensubd.13372.Node4.xml > [......] > Index Description Counter Value > ============================================================================================ > 1 Level 1 instruction cache misses................................. 5962 > 2 Level 1 data cache misses........................................ 13524 > 3 Level 2 instruction cache misses................................. 4474 > Event Index > ============================================================================================ > 1: PAPI_L1_ICM 2: PAPI_L1_DCM 3: PAPI_L2_ICM > Statistics > ============================================================================================ > Counting domain........................................................ user > Multiplexed............................................................ no > Wall clock time (seconds).............................................. 635.394 > --------------------------------------------------------------------------------------------- > ---------ttDaemonAdmin.sh-------- > #!/bin/sh > # Copyright (C) 1999, 2006, Oracle. All rights reserved. > # > # Set the shared library search path environment variable > # > TIMESTEN_DIR=/opt/TimesTen/tt60ty > LD_LIBRARY_PATH=$TIMESTEN_DIR/lib${LD_LIBRARY_PATH:+:$LD_LIBRARY_PATH} > export LD_LIBRARY_PATH > > cmd=`echo $0 | tr ABCDEFGHIJKLMNOPQRSTUVWXYZ abcdefghijklmnopqrstuvwxyz` > case $cmd in > *ttadmin) > cmd=$TIMESTEN_DIR/bin/ttAdminCmd > ;; > *ttrepadmin) > cmd=$TIMESTEN_DIR/bin/ttRepAdminCmd > ;; > *ttstatus) > cmd=$TIMESTEN_DIR/bin/ttStatusCmd > ;; > *tttail) > cmd=$TIMESTEN_DIR/bin/ttTailCmd > ;; > *tttracemon) > cmd=$TIMESTEN_DIR/bin/ttTraceMonCmd > ;; > *ttisql) > cmd=$TIMESTEN_DIR/bin/ttIsqlCmd > ;; > *ttcheck) > cmd=$TIMESTEN_DIR/bin/ttCheckCmd > ;; > *ttxactlog) > cmd=$TIMESTEN_DIR/bin/ttXactLogCmd > ;; > *ttxactadmin) > cmd=$TIMESTEN_DIR/bin/ttXactAdminCmd > ;; > *ttbackup) > cmd=$TIMESTEN_DIR/bin/ttBackupCmd > ;; > *ttrestore) > cmd=$TIMESTEN_DIR/bin/ttRestoreCmd > ;; > *ttdestroy) > cmd=$TIMESTEN_DIR/bin/ttDestroyCmd > ;; > *ttschema) > cmd=$TIMESTEN_DIR/bin/ttSchemaCmd > ;; > *ttsize) > cmd=$TIMESTEN_DIR/bin/ttSizeCmd > ;; > *ttbulkcp) > cmd=$TIMESTEN_DIR/bin/ttBulkCpCmd > ;; > *ttdaemonlog) > cmd=$TIMESTEN_DIR/bin/ttDaemonLogCmd > ;; > *ttdaemonadmin) > cmd=$TIMESTEN_DIR/bin/ttDaemonAdminCmd > ;; > *ttmigrate) > cmd=$TIMESTEN_DIR/bin/ttMigrateCmd > ;; > *ttisqlcs) > cmd=$TIMESTEN_DIR/bin/ttIsqlCSCmd > ;; > *ttbulkcpcs) > cmd=$TIMESTEN_DIR/bin/ttBulkCpCSCmd > ;; > *ttmigratecs) > cmd=$TIMESTEN_DIR/bin/ttMigrateCSCmd > ;; > *ttschemacs) > cmd=$TIMESTEN_DIR/bin/ttSchemaCSCmd > ;; > *ttsyslogcheck) > cmd=$TIMESTEN_DIR/bin/ttSyslogCheckCmd > ;; > *ttthunk) > echo "ttThunk sets up the environment for TimesTen utility programs." > echo "It is not intended to be run directly." > exit 1 > ;; > *) > echo "$cmd is not a TimesTen utility program." > exit 1 > ;; > esac > exec $cmd "$@" > ------------------------------------------------------------------------------------------------------- > > Best regards > Dawei Liu > Renmin University of China > 100872 Beijing,China > > > --------------------------------- |