dbTalk Databases Forums  

windows/linux performance gap

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


Discuss windows/linux performance gap in the comp.databases.berkeley-db forum.



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

Default windows/linux performance gap - 02-04-2007 , 11:22 PM






Hi,

I'd like to report a very curious, enormous performance gap between a
Linux desktop and an XP laptop. A very write intensive application
runs on both Linux and Windows with nearly identical input. The Linux
machine is a fairly old, 1.3 GHZ desktop, and the Windows machine a
relatively new laptop. Processing takes a few minutes on Linux and a
few hours on Windows. I run some disk performance measurement programs
on both machines and they came back with similar results. The
measurement just does sequential access so it's probably not very
representative, but still it show that there is no obvious big
difference in disk access time. So I doubt that hardware alone can
explain a factor of about 50 in the performance gap.

I'm running BerkeleyDB 4.4, the native implementation accessed through
the JNI Java wrapper.

Any ideas on how I could investigate this? Has anybody else run into a
similar issue?

Thanks a lot in advance,
Borislav


Reply With Quote
  #2  
Old   
michael.cahill@gmail.com
 
Posts: n/a

Default Re: windows/linux performance gap - 02-05-2007 , 05:31 AM






Hi Borislav,

Is the write-intensive application using transactions and flushing
data to the log files on every commit (the default setting when using
transactions)? If so, you may be seeing that Windows really flushes
data and waits for the disk, but under Linux it is configurable, and
many systems are set up not to flush to disk by default.

Try re-running the same test with the DB_TXN_NOSYNC flag set on the
environment and see whether that brings the results closer together.

Otherwise, we'd need to know more about the test: is it single
threaded? How is the Berkeley DB environment configured? What volume
of data is being written, and what sizes are the records/transactions?

Regards,
Michael Cahill, Oracle.


Reply With Quote
  #3  
Old   
Borislav
 
Posts: n/a

Default Re: windows/linux performance gap - 02-05-2007 , 10:49 AM



Hi Michael,

Here's a fuller info:

1) The access is single-threaded.
2) Environment is transactional. It is initialized like this:

EnvironmentConfig envConfig = new EnvironmentConfig();
envConfig.setAllowCreate(true);
envConfig.setInitializeCache(true);
envConfig.setInitializeLocking(true);
envConfig.setInitializeLogging(true);
envConfig.setTransactional(true);

the nosync flag is set on every transaction like this:

TransactionConfig tconfig = new TransactionConfig();
tconfig.setNoSync(true);
Transaction t = env.beginTransaction(null, tconfig)

So, the nosync flag is actually set on every transaction (I had read
about this tweak on this forum before reporting my issue).

So now I tried setting it globally on the environment with
envConfig.setTxnWriteNoSync(true) and it actually helped. A factor of
about 50!

So this means, I have to call env.checkpoint relatively often, right?
Also, what's the difference (if any) b/w
EnvironmentConfig.setTxnWriteNoSync and
EnvironmentConfig.setTxnNoSync?

Thanks a lot for your help!
Borislav

On Feb 5, 6:31 am, michael.cah... (AT) gmail (DOT) com wrote:
Quote:
Hi Borislav,

Is the write-intensive application using transactions and flushing
data to the log files on every commit (the default setting when using
transactions)? If so, you may be seeing that Windows really flushes
data and waits for the disk, but under Linux it is configurable, and
many systems are set up not to flush to disk by default.

Try re-running the same test with the DB_TXN_NOSYNC flag set on the
environment and see whether that brings the results closer together.

Otherwise, we'd need to know more about the test: is it single
threaded? How is the Berkeley DB environment configured? What volume
of data is being written, and what sizes are the records/transactions?

Regards,
Michael Cahill, Oracle.



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.