dbTalk Databases Forums  

Abrupt cache shrinkage

sybase.public.sqlanywhere.general sybase.public.sqlanywhere.general


Discuss Abrupt cache shrinkage in the sybase.public.sqlanywhere.general forum.



Reply
 
Thread Tools Display Modes
  #1  
Old   
Breck Carter
 
Posts: n/a

Default Abrupt cache shrinkage - 11-19-2004 , 03:03 PM






Is it expected behavior for a 9.0.2.2451 engine to
*abruptly* shrink the cache on Windows XP?

I was under the impression that shrinkage was a
kinder/gentler process than expansion.

Does this behaviour indicate a failure between my chair and
keyboard?

=====
Cache size adjusted to 297528K
DIAG 2004-11-19 15:28:52.859000 9b. Cursor UPDATE Loop:
Input line 15060000 ( 1524351234 bytes )
....
DIAG 2004-11-19 15:33:47.593000 9b. Cursor UPDATE Loop:
Input line 16200000 ( 1640640251 bytes )
DIAG 2004-11-19 15:33:49.000000 9c. Cursor UPDATE Loop
finished
DIAG 2004-11-19 15:33:49.359000 10. COMMIT...
Cache size adjusted to 297856K
Cache size adjusted to 184756K
=====

At this point, a final COMMIT is done and all connections
are closed. COMMITs are frequent so the final one shouldn't
be doing much.

I noticed the same abrupt cache shrinkage earlier in this
batch run, when a busy connection remained open. It was
immediately followed by a longer period of slow cache growth
since the application wasn't nearly finished what it was
doing.

It is a 512M machine with not much else running except a
small PB app... AFAIK it isn't close to running out of RAM.

Engine command line:
"%ASANY9%\win32\dbeng9.exe" -ch 300M -o x.txt -os 1M -x none
x.db

Breck

Reply With Quote
  #2  
Old   
John Smirnios
 
Posts: n/a

Default Re: Abrupt cache shrinkage - 11-19-2004 , 03:50 PM






Nope. Something else in the system must have needed the memory so we
shrank. We always set our target cache size to
(current_working_set_size+available_memory-reserved_amt_for_OS)

Each time we adjust the cache size, we go 75% of the way between where
we were and our new target (to avoid unnecessary oscillations).

If you want to see the statistics we are using for our cache sizing
decisions, add the "-cs" switch to the server and look for output in the
server window.

-john.
--
John Smirnios
Senior Software Developer
iAnywhere Solutions Engineering

Whitepapers, TechDocs, bug fixes are all available through the iAnywhere
Developer Community at http://www.ianywhere.com/developer

Breck wrote:

Quote:
Is it expected behavior for a 9.0.2.2451 engine to
*abruptly* shrink the cache on Windows XP?

I was under the impression that shrinkage was a
kinder/gentler process than expansion.

Does this behaviour indicate a failure between my chair and
keyboard?

=====
Cache size adjusted to 297528K
DIAG 2004-11-19 15:28:52.859000 9b. Cursor UPDATE Loop:
Input line 15060000 ( 1524351234 bytes )
...
DIAG 2004-11-19 15:33:47.593000 9b. Cursor UPDATE Loop:
Input line 16200000 ( 1640640251 bytes )
DIAG 2004-11-19 15:33:49.000000 9c. Cursor UPDATE Loop
finished
DIAG 2004-11-19 15:33:49.359000 10. COMMIT...
Cache size adjusted to 297856K
Cache size adjusted to 184756K
=====

At this point, a final COMMIT is done and all connections
are closed. COMMITs are frequent so the final one shouldn't
be doing much.

I noticed the same abrupt cache shrinkage earlier in this
batch run, when a busy connection remained open. It was
immediately followed by a longer period of slow cache growth
since the application wasn't nearly finished what it was
doing.

It is a 512M machine with not much else running except a
small PB app... AFAIK it isn't close to running out of RAM.

Engine command line:
"%ASANY9%\win32\dbeng9.exe" -ch 300M -o x.txt -os 1M -x none
x.db

Breck



Reply With Quote
  #3  
Old   
John Smirnios
 
Posts: n/a

Default Re: Abrupt cache shrinkage - 11-19-2004 , 04:05 PM



Another thing that could cause an abrupt shrink would be a database
stopping. We keep the cache size less than the sum of the size of all
open files + main heap.

-john.

--
John Smirnios
Senior Software Developer
iAnywhere Solutions Engineering

Whitepapers, TechDocs, bug fixes are all available through the iAnywhere
Developer Community at http://www.ianywhere.com/developer

John Smirnios wrote:

Quote:
Nope. Something else in the system must have needed the memory so we
shrank. We always set our target cache size to
(current_working_set_size+available_memory-reserved_amt_for_OS)

Each time we adjust the cache size, we go 75% of the way between where
we were and our new target (to avoid unnecessary oscillations).

If you want to see the statistics we are using for our cache sizing
decisions, add the "-cs" switch to the server and look for output in the
server window.

-john.


Reply With Quote
  #4  
Old   
Breck Carter [TeamSybase]
 
Posts: n/a

Default Re: Abrupt cache shrinkage - 11-20-2004 , 07:20 AM



Thanks for the tip about -cs. I am going to buy some more RAM for my
laptop today. On Monday afternoon I will have another multi-Gig
request level log file to feed through this process, and I will keep
an eye out for this behavior.

Breck

On 19 Nov 2004 14:05:14 -0800, John Smirnios <smirnios (AT) sybase (DOT) com>
wrote:

Quote:
Another thing that could cause an abrupt shrink would be a database
stopping. We keep the cache size less than the sum of the size of all
open files + main heap.

-john.
--
SQL Anywhere Studio 9 Developer's Guide
Buy the book: http://www.amazon.com/exec/obidos/AS.../risingroad-20
bcarter (AT) risingroad (DOT) com
RisingRoad SQL Anywhere and MobiLink Professional Services
www.risingroad.com


Reply With Quote
Reply




Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off



Powered by vBulletin Version 3.5.3
Copyright ©2000 - 2013, Jelsoft Enterprises Ltd.