cancel
Showing results for 
Search instead for 
Did you mean: 

About the cache size of SQL Anywhere 17

I want to set the cache size under 60% of the physical memory.
I guess that the parameters of dbsrv17 are like below.
dbsrv17 -ca 0 -c 60p
dbsrv17 -ch 60p
But I'm not sure.
So please someone teach me the correct answer.


I also want to know how much memory a dbsrv17 process needs.
For example, if the condition is below
physical memory : 8 GB
Cache size : 4.8 GB
Is it possible that a dbsrv17 process uses over 6 GB ?

Accepted Solutions (1)

Accepted Solutions (1)

michael_loop
Contributor

"dbsrv17 -ch 60p" will set the upper limit of cache to 60% of available physical memory.

-c sets the initial cache size, but without other switches to limit resizing, the cache can grow or shrink afterwards.

-ca 0 disables cache resizing. This would rarely be desirable, unless you find that cache growth can't keep up with changing requirements. You might also want to use this if other applications opportunistically grab available memory, starving SQL Anywhere.

-cl sets a lower limit for cache size.

The engine does use a small amount of memory that is not part of the cache, but it is usually a trivial amount. 1.2 GB of memory usage outside of the cache seems unlikely, but maybe others have more precise observations to contribute.

Regards,

Mike Loop
Senior Product Support Engineer
SAP Product Support

0 Kudos

Thank you for your comment.
It helps me.

Answers (1)

Answers (1)

VolkerBarth
Active Participant

In addition to Mike's answer: If you want to limit the maximum cache size to 60 % of the physical memory by using "dbsrv17 -ch 60P", I would also recommend to set an initial cache size to a somewhat lower value, say possibly to 40 % by "dbsrv17 -c 40P -ch 60P".

Note that SQL Anywhere calculates defaults for initial, minimum and maximum cache size both based on OS, available memory and the database file size. For details see here and the description of the inidivual options like dbsrv17 -c here.

I would recommend to monitor the cache-related properties to find out about current cache usage, such as:

select property('CurrentCacheSize'), property('PeakCacheSize'), property('MinCacheSize'), property('MaxCacheSize');

That will show among others the maximum cache size the database server has used since the process has been started (2nd value) compared to the maximum allowed cache size (4th value) – if the 2nd value is smaller, the allowed maximum has not been reached, and a higher maximum cahce size (as specified by -ch) might not even have an effect.

(Of course studying the current cache size is only useful with typical workloads.)

0 Kudos

Thank you for your additional comment.
I try your recommendations.