Sponsored Content
Homework and Emergencies Emergency UNIX and Linux Support How to fix the CPU bound issues on AIX? Post 302861117 by bakunin on Tuesday 8th of October 2013 06:50:14 AM
Old 10-08-2013
Quote:
Originally Posted by System Admin 77
I understand that, i need to increase physical processors (Desired) from HMC.
Yes and no: what you first need to do is to understand your system. This means (among other things) to understand the patterns of resource consumption there are. You might have a relatively stable demand for CPU or a widely varying one. You may have predictable ups and downs (for instance: day=high, night=low, etc.) or event-triggered ones. If your consumption is varying it might be by a small factor or a big one. All these things you can only find out through careful, long-term study of the system. I know these things even less than you, because i know even less about your system. So, please, bear with me for being somewhat general in my suggestions.

Set up and run sar (or nmon or whatever else you like) to monitor consumed resources (memory, CPU, I/O, net, ...) over some time to get a good impression about these usage patterns. The tool you use doesn't matter asl long as it provides the data you are interested.

Run a ps (or top or something alike) to learn about the most demanding processes in terms of memory and CPU. Maybe they run all day, maybe they run only during a certain time of the day. Maybe they run all day but only need very much memory/CPU power during a short time. Maybe ... You see, there is a lot of things not known about your system.

Performance tuning is a very simple task once you have understood where the bottleneck is. Finding out the bottleneck, though, can be extremely difficult. I suggest you read the little tutorial i wrote to get some pointers.

Quote:
Originally Posted by System Admin 77
But i see suddenly the CPU usage went down, today it is


Code:
System configuration: lcpu=10 mem=24576MB ent=1.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
  9   0    2568885      36174     0     0     0     0      0     0   121   1184   703  1  1 97  0  0.03   3.5
 13   0    2568885      36172     0     0     0     0      0     0    42    906   522  1  1 98  0  0.03   2.7
  5   0    2568885      36172     0     0     0     0      0     0    10    814   485  0  1 99  0  0.02   1.7
  5   0    2568885      36172     0     0     0     0      0     0     8    815   492  0  1 99  0  0.02   1.7
  5   0    2568885      36169     0     0     0     0      0     0    11   2153   482  1  2 97  0  0.03   3.4

I know that, a particular JVM or DB process consumed lot of CPU (by ruuning topas)
But am not sure, how to tune it. (*Not sure why it went down)
How to tune Java processes or databases is beyond my area of expertise. I take them as they are and leave the tuning to the DBAs and application engineers.

However, we have now seen two situations of your system: one in which it choked under the load and onw where it is (almost) idle. Again: what you need is to find out the pattern behind it.

In general there are three values to every resource you can define in the HMC profile: "minimum", "desired" and "maximum".

"Minimum" is the minimum amount the LPAR needs to allocate, otherwise it won't start.

"Desired" is how much the LPAR grabs if that much is available. This is the normal amount an LPAR has when it starts.

"Maximum" is how much the LPAR can additionally allocate should it be necessary. This additional resources (the difference between "desired" and "max") will be allocated only during runtime.

The reason why this is done that way is that you can "overcommit" the systems resources. If you have 100GB memory installed you can create LPAR profiles worth 150 GB in total. You leave some of them unstarted and/or the last one will only start with something between "minimum" and "desired" in this case.

What you have to do now is to find sensible values for "desired" and "maximum". This, again, can only be done in monitoring the system for some time.


Quote:
Originally Posted by System Admin 77
How can we set/decide the number of Virtual CPUs in any LPAR. I mean on what basis ?
Basically, a "physical CPU" is what you know as a CPU: a processor you can touch. From one such physical CPU one or several "virtual CPUs" are created. The more virtual CPUs are created from one physical CPU the "smaller" the virtual CPUs become. You allocate a number of physical CPUs to an LPAR and state in the LPAR profile how many virtual CPUs to create from these. If you change the allocated number of processors (physical CPUs) this number of virtual CPUs will not change, they will just get more (or less) powerful.

You need one CPU to run a thread (or - the same - a single-threaded process). Still, these threads may have different demands on processing power. Choose as many cirtual CPUs to satisfy all threads and keep them as small as possible, yet as big as necessary - that is the basic idea. What exactly "necessary", "possible", etc., means: see above, monitor and find out.

About threads/processes: in the vmstat output you see "r" and "b" on the left side. If you regularily see big numbers in "r" the system might profit from a raised number of virtual CPUs, even if they are smaller than now. If there are only low numbers you might be able to reduce on the number of lCPUs. Again: not enough data right now to suggest either.

As an afterthought: when you compare the first and second vmstat output you can notice that the numbers in the run-queue ("r") were low in the first but are high in the second. That basically means: there were few but "CPU-heavy" processes running when the first snapshot was taken but many (very lightweight) processes ran during the second. It would be interesting to know which processes these were/are and if there are dependencies. If (for the last time: this is NOT a suggestion, but it might become one if the data back it up) during times of heavy taxation only few, heavy processes run the machine might profit from fewer (but more potent) lCPUs.

I hope this helps.

bakunin

Last edited by bakunin; 10-08-2013 at 09:40 AM..
This User Gave Thanks to bakunin For This Post:
 

9 More Discussions You Might Find Interesting

1. AIX

AIX 5.3 Issues

We are planning to move to AIX 5.3 and we would like to know if someone has had any 'bad' experiences with it. We have a 32PE p690 Regatta and currently we are running the latest AIX 5.2 with the latest patches. Has anyone any interesting points to mention when transitioning to AXI 5.3? Is... (1 Reply)
Discussion started by: miket
1 Replies

2. AIX

If the AIX need reboot after install fix pack or APAR?

After install fix pack or APAR, if aix need reboot? if not, do we need stop database and all applications before we install fix pack or APAR? (3 Replies)
Discussion started by: rainbow_bean
3 Replies

3. AIX

IY17981 fix required for aix 4.3.3 to aix 5L migration but not found

Hi, redbook documentation is telling that IY17981 fix is required for aix 4.3.3 to aix 5L migration. But there is no mention about that fix in any ML installation packages. - My system is ML11 : oslevel –r 4330-11 - But xlC.rte is on wrong version : lslpp -L xlC.rte xlC.rte ... (3 Replies)
Discussion started by: astjen
3 Replies

4. AIX

AIX filter Issues

Hi, I want to print from AIX 5.3/6.1 using 'pr' preprocessing filter and 'PCL' print file type. Steps: 1. Smitty 2. Print Spooling 3. Create a print queue(remote->Generic) 4. change the attributes for that print queue. 5. Change print file type to PCL and... (1 Reply)
Discussion started by: meeraramanathan
1 Replies

5. AIX

How to install AIX Fix Pack 5300-06-06-0811

Hi All, I have this fix for AIX (5300-06-06-0811) and i need to install it. How can i do this? What are the prerequisites for this fix? Thanks (1 Reply)
Discussion started by: lucaxvu
1 Replies

6. AIX

APAR fix on AIX 53tl9

We have tried to install an APAR fix IZ20298 on a AIX test server. It is requiring a base level of bos.adt.prof of 5.3.0.0 I cannot find this file anywhere. I fould 5.3.0.1 and it still will not install without the base install. Any ideas where I can find bos.adt.prof 5.3.0.0? (1 Reply)
Discussion started by: daveisme
1 Replies

7. AIX

AIX CPU use

Hi Could somebody explain me how AIX is using CPU?? For example when we have 2 processors system is giving all task to one of them till 100% is used ?? Or it's depend on configuration or anything else ?? Best regards enda (3 Replies)
Discussion started by: enda
3 Replies

8. AIX

AIX Fix Pack update

Hi All, i'm try to update my aix 6100.06.05 to 6100.07.00. i download the 4,5 GB of FixPack buy i don't have a required package (devices.chrp.pci.rte 6.1.7.0) This package does not exist on the fix pack (i've check in the .toc file and in the .bff files) On ibm website i see that this... (0 Replies)
Discussion started by: Zio Bill
0 Replies

9. AIX

AIX CPU waits

Guys, I have a question - when nmon reports a sizeable %CPU wait, does that mean - 1) IO operations are slowing CPU down, OR 2) paging slowing the CPU down, OR 3) one cant tell?? I thought the nmon documentation clearly suggested that CPU waits reported in nmon were from disk... (4 Replies)
Discussion started by: getback0
4 Replies
All times are GMT -4. The time now is 06:34 PM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy