dbTalk Databases Forums  

effect of cache on Mac OS X (revisited)

comp.databases.berkeley-db comp.databases.berkeley-db


Discuss effect of cache on Mac OS X (revisited) in the comp.databases.berkeley-db forum.



Reply
 
Thread Tools Display Modes
  #1  
Old   
Andi Vajda
 
Posts: n/a

Default effect of cache on Mac OS X (revisited) - 01-09-2006 , 08:30 PM






It used to be that adding cache (env->set_cachesize) on Mac OS X was
detrimental to performance (in versions 4.3.27, 4.3.28, maybe even
4.3.29).
In version 4.4.16, adding cache on the Mac is now *necessary* as
performance without cache is, in my tests, about 4 times slower.

While it is hard for me to tell if 4.3.29 without cache is faster than
4.4.16 with cache (all on OS X 10.4.3), it is good news to see that
cache now has a positive effect.

Still, such a drastic performance characteristics change from one
version to the next begs the question: what else has changed in version
4.4.16 that should make me reconsider my over time empirically created
env configuration settings ?
My current, 4.4.16, OS X DB_CONFIG file says:
set_lk_detect DB_LOCK_MINLOCKS
set_lk_max_locks 32767
set_lk_max_objects 32767
set_flags DB_LOG_AUTOREMOVE
set_cachesize 0 67108864 1
set_flags DB_DSYNC_LOG

Are there such changes on Windows or Linux to look out for as well ?
(didn't notice them myself).

I also notice that env->close() can take a fair amount of time on Mac
OS X with 64 Mb of cache the first time it is run after being freshly
created. Is is this expected ?

Andi..


Reply With Quote
  #2  
Old   
ubell@sleepycat.com
 
Posts: n/a

Default Re: effect of cache on Mac OS X (revisited) - 01-10-2006 , 03:12 PM






Andi,

We are not aware of any cache related issues on Mac OS X with 4.4 or
previous releases. If you have a specific example we would gladly look
into it. In 4.4 we added the feature to relate locks and other objects
in the database to specific process and threads. We have discovered
that on some systems getting the thread id is more expensive than it
aught to be. This should be unrelated to the cache size, but can add
to the processing time of some operations on such operating systems.

Michael Ubell
Sleepycat Software.


Reply With Quote
  #3  
Old   
Andi Vajda
 
Posts: n/a

Default Re: effect of cache on Mac OS X (revisited) - 01-10-2006 , 06:15 PM



ubell (AT) sleepycat (DOT) com wrote:
Quote:
Andi,

We are not aware of any cache related issues on Mac OS X with 4.4 or
previous releases. If you have a specific example we would gladly look
into it. In 4.4 we added the feature to relate locks and other objects
in the database to specific process and threads. We have discovered
that on some systems getting the thread id is more expensive than it
aught to be. This should be unrelated to the cache size, but can add
to the processing time of some operations on such operating systems.

Michael Ubell
Sleepycat Software.
About a year ago I had a serie of email exchanges with Michael Cahill
about this very issue (adding cache on Mac OS X slowing things down).
We concluded that it was an opportunity for improvement on Darwin.
I can send you that email thread if you'd like.
As for the 4 times performance difference between:
- 4.3.29 without cache on OS X 10.4.3
- 4.4.16 without cache on OS X 10.4.3
that is rather easy to verify. If you'd like I can walk you through an
example as well.
Luckily, adding cache resolves the problem. Still, the amount of disk
space used is now 64 Mb larger for no obvious improvement when compared
to 4.3.29.

How would you like to proceed ?

Andi..



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 - 2012, Jelsoft Enterprises Ltd.