cancel
Showing results for 
Search instead for 
Did you mean: 

-cs server option and size of database

3,336

There is the following dbeng12/dbsrv12 server option:
-cs (displays statistics related to dynamic cache sizing in the database server messages window).

Suppose, for example, my database has the following size: 'FileSize' * 'PageSize' = 4 004 655 104
and Start line = C:\\Program Files\\SQL Anywhere 12\\bin64\\dbsrv12.exe -c 4G -cs
Then messages window:

SQL Anywhere Network Server Version 12.0.1.3967
4194304K of memory used for caching
Minimum cache size: 4194304K, maximum cache size: 7529760K
OS Available: 5027080K, Working Set: 151020K, Cache Target: 4069273K, Cached: 96%
OS Available: 5026052K, Working Set: 151420K, Cache Target: 4069330K, Cached: 96%
OS Available: 5025552K, Working Set: 151596K, Cache Target: 4069426K, Cached: 96%
...

But, if Start line = C:\\Program Files\\SQL Anywhere 12\\bin64\\dbsrv12.exe -c 3G -cs
then messages window does not show information about the size of the cache:

SQL Anywhere Network Server Version 12.0.1.3967
3145728K of memory used for caching
Minimum cache size: 3145728K, maximum cache size: 7529760K
...

And if I just increase the size of the database file:

ALTER DBSPACE system ADD 2 GB; 
 /*('FileSize' * 'PageSize'                = 6 152 138 752  and 
   ('FileSize' - 'FreePages') * 'PageSize' = 3 980 476 416) */

the information about the cache no longer appear after reloading the server for -c 4G (or 5G😞

SQL Anywhere Network Server Version 12.0.1.3967
5242880K of memory used for caching
Minimum cache size: 5242880K, maximum cache size: 7529760K
...

Why?

Accepted Solutions (1)

Accepted Solutions (1)

johnsmirnios
Advisor
Advisor

There are a few cases where it won't display information where, perhaps, it could. Generally speaking, no message is displayed whenever neither growing nor shrinking the cache is possible/reasonable. In the cases you've shown, shrinking isn't an option because you are already at the minimum cache size. Growing isn't an option in some of the cases shown because the cache is larger than then entire database file (plus heap plus temp file): since everything can be cached, there's no point in growing. Growing also isn't an option if there have been no cache replacements yet or a few other criteria that likely are not relevant here.

Answers (0)