Results 1 to 12 of 12
  1. #1
    Join Date
    Aug 2010
    Location
    Singapore
    Posts
    197

    Cool Unanswered: db2sysc is using more than 100 % CPU

    Hi,

    In my envi db2sysc is using more than 100 % constantly. And to bring it down. I tried and forced all the connections ..still it comes back to the same level in a few minitues time...

    I checked the db2top where i could see applicaton held is 40 and locks are 180 and the lock entries are 2900.

    How do i bring the CPU Utilization down to normal
    I use Db2 V9.7 on RHEL 5.5 64bit

    Thanks !

  2. #2
    Join Date
    Jan 2003
    Posts
    4,292
    Provided Answers: 5
    How many cores (processors), memory, disk space and type does the server have?

    Andy

  3. #3
    Join Date
    May 2003
    Location
    USA
    Posts
    5,737
    On most monitors, the CPU for db2sysc will show the percent of one CPU core, not the entire machine. So if you have 2 CPU's with 4 cores per CPU (8 cores total) a CPU utilization of 200% for db2sysc would be 25% of the total machine.
    M. A. Feldman
    IBM Certified DBA on DB2 for Linux, UNIX, and Windows
    IBM Certified DBA on DB2 for z/OS and OS/390

  4. #4
    Join Date
    Aug 2008
    Posts
    76
    Hi satya,

    Also take a look at the block queue along with the info mentioned by other folks. If you see a high number it means that you need more number of CPUs.

    Inorder to reduce the CPU utlilization, Please run a application snapshot and database snapshot and see what your application is really trying to do. Sometimes due to improper coding application might read a million rows to fetch 10 rows. This would significantly increase the CPU utilization.

    Thanks,
    Pandit

  5. #5
    Join Date
    Nov 2011
    Posts
    8
    Please run "db2pd -edus",and we can know which edu might cause the cpu utilization.

  6. #6
    Join Date
    Aug 2010
    Location
    Singapore
    Posts
    197
    Thanks for your suggestions.

    ARWinner,

    Server has 4 cores and 16 processors , RAM size is 32 GB,
    Database is on SAN so enough space available.

    Marcus,

    I din understand your point, But i have pusblished my cores and processor details can you tell me from this how do i calculate ?

  7. #7
    Join Date
    Aug 2010
    Location
    Singapore
    Posts
    197
    Hi Pandit,

    Thanks for your reply,

    I din know how to check the block queue,

    But i checked the snapshot for db and application, In which i could see one of Application is using more sorts which can be a reason for high CPU.

  8. #8
    Join Date
    May 2003
    Location
    USA
    Posts
    5,737
    Quote Originally Posted by alwayssathya View Post
    Marcus,

    I din understand your point, But i have pusblished my cores and processor details can you tell me from this how do i calculate ?
    I am not sure you understand the difference between processors and cores. Each processor (CPU socket) has multiple cores (unless it is very old). So assuming you have 4 processors with 4 cores per processor, then you would have 16 total cores. You have to be careful in calculating number of cores, because if you have Intel hyper-threading turned on, then the number of reported cores may be inflated by a factor of 2.

    Assuming 16 total cores, if db2sysc is running at 100% CPU (according to most Linux monitors), then it is using 100% of one core, or 6.25% of the total processing power of the machine. If db2sysc were usiing 200%, then it would be using 12.5% of the total processing power of the machine.

    If you run top command on Linux you will see the following on line 3:
    Code:
    Cpu(s):  4.4%us,  4.1%sy,  0.0%ni, 91.4%id,  0.0%wa,  0.0%hi,  0.0%si,  0.0%st
    To get total CPU utilitization of all processes on the entire server (max 100%), add the us (user) and sy (system) percentages together, so in this case the machine is 8.5% utilized (ignoring idle time and the others which are usually not significant).

    Further down you will see a line for each db2sysc (in this case, instance name is db2inst1:

    Code:
       PID USER     PR  NI  VIRT  RES  SHR S %CPU %MEM    TIME+  COMMAND
     10918 db2inst1 20   0 1168m  47m  36m S  4.1  1.2   0:00.27 db2sysc
    The above shows that %CPU is 4.1, and there are 2 cores total on this machine (one dual-core CPU), so total server CPU percentage for db2sysc is 2.05%.
    Last edited by Marcus_A; 11-03-11 at 02:10.
    M. A. Feldman
    IBM Certified DBA on DB2 for Linux, UNIX, and Windows
    IBM Certified DBA on DB2 for z/OS and OS/390

  9. #9
    Join Date
    Aug 2010
    Location
    Singapore
    Posts
    197
    hi marcus,

    My server top out says this

    Cpu(s): 0.1%us, 0.1%sy, 0.0%ni, 99.8%id, 0.0%wa, 0.0%hi, 0.0%si, 0.0%st

    out of this ctginst1 user and db2sysc process alone occupies these many

    PID USER PR NI VIRT RES SHR S %CPU %MEM TIME+ COMMAND
    23425 ctginst1 15 0 1561m 94m 76m R 27.6 0.3 0:03.77 db2sysc
    22052 ctginst1 15 0 1564m 132m 110m S 26.9 0.4 0:11.72 db2sysc
    23000 ctginst1 15 0 1562m 110m 91m S 26.9 0.3 0:06.04 db2sysc
    22599 ctginst1 16 0 1563m 119m 98m R 26.6 0.4 0:08.71 db2sysc
    23861 ctginst1 16 0 1559m 48m 32m R 26.3 0.1 0:00.80 db2sysc
    23421 ctginst1 16 0 1560m 73m 56m R 26.0 0.2 0:02.85 db2sysc
    23416 ctginst1 16 0 1560m 85m 68m R 23.7 0.3 0:03.23 db2sysc
    23865 ctginst1 16 0 1559m 52m 36m R 23.7 0.2 0:00.72 db2sysc
    23866 ctginst1 16 0 1559m 50m 34m R 22.7 0.2 0:00.69 db2sysc
    23863 ctginst1 15 0 1559m 51m 35m S 22.0 0.2 0:00.67 db2sysc
    23871 ctginst1 18 0 1559m 51m 35m R 22.0 0.2 0:00.67 db2sysc
    23873 ctginst1 16 0 1559m 50m 34m R 21.7 0.2 0:00.66 db2sysc
    23427 ctginst1 16 0 1561m 90m 72m R 21.0 0.3 0:03.15 db2sysc
    23870 ctginst1 15 0 1559m 50m 34m R 19.7 0.2 0:00.60 db2sysc
    23877 ctginst1 15 0 1559m 50m 34m S 18.1 0.2 0:00.55 db2sysc
    23878 ctginst1 15 0 1559m 50m 34m R 18.1 0.2 0:00.55 db2sysc
    23012 ctginst1 15 0 1562m 108m 89m S 17.7 0.3 0:06.07 db2sysc
    23864 ctginst1 15 0 1559m 50m 34m S 17.7 0.2 0:00.54 db2sysc
    23869 ctginst1 15 0 1559m 52m 36m R 17.1 0.2 0:00.52 db2sysc
    23875 ctginst1 16 0 1559m 50m 34m R 15.1 0.2 0:00.46 db2sysc
    23860 ctginst1 16 0 1559m 50m 34m R 13.5 0.2 0:00.41 db2sysc
    23883 ctginst1 15 0 1559m 46m 30m S 13.1 0.1 0:00.40 db2sysc
    23872 ctginst1 16 0 1559m 49m 34m R 12.8 0.2 0:00.39 db2sysc
    23862 ctginst1 18 0 1559m 69m 53m R 12.2 0.2 0:00.37 db2sysc
    23874 ctginst1 15 0 1559m 49m 33m R 11.2 0.2 0:00.34 db2sysc
    23880 ctginst1 15 0 1559m 48m 32m R 11.2 0.2 0:00.34 db2sysc
    23868 ctginst1 15 0 1559m 48m 32m R 10.2 0.2 0:00.31 db2sysc

    Seeing this i don't know to calculate what is the average of CPU utilised by ctginst1 user and db2sysc process

  10. #10
    Join Date
    May 2003
    Location
    USA
    Posts
    5,737
    Quote Originally Posted by alwayssathya View Post
    hi marcus,

    My server top out says this

    Cpu(s): 0.1%us, 0.1%sy, 0.0%ni, 99.8%id, 0.0%wa, 0.0%hi, 0.0%si, 0.0%st

    out of this ctginst1 user and db2sysc process alone occupies these many

    PID USER PR NI VIRT RES SHR S %CPU %MEM TIME+ COMMAND
    23425 ctginst1 15 0 1561m 94m 76m R 27.6 0.3 0:03.77 db2sysc
    22052 ctginst1 15 0 1564m 132m 110m S 26.9 0.4 0:11.72 db2sysc
    23000 ctginst1 15 0 1562m 110m 91m S 26.9 0.3 0:06.04 db2sysc
    22599 ctginst1 16 0 1563m 119m 98m R 26.6 0.4 0:08.71 db2sysc
    23861 ctginst1 16 0 1559m 48m 32m R 26.3 0.1 0:00.80 db2sysc
    23421 ctginst1 16 0 1560m 73m 56m R 26.0 0.2 0:02.85 db2sysc
    23416 ctginst1 16 0 1560m 85m 68m R 23.7 0.3 0:03.23 db2sysc
    23865 ctginst1 16 0 1559m 52m 36m R 23.7 0.2 0:00.72 db2sysc
    23866 ctginst1 16 0 1559m 50m 34m R 22.7 0.2 0:00.69 db2sysc
    23863 ctginst1 15 0 1559m 51m 35m S 22.0 0.2 0:00.67 db2sysc
    23871 ctginst1 18 0 1559m 51m 35m R 22.0 0.2 0:00.67 db2sysc
    23873 ctginst1 16 0 1559m 50m 34m R 21.7 0.2 0:00.66 db2sysc
    23427 ctginst1 16 0 1561m 90m 72m R 21.0 0.3 0:03.15 db2sysc
    23870 ctginst1 15 0 1559m 50m 34m R 19.7 0.2 0:00.60 db2sysc
    23877 ctginst1 15 0 1559m 50m 34m S 18.1 0.2 0:00.55 db2sysc
    23878 ctginst1 15 0 1559m 50m 34m R 18.1 0.2 0:00.55 db2sysc
    23012 ctginst1 15 0 1562m 108m 89m S 17.7 0.3 0:06.07 db2sysc
    23864 ctginst1 15 0 1559m 50m 34m S 17.7 0.2 0:00.54 db2sysc
    23869 ctginst1 15 0 1559m 52m 36m R 17.1 0.2 0:00.52 db2sysc
    23875 ctginst1 16 0 1559m 50m 34m R 15.1 0.2 0:00.46 db2sysc
    23860 ctginst1 16 0 1559m 50m 34m R 13.5 0.2 0:00.41 db2sysc
    23883 ctginst1 15 0 1559m 46m 30m S 13.1 0.1 0:00.40 db2sysc
    23872 ctginst1 16 0 1559m 49m 34m R 12.8 0.2 0:00.39 db2sysc
    23862 ctginst1 18 0 1559m 69m 53m R 12.2 0.2 0:00.37 db2sysc
    23874 ctginst1 15 0 1559m 49m 33m R 11.2 0.2 0:00.34 db2sysc
    23880 ctginst1 15 0 1559m 48m 32m R 11.2 0.2 0:00.34 db2sysc
    23868 ctginst1 15 0 1559m 48m 32m R 10.2 0.2 0:00.31 db2sysc

    Seeing this i don't know to calculate what is the average of CPU utilised by ctginst1 user and db2sysc process
    I don't understand why there are so many db2sysc lines in your output, but your total CPU utilization on the server is .2% (99.8% idle). That includes all processes running including DB2.
    M. A. Feldman
    IBM Certified DBA on DB2 for Linux, UNIX, and Windows
    IBM Certified DBA on DB2 for z/OS and OS/390

  11. #11
    Join Date
    Aug 2008
    Posts
    76
    Hi sathya,

    Run vmstat

    System configuration: lcpu=16 mem=8192MB ent=2.00

    kthr memory page faults cpu
    ----- ----------- ------------------------ ------------ -----------------------
    r b avm fre re pi po fr sr cy in sy cs us sy id wa pc ec
    2 1 752147 599727 0 0 0 6 12 0 9 2357 325 0 0 99 0 0.01 0.3

    Above is an example of vmstat. I have bolded run queue and block queue. Run queue should be a very low number. Ideally, it should be more than the number of CPUs on the system or atleast cores on the system. If either r or b are high there is some real issue with the CPU. Either there might be some run away processes on the system or the application is behaving crazy.

    Do you know why you are seeing those many db2sysc processes on the server ? Do you have those many instances ? Ensure they are not orphan processes in the sense make sure they have a parent PID. If they are orphans kill them and a server reboot will help to clean up things.

    Thanks,
    Pandit

  12. #12
    Join Date
    Apr 2011
    Posts
    19
    I agree with Pandit. Something is very wrong. one db2sysc per instance.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •