Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations strongm on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

CPU/Memory ratio 1

Status
Not open for further replies.

amarsafy

IS-IT--Management
Feb 17, 2003
15
EG
Hi,
Running Solaris 8 on SUN E12K (4*1050 CPU, 16 GB RAM) with Oracle9 DB
CPU%: 99% Utilization
RAM%: 50% and 0 sr

I believe that the memory is overwhelming the CPU as it was not the case in the previous machine (E10K, 10*450 CPU, 8 GB RAM)

1. Is there a ratio between the cpu and memory configuered?
2. If I reduced the physical memory would it really solve the problem?
3. Is there anyother way to reduce the flow to the CPUs?

My best regards
Aly ELMarsafy
 
Running Oracle in less RAM will mean more disk I/O. Since the Disk is 30,000 time slower than RAM the CPUs will spend more time waiting on Disk and less time thinking, but the users are bound to notice a slow down in their querys.

One big change is the number of back ground jobs you wish to run at any one time, with 10 CPUS you should have tuned the application to allow 9 or 10 batch or report jobs at a time, with 4 CPUs it should be tuned to allow only 3 or 4 batch or report jobs at a time. (since the CPUs are faster, you almost make up for fewer of them.

In Oracle Financials you have a Concurrent Manager which shedules background jobs, your application may use some similar schedular

sar -q as a command will give you a trend on how many CPUs the current load thinks it 'needs'. the second column shows you the % of time at least one job was waiting for a CPU to be free, the first column shows the number of jobs waiting on a CPU when that happens.

it is possible to write an app so that it spends time almost idle then bursts into activity all at once that wants many CPUs, my (purchased) Lab database app wants 7 CPUs every 5 minutes but is idle between bursts, very hard to tune

Keeping the CPUs busy implys you are getting the maximum use out of them, which is good, if the load shown by uptime is about 4 and the number of CPUs desired in sar -q is low, you may be ideal. if it is near 6 and the number of CPUs desidered is near 2 then think of adding another CPU board.

It is always a mistake to think that Mhz equals the power of a CPU, that would only be true if every CPU did the same amount of thinking each cycle. so 4 * 1050 need not be near 10 * 450 in CPU power, but even if it was the same amount of power, you need to tune for fewer jobs that complete faster than before

Show us a uptime, a sar -q and a mpstat 5 5 and we can guess better.





I tried to remain child-like, all I acheived was childish.
 
Hi, thanks for your quick response, here under are the results of uptime, sar -q, mpstat
=========================================================
uptime
11:15am up 13 day(s), 2:43, 14 users, load average: 24.87, 24.63, 25.64
=========================================================
sar -q 2 2
11:16:42 22.3 119 0.0 0
11:16:45 27.3 95 0.0 0

Average 24.8 106 0.0 0
=========================================================
mpstat 5 5
CPU minf mjf xcal intr ithr csw icsw migr smtx srw syscl usr sys wt idl
0 167 49 2581 656 327 1006 364 53 432 13 510 45 40 6 9
1 166 44 1882 1355 1163 959 345 53 496 11 3350 42 42 5 11
2 175 51 2818 282 1 1057 384 55 456 13 995 48 39 5 8
3 168 44 1932 1355 1161 977 349 54 509 11 3520 43 42 5 10
CPU minf mjf xcal intr ithr csw icsw migr smtx srw syscl usr sys wt idl
0 6 2 894 698 590 30 12 2 8 0 62 5 95 0 0
1 352 90 25859 1041 914 505 236 29 668 4 6432 61 39 0 0
2 707 99 17875 240 1 554 266 30 620 0 2477 66 34 0 0
3 65 73 15937 1364 909 1143 514 31 101 0 3066 61 39 0 0
CPU minf mjf xcal intr ithr csw icsw migr smtx srw syscl usr sys wt idl
0 0 0 263 475 373 0 0 0 1 0 0 0 100 0 0
1 205 92 18425 1239 1067 654 301 25 619 1 2211 66 34 0 0
2 200 88 15069 274 1 605 273 25 43 1 674 51 49 0 0
3 204 14 12619 1344 1030 954 439 24 627 1 7422 63 37 0 0
CPU minf mjf xcal intr ithr csw icsw migr smtx srw syscl usr sys wt idl
0 398 100 17597 1119 851 902 408 34 664 0 7011 57 43 0 0
1 673 60 22564 1241 1142 372 168 25 135 0 2830 52 48 0 0
2 406 75 15592 800 1 1719 816 31 637 0 5853 63 37 0 0
3 0 1 6661 1070 1053 40 16 1 76 0 55 2 98 0 0
CPU minf mjf xcal intr ithr csw icsw migr smtx srw syscl usr sys wt idl
0 136 53 12664 1223 991 1160 547 34 636 0 2974 66 34 0 0
1 970 113 31147 1273 1135 554 250 30 119 0 2356 47 53 0 0
2 443 54 11925 713 1 1681 771 35 662 0 12654 57 43 0 0
3 0 0 6331 1088 1080 16 5 0 79 0 0 0 100 0 0

 
What happened to your 10 x CPU's? You only have 4
 
OK this is not good.

something on your Sun wants 24 CPUs and has for some time (uptime is for 1 5 and 15 minutes, sar can show all day)

worse, from the mpstat, your computer is doing almost as much operating system overhead as user tasks, this is not a good sign either. I work to have under 10% sys and often achieve 5% sys. I am guessing we are using a lot of time just changing user tasks very often, which is unproductive

as columns 3 and 4 of the sar are 0 we are not out of memory, but with 16 gig we might have guessed that.

the last 2 columns in mpstat show we are not waiting on Disk I/O and we are not idle, but since we have 24 waiting CPU tasks we are not likely to ever be idle, and if a task waits for disk there are plenty more to use the CPU.

the column syscl indicates something is making a huge number of system calls, which is which the sys column is so high, I hope that is just because too many user jobs want to run at once.

Too be honest, you need more unix expertise than I have, my next oammand to look at would be ps -auxw but I use a berkley ps rather than sun's default ps which is ps -ef and not as useful to me, in any case we need to find what the 24 jobs that are always running are.

/usr/ucb/ps -aux may work

hopefully real unix gurus will jump in

I tried to remain child-like, all I acheived was childish.
 
I'm wondering if the database that was tuned for a system with 10 CPUs should have been tuned again for the fewer number of CPUs when you got the new system?
 
What kind of tunning are we talking about! we have a direct quiries and Business objects hitting that DB beside other DBs from other servers.

I guess there is no much space to tune anyway, is there?
 
I was originally thinking about the CPUs, but that tuning has more to do with application design, which presumably you don't have too much control over.

But, your memory has doubled on the new server. Was the SGA in the database increased when you got more memory?

 
I usually see tuning as four steps:

1) make sure the hardware is set up right RAM interleave, hardware interupts, Disk Mirroring /RAID, NV RAM cache etc.

2) make sure Solaris is setup right for Oracle Semaphores and stuff, mount points mirroring RAID multiplexing

3) tuning the database sizing the block bffers, SQL cache, back ground apps, etc.

4) tuning the SQL: finding the slow statements and making them fast

Business Objects is all adhoc reporting, easy to tune but hard to schedule

I tried to remain child-like, all I acheived was childish.
 
Have you tried [tt]top[/tt] or [tt]prstat[/tt] to see what the top CPU processes are?

 
Did you get your load factor down from 24ish? to lcloser to 4ish?

Can I help with Solaris, Oracle or Business Objects tuning?

jimpalmer@cableone.net

I tried to remain child-like, all I acheived was childish.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top