on 10-14-2010 11:03 AM
Hi All,
We have set the value of the parameter to be as 4g.How do we determine an optimum size for the parameter.Thanks.
Hi,
Apart from all the questions from the other respondents (to which you haven't answered yet), you also haven't told us whether this is a new installation or an existing system (where you would have some ST04 history available to guide you).
If it is a new system, probably the best advice is to initially stick with the values SAPINST sets during the installation (these are derived from the memory sizing you enter in the SAPINST dialog) and see where that gets you.
For an operational SAP system look at the data cache hit rate in ST04. The SAP notes state that this should be 94% or better, but I'd rather go for 97% or better. If you don't reach that figure do the following:
1) Make sure the system has been up and running sufficiently long (preferably at least a few typical workdays) before you draw any conclusions from the hit rate
2) Don't wildly increase the cache if the hit rate is too low. Examine the SQL Cache first. I've had many cases (most in fact) where a low hit rate was not a general problem but was caused by some very expensive SQL statements in terms of physical disk reads. If a few statements account for a significant percentage of physical reads, then try tuning those statements first
3) I always set the parameter sga_max_size to a value higher than the sum of db_cache_size and shared_pool_size. This gives some headroom allowing you to increase the data cache online and see the result (alter system set db_cache_size=<newsize> scope=memory).
4) You can use the catalog view V$DB_CACHE_ADVICE to get an estimate of the amount of physical I/O you could eliminate by enlarging the data cache.
You can also leave the sizing of the caches to Oracle by setting SGA_TARGET (see note 789011). I can't tell you anything specific about that because I've never used it myself (I tend to avoid these "fully automatic" settings).
Hope this helps,
Mark
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi Mark,
I had some questions unanswered since i dont have the acess to the system .I would be getting on monday and let you know with the values.The value increase was recomended by SAP.This is a existing system.It was recently upgraded system and SAP with its post go live check had recomended but i wanted to know why should we be increasing the value.
Hi Mark,
Could you please let me know as to how to check the
For an operational SAP system look at the data cache hit rate in ST04. The SAP notes state that this should be 94% or better, but I'd rather go for 97% or better.
Our sga_max_size is 5872 and sum of db_cache_size and shared_pool_size is 5808.
SQL> show parameter sga_max_size ;
NAME TYPE VALUE
-
-
-
sga_max_size big integer 5872M
SQL> show parameter db_cache_size
NAME TYPE VALUE
-
-
-
db_cache_size big integer 4G
SQL> show parameter shared_pool_size
NAME TYPE VALUE
-
-
-
shared_pool_size big integer 1712M
But SAP has advised us to increas the value os db_cache_size to 4.4 gb.If we do the same then we would exceed the size of the SGA since the sum of shared pool and db pool would become 6217 mb whereas as of now it is 5872 Mb .
Hi Mark,
SQL> select * from V$DB_CACHE_ADVICE;
ID NAME BLOCK_SIZE ADV SIZE_FOR_ESTIMATE SIZE_FACTOR
-
-
-
--- -
-
BUFFERS_FOR_ESTIMATE ESTD_PHYSICAL_READ_FACTOR ESTD_PHYSICAL_READS
-
-
-
ESTD_PHYSICAL_READ_TIME ESTD_PCT_OF_DB_TIME_FOR_READS ESTD_CLUSTER_READS
-
-
-
ESTD_CLUSTER_READ_TIME
-
3 DEFAULT 8192 ON 400 .0977
49475 4.5426 1.5660E+10
26721655 361.9 0
0
ID NAME BLOCK_SIZE ADV SIZE_FOR_ESTIMATE SIZE_FACTOR
-
-
-
--- -
-
BUFFERS_FOR_ESTIMATE ESTD_PHYSICAL_READ_FACTOR ESTD_PHYSICAL_READS
-
-
-
ESTD_PHYSICAL_READ_TIME ESTD_PCT_OF_DB_TIME_FOR_READS ESTD_CLUSTER_READS
-
-
-
ESTD_CLUSTER_READ_TIME
-
3 DEFAULT 8192 ON 800 .1953
98950 3.1803 1.0963E+10
18597240 251.9 0
0
ID NAME BLOCK_SIZE ADV SIZE_FOR_ESTIMATE SIZE_FACTOR
-
-
-
--- -
-
BUFFERS_FOR_ESTIMATE ESTD_PHYSICAL_READ_FACTOR ESTD_PHYSICAL_READS
-
-
-
ESTD_PHYSICAL_READ_TIME ESTD_PCT_OF_DB_TIME_FOR_READS ESTD_CLUSTER_READS
-
-
-
ESTD_CLUSTER_READ_TIME
-
3 DEFAULT 8192 ON 1200 .293
148425 2.3177 7989891499
148425 2.3177 7989891499
13453444 182.2 0
0
ID NAME BLOCK_SIZE ADV SIZE_FOR_ESTIMATE SIZE_FACTOR
-
-
-
--- -
-
BUFFERS_FOR_ESTIMATE ESTD_PHYSICAL_READ_FACTOR ESTD_PHYSICAL_READS
-
-
-
ESTD_PHYSICAL_READ_TIME ESTD_PCT_OF_DB_TIME_FOR_READS ESTD_CLUSTER_READS
-
-
-
ESTD_CLUSTER_READ_TIME
-
3 DEFAULT 8192 ON 1600 .3906
197900 1.7005 5862215553
9772806 132.3 0
0
ID NAME BLOCK_SIZE ADV SIZE_FOR_ESTIMATE SIZE_FACTOR
-
-
-
--- -
-
BUFFERS_FOR_ESTIMATE ESTD_PHYSICAL_READ_FACTOR ESTD_PHYSICAL_READS
-
-
-
ESTD_PHYSICAL_READ_TIME ESTD_PCT_OF_DB_TIME_FOR_READS ESTD_CLUSTER_READS
-
-
-
ESTD_CLUSTER_READ_TIME
-
3 DEFAULT 8192 ON 2000 .4883
247375 1.4549 5015508202
8308099 112.5 0
0
ID NAME BLOCK_SIZE ADV SIZE_FOR_ESTIMATE SIZE_FACTOR
-
-
-
--- -
-
BUFFERS_FOR_ESTIMATE ESTD_PHYSICAL_READ_FACTOR ESTD_PHYSICAL_READS
-
-
-
ESTD_PHYSICAL_READ_TIME ESTD_PCT_OF_DB_TIME_FOR_READS ESTD_CLUSTER_READS
-
-
-
ESTD_CLUSTER_READ_TIME
-
-
3 DEFAULT 8192 ON 2400 .5859
296850 1.3062 4502976423
7421476 100.5 0
0
ID NAME BLOCK_SIZE ADV SIZE_FOR_ESTIMATE SIZE_FACTOR
-
-
-
--- -
-
BUFFERS_FOR_ESTIMATE ESTD_PHYSICAL_READ_FACTOR ESTD_PHYSICAL_READS
-
-
-
ESTD_PHYSICAL_READ_TIME ESTD_PCT_OF_DB_TIME_FOR_READS ESTD_CLUSTER_READS
-
-
-
ESTD_CLUSTER_READ_TIME
-
3 DEFAULT 8192 ON 2800 .6836
346325 1.2065 4159172320
6826735 92.5 0
0
ID NAME BLOCK_SIZE ADV SIZE_FOR_ESTIMATE SIZE_FACTOR
-
-
-
--- -
-
BUFFERS_FOR_ESTIMATE ESTD_PHYSICAL_READ_FACTOR ESTD_PHYSICAL_READS
-
-
-
ESTD_PHYSICAL_READ_TIME ESTD_PCT_OF_DB_TIME_FOR_READS ESTD_CLUSTER_READS
-
-
-
ESTD_CLUSTER_READ_TIME
-
3 DEFAULT 8192 ON 3200 .7813
395800 1.1302 3895998026
6371472 86.3 0
0
ID NAME BLOCK_SIZE ADV SIZE_FOR_ESTIMATE SIZE_FACTOR
-
-
-
--- -
-
BUFFERS_FOR_ESTIMATE ESTD_PHYSICAL_READ_FACTOR ESTD_PHYSICAL_READS
-
-
-
ESTD_PHYSICAL_READ_TIME ESTD_PCT_OF_DB_TIME_FOR_READS ESTD_CLUSTER_READS
-
-
-
-
-
-
ESTD_CLUSTER_READ_TIME
-
3 DEFAULT 8192 ON 3600 .8789
445275 1.0664 3676069195
5991021 81.1 0
0
ID NAME BLOCK_SIZE ADV SIZE_FOR_ESTIMATE SIZE_FACTOR
-
-
-
--- -
-
BUFFERS_FOR_ESTIMATE ESTD_PHYSICAL_READ_FACTOR ESTD_PHYSICAL_READS
-
-
-
ESTD_PHYSICAL_READ_TIME ESTD_PCT_OF_DB_TIME_FOR_READS ESTD_CLUSTER_READS
-
-
-
ESTD_CLUSTER_READ_TIME
-
3 DEFAULT 8192 ON 4000 .9766
494750 1.0121 3488912964
5667261 76.7 0
0
ID NAME BLOCK_SIZE ADV SIZE_FOR_ESTIMATE SIZE_FACTOR
-
-
-
--- -
-
BUFFERS_FOR_ESTIMATE ESTD_PHYSICAL_READ_FACTOR ESTD_PHYSICAL_READS
-
-
-
ESTD_PHYSICAL_READ_TIME ESTD_PCT_OF_DB_TIME_FOR_READS ESTD_CLUSTER_READS
-
-
-
ESTD_CLUSTER_READ_TIME
-
3 DEFAULT 8192 ON 4096 1
506624 1 3447319082
5595309 75.8 0
0
ID NAME BLOCK_SIZE ADV SIZE_FOR_ESTIMATE SIZE_FACTOR
-
-
-
--- -
-
BUFFERS_FOR_ESTIMATE ESTD_PHYSICAL_READ_FACTOR ESTD_PHYSICAL_READS
-
-
-
-
-
-
ESTD_PHYSICAL_READ_TIME ESTD_PCT_OF_DB_TIME_FOR_READS ESTD_CLUSTER_READS
-
-
-
ESTD_CLUSTER_READ_TIME
-
3 DEFAULT 8192 ON 4400 1.0742
544225 .9627 3318597047
5372634 72.8 0
0
ID NAME BLOCK_SIZE ADV SIZE_FOR_ESTIMATE SIZE_FACTOR
-
-
-
--- -
-
BUFFERS_FOR_ESTIMATE ESTD_PHYSICAL_READ_FACTOR ESTD_PHYSICAL_READS
-
-
-
ESTD_PHYSICAL_READ_TIME ESTD_PCT_OF_DB_TIME_FOR_READS ESTD_CLUSTER_READS
-
-
-
ESTD_CLUSTER_READ_TIME
-
3 DEFAULT 8192 ON 4800 1.1719
593700 .9196 3170269518
5116045 69.3 0
0
ID NAME BLOCK_SIZE ADV SIZE_FOR_ESTIMATE SIZE_FACTOR
-
-
-
--- -
-
BUFFERS_FOR_ESTIMATE ESTD_PHYSICAL_READ_FACTOR ESTD_PHYSICAL_READS
-
-
-
ESTD_PHYSICAL_READ_TIME ESTD_PCT_OF_DB_TIME_FOR_READS ESTD_CLUSTER_READS
-
-
-
ESTD_CLUSTER_READ_TIME
-
3 DEFAULT 8192 ON 5200 1.2695
643175 .8796 3032427292
4877594 66.1 0
0
ID NAME BLOCK_SIZE ADV SIZE_FOR_ESTIMATE SIZE_FACTOR
-
-
-
--- -
-
-
-
-
--- -
-
BUFFERS_FOR_ESTIMATE ESTD_PHYSICAL_READ_FACTOR ESTD_PHYSICAL_READS
-
-
-
ESTD_PHYSICAL_READ_TIME ESTD_PCT_OF_DB_TIME_FOR_READS ESTD_CLUSTER_READS
-
-
-
ESTD_CLUSTER_READ_TIME
-
3 DEFAULT 8192 ON 5600 1.3672
692650 .8413 2900186917
4648833 63 0
0
ID NAME BLOCK_SIZE ADV SIZE_FOR_ESTIMATE SIZE_FACTOR
-
-
-
--- -
-
BUFFERS_FOR_ESTIMATE ESTD_PHYSICAL_READ_FACTOR ESTD_PHYSICAL_READS
-
-
-
ESTD_PHYSICAL_READ_TIME ESTD_PCT_OF_DB_TIME_FOR_READS ESTD_CLUSTER_READS
-
-
-
ESTD_CLUSTER_READ_TIME
-
3 DEFAULT 8192 ON 6000 1.4648
742125 .8095 2790580303
4459226 60.4 0
0
ID NAME BLOCK_SIZE ADV SIZE_FOR_ESTIMATE SIZE_FACTOR
-
-
-
--- -
-
BUFFERS_FOR_ESTIMATE ESTD_PHYSICAL_READ_FACTOR ESTD_PHYSICAL_READS
-
-
-
ESTD_PHYSICAL_READ_TIME ESTD_PCT_OF_DB_TIME_FOR_READS ESTD_CLUSTER_READS
-
-
-
ESTD_CLUSTER_READ_TIME
-
3 DEFAULT 8192 ON 6400 1.5625
791600 .7808 2691537726
4287893 58.1 0
0
Hi Mark,
ID NAME BLOCK_SIZE ADV SIZE_FOR_ESTIMATE SIZE_FACTOR
-
-
-
--- -
-
BUFFERS_FOR_ESTIMATE ESTD_PHYSICAL_READ_FACTOR ESTD_PHYSICAL_READS
-
-
-
ESTD_PHYSICAL_READ_TIME ESTD_PCT_OF_DB_TIME_FOR_READS ESTD_CLUSTER_READS
-
-
-
ESTD_CLUSTER_READ_TIME
-
3 DEFAULT 8192 ON 6800 1.6602
841075 .7547 2601525112
4132181 56 0
0
ID NAME BLOCK_SIZE ADV SIZE_FOR_ESTIMATE SIZE_FACTOR
-
-
-
--- -
-
BUFFERS_FOR_ESTIMATE ESTD_PHYSICAL_READ_FACTOR ESTD_PHYSICAL_READS
-
-
-
ESTD_PHYSICAL_READ_TIME ESTD_PCT_OF_DB_TIME_FOR_READS ESTD_CLUSTER_READS
-
-
-
ESTD_CLUSTER_READ_TIME
-
3 DEFAULT 8192 ON 7200 1.7578
890550 .7297 2515374114
3983150 53.9 0
0
ID NAME BLOCK_SIZE ADV SIZE_FOR_ESTIMATE SIZE_FACTOR
-
-
-
--- -
-
BUFFERS_FOR_ESTIMATE ESTD_PHYSICAL_READ_FACTOR ESTD_PHYSICAL_READS
-
-
-
ESTD_PHYSICAL_READ_TIME ESTD_PCT_OF_DB_TIME_FOR_READS ESTD_CLUSTER_READS
-
-
-
ESTD_CLUSTER_READ_TIME
-
3 DEFAULT 8192 ON 7600 1.8555
940025 .7075 2438851175
3850774 52.1 0
0
ESTD_PHYSICAL_READ_TIME ESTD_PCT_OF_DB_TIME_FOR_READS ESTD_CLUSTER_READS
-
-
-
ESTD_CLUSTER_READ_TIME
-
3 DEFAULT 8192 ON 7200 1.7578
890550 .7297 2515374114
3983150 53.9 0
0
ID NAME BLOCK_SIZE ADV SIZE_FOR_ESTIMATE SIZE_FACTOR
-
-
-
--- -
-
BUFFERS_FOR_ESTIMATE ESTD_PHYSICAL_READ_FACTOR ESTD_PHYSICAL_READS
-
-
-
ESTD_PHYSICAL_READ_TIME ESTD_PCT_OF_DB_TIME_FOR_READS ESTD_CLUSTER_READS
-
-
-
ESTD_CLUSTER_READ_TIME
-
3 DEFAULT 8192 ON 7600 1.8555
940025 .7075 2438851175
3850774 52.1 0
0
ID NAME BLOCK_SIZE ADV SIZE_FOR_ESTIMATE SIZE_FACTOR
-
-
-
--- -
-
BUFFERS_FOR_ESTIMATE ESTD_PHYSICAL_READ_FACTOR ESTD_PHYSICAL_READS
-
-
-
ESTD_PHYSICAL_READ_TIME ESTD_PCT_OF_DB_TIME_FOR_READS ESTD_CLUSTER_READS
-
-
-
ESTD_CLUSTER_READ_TIME
-
3 DEFAULT 8192 ON 8000 1.9531
989500 .6757 2329347938
3661346 49.6 0
0
21 rows selected.
Hi,
This means that online expansion of your data cache by 400 MB as advised by SAP is currently impossible, so you will have to change the parameters in the SPFILE and stop + restart Oracle. As explained in my earlier reply I would use the opportunity to also increase the sga_max_size so as to have some extra room to play with the cache sizes online. The memory stats you put into your reply to Fidel seem to indicate your server has sufficient free memory. I also have a feeling that at 1712 MB your shared pool ight be a bit oversized, but let's not touch that now.
So here's one suggestion:
sqlplus / as sysdba
alter system set db_cache_size = 4400M scope=spfile;
alter system set sga_max_size = 7680M scope=spfile;
shutdown immediate
startup
Initial SGA use (apart from some smaller areas) will then be 4400 + 1712 = 6112 MB, giving you about 1.5 GB (7680 - 6122) to experiment with different data cache (and shared pool) sizes without having to stop Oracle.
All this does not invalidate my earlier advice to examine the performance of the data cache and if the hit rate is low to identify SQL statements with high disk I/O. You will have to wait at least a day or so after restarting to get meaningful information about these.
Regards,
Mark
Hello again,
We were replying to one another at the same time, so I missed your V$DB_CACHE_ADVICE output (readability tip: in SQLPLUS type "SET PAGESIZE 9999" before executing the SELECT and also format your reply as code). Anyway, the cache advisor shows that extending your data cache to 4400 MB will yield an estimated reduction in physical reads of less than 4% (read factor = 0.96127), which is not too impressive. I'd still go for the larger SGA_MAX_SIZE so that you can do real-time measurements for different cache sizes.
Regards,
Mark
Hi Mark,
First of all thanks a ton for the reply.
Could you please explain as to how come you have come to the conclusion that our system has enough memory.
One more thing as asked earlier i wanted to know how to calcluate the values as asked by you.
All this does not invalidate my earlier advice to examine the performance of the data cache and if the hit rate is low to identify SQL statements with high disk I/O.
Hi Mark,
As told by you.
ID NAME BLOCK_SIZE ADV SIZE_FOR_ESTIMATE SIZE_FACTOR
-
-
-
--- -
-
BUFFERS_FOR_ESTIMATE ESTD_PHYSICAL_READ_FACTOR ESTD_PHYSICAL_READS
-
-
-
ESTD_PHYSICAL_READ_TIME ESTD_PCT_OF_DB_TIME_FOR_READS ESTD_CLUSTER_READS
-
-
-
ESTD_CLUSTER_READ_TIME
-
3 DEFAULT 8192 ON 400 .0977
49475 4.542 1.5689E+10
26745328 361.8 0
0
3 DEFAULT 8192 ON 800 .1953
98950 3.1802 1.0985E+10
18615848 251.8 0
0
3 DEFAULT 8192 ON 1200 .293
148425 2.3179 8006287634
13468035 182.2 0
0
3 DEFAULT 8192 ON 1600 .3906
197900 1.7006 5874099043
9783093 132.3 0
0
3 DEFAULT 8192 ON 2000 .4883
247375 1.455 5025879007
8317162 112.5 0
0
3 DEFAULT 8192 ON 2400 .5859
296850 1.3063 4512149185
7429312 100.5 0
3 DEFAULT 8192 ON 2800 .6836
346325 1.2066 4167688369
6834000 92.5 0
0
3 DEFAULT 8192 ON 3200 .7813
395800 1.1302 3903822414
6377975 86.3 0
0
3 DEFAULT 8192 ON 3600 .8789
445275 1.0663 3683311781
5996879 81.1 0
0
3 DEFAULT 8192 ON 4000 .9766
494750 1.0121 3495818268
5672844 76.7 0
0
3 DEFAULT 8192 ON 4096 1
506624 1 3454164788
5600857 75.8 0
0
3 DEFAULT 8192 ON 4400 1.0742
544225 .9626 3325118766
5377834 72.8 0
0
3 DEFAULT 8192 ON 4800 1.1719
593700 .9196 3176562181
5121092 69.3 0
0
3 DEFAULT 8192 ON 5200 1.2695
643175 .8797 3038543913
4882563 66.1 0
0
3 DEFAULT 8192 ON 5600 1.3672
692650 .8413 2906116347
4653695 63 0
0
3 DEFAULT 8192 ON 6000 1.4648
742125 .8095 2796317264
4463936 60.4 0
0
3 DEFAULT 8192 ON 6400 1.5625
791600 .7808 2697044716
4292369 58.1 0
0
3 DEFAULT 8192 ON 6800 1.6602
841075 .7547 2606932077
4136632 56 0
0
3 DEFAULT 8192 ON 7200 1.7578
890550 .7297 2520658101
3987530 53.9 0
0
3 DEFAULT 8192 ON 7600 1.8555
940025 .7075 2443800054
3854700 52.1 0
0
3 DEFAULT 8192 ON 8000 1.9531
989500 .6757 2333953178
3664858 49.6 0
0
21 rows selected.
Hi Mark,
Thanks for the instant reponse.
I wanted to know how you have come to the conclusion.Could you please explain in brief if you have some time.Thanks.
Anyway, the cache advisor shows that extending your data cache to 4400 MB will yield an estimated reduction in physical reads of less than 4% (read factor = 0.96127), which is not too impressive. I'd still go for the larger SGA_MAX_SIZE so that you can do real-time measurements for different cache sizes.
Hi Ambarish,
Could you please explain as to how come you have come to the conclusion that our system has enough memory.
total used free shared buffers cached
Mem: 32955484 27024960 5930524 0 116808 17517584
I infer that your server has 32 GB RAM and 5.9 GB is free.
All this does not invalidate my earlier advice to examine the performance of the data cache and if the hit rate is low to identify SQL statements with high disk I/O.
Hit rate: ST04 -> section "Data Buffer" -> value of "Quality (%)"
Expensive statements: ST04 -> SQL Statement Analysis -> Shared Cursor Cache
Accept default selections or enter some reasonable minimum for Disk Reads, e.g. 10000
Sort on Disk Reads
Check statements with high no. of disk reads and high ratio disk reads / buffer gets (choice of "high" ratio is arbitrary, let's say that you first examine the ones where ratio >= 0.25, then work your way down to ratio >= 0.10).
Anyway, the cache advisor shows that extending your data cache to 4400 MB will yield an estimated reduction in physical reads of less than 4% (read factor = 0.96127), which is not too impressive. I'd still go for the larger SGA_MAX_SIZE so that you can do real-time measurements for different cache sizes.
3 DEFAULT 8192 ON 4400 1.0742 544225 .9626 3325118766 5377834 72.8 0 0
Hope this clears up things,
Mark
have you read SAP note 830576?
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
This is the parameter you can evaluate from ST04 data buffer quality. In ST04 if your hit ratio is less than 99%, you need to increas this parameter more.
Also you need to check the sga_max_size before changing this
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Adding a little to the lready asked questions?
is there any other application running on the same server (SAP CI)?
If so, how much memory is using this other application?
Is your Oracle database doing mostly I/O or time is spent in other things (Look at the Oracle wait events)?
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Fidel,
Thanks for the response.nice to see you after many days.
Its our production which hosts CI and DB.
Memory
free
total used free shared buffers cached
Mem: 32955484 27024960 5930524 0 116808 17517584
-/+ buffers/cache: 9390568 23564916
Swap: 20971440 987736 19983704
Is your Oracle database doing mostly I/O or time is spent in other things (Look at the Oracle wait events)?
How should we check the same.Thanks.
Hi,
what version of oracle you on?
What's your OS ?
SAP release ?
Memory of server ?
Mark
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
93 | |
11 | |
10 | |
9 | |
9 | |
7 | |
6 | |
5 | |
4 | |
4 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.