Quote:
Originally Posted by
newaix
>>actually the server has 4 virtual cpus, is entitled to use 3.6 and being p5 that means 8 threads >>
Can you please clarify this.
your vmstat output says something like lcpu 8 ent 3.6 - if you would run lparstat -i you would see that you have under the value of virtual cpus active 4 virtual cpus.
With micropartitioning you do not have 'physical' cpus at all. What you effectively have is cpu time allowance. So in your setup you are allowing to utilize the system by default 90% time of 4 cpus. With the number of virtual cpus you are allowing the system to spread its load across 4 physical cpus. And each virtual cpu can keep the cpu up to 100% of the time if the workload does require it - if a virtual cpu is not needed at all by the workload, it is folded (given back to the cpu pool of the frame for the other lpars to use it if they need it).
Entitled cpu (time) is guaranteed to your lpar - that means if your lpar is asking for those cpus, it will get them no matter how busy the frame pool is. Ideally this value should be set to the average utilization of any given lpar over a 24 hrs cycle. Virtual cpus are the maximum allowance of cpus that can be used. The difference between ent cpu and virtual cpus comes from the frame pool - activated but currently not used by other lpars cpus that have been either not directly assigned as entitled cpus to other lpars or being handed back to the cpu pool by the scheduler as currently not required. Ideally this is set to the maximum peak utilization value of your lpar and should be higher than your peak utilization. Virtual cpus are always 'full cpus' as each virtual cpu can grow to 100% cpu time. If you reach the amount of cpus (vmstat -Iwt output - pc column) or if your runqueue (the very first column in the same output) is frequently exceeding the amount of lcpus (very top of the output - 8 in your case) than you do not have enough virtual cpus entitled. Each virtual cpus gives you 2 lcpus or threads available to the applications.
If you change the amount of virtual cpus without changing your ent cpus, than this actually means that you are spreading your cpu time allowance across more physical cpus allowing your lpar to be more flexible and the frame to better utilize resources. How much the right amount for your lpar is depends on various different factors like what are your applications are doing.
If your applications are doing many threads with only little load (like typical webservers) than many virtual cpus worth little entitlement (like 10 virtual cpus for 1 ent cpu) might make sense. If you have a multithread medium load workload like the typical oracle DB than you should experiment on what seems to be the optimum for your lpar but usually something between 25 and 50% will be most likely ideal for your lpar (1 ent cpu, 2-4 virtuals). If you have a few big thread workload (like the typical sybase workload with one engine) than the ideal amount of virtual cpus is 1 virtual cpu per engine + 1 cpu for the kernel (on p5 + p6) or 1 virtual cpu per engine (on p7) where one virtual cpu should be between 25% and 80% of one entitled cpu (again depending on what your DB is doing - fewer for oltp, more for reporting workloads. Generally a virtual cpu should not be worth more than 80% of an entitled cpu or the entire virtualization doesnt make any sense.
Regards
zxmaus