niXforums Forum Index
 FAQFAQ   SearchSearch   MemberlistMemberlist   UsergroupsUsergroups   RegisterRegister 
 ProfileProfile   PreferencesPreferences   Log in to check your private messagesLog in to check your private messages   Log inLog in 
·  nixdoc.net ·  man pages ·  Linux HOWTOs ·  FreeBSD Tips ·  Forums
navigation Forum index » Databases » Berkeley DB
DBXML modifications very slow using XmlModify
Post new topic   Reply to topic Page 1 of 1 [2 Posts] View previous topic :: View next topic
Author Message
Petra Chong
*nix forums beginner


Joined: 11 Oct 2005
Posts: 8

PostPosted: Wed Jun 28, 2006 3:28 pm    Post subject: DBXML modifications very slow using XmlModify Reply with quote

Hello all,

I have a DBXML database running on Windows XP that I am reading from
and writing to using Python. The pattern of usage of this application
is as follows:

1. Get a message from an external source. Messages describe changes to
objects, which have unique IDs.
2. Transform that message into XML, find out which object it describes
by getting the object ID
3. Insert that entire XML document into the database if no document
with that object ID exists. If a document with that object ID does
exist, insert only the changes, and store the previous ones (so nodes
are versioned).
4. Changes are done using XmlModify.addUpdateStep() and
XmlModify.addAppendStep() with XmlModify.execute() at the end.
5. The database is indexed on the object ID as well as the node
versions.
6. All modifications are done within a transaction; the changes
described in a message are therefore either applied completely, or not
at all.

I notice that modifications are very slow and can take up to a minute.
Logging and profiling confirm that the time is being taken in the call
to XmlModify.execute() and not anywhere else.

I am quite new when it comes to dealing with BDB / DBXML; is there
anything really obvious that I should be looking at? I have not looked
at tuning the database at all, beyond adding indexes on obvious things.

Thanks,

PC
Back to top
Petra Chong
*nix forums beginner


Joined: 11 Oct 2005
Posts: 8

PostPosted: Thu Jun 29, 2006 11:52 am    Post subject: Re: DBXML modifications very slow using XmlModify Reply with quote

I have experimented with adding transaction checkpoints after every
modification and got some success- in most cases, the time taken to
commit goes down to < 1 second.

However, after a certain period of running (I'm trying to determine
this at present), the commits start to take 20 seconds. Memory usage
spikes up to 300MB from 50MB.

I now have the following questions..

1. Why is this the case?

2. Can anyone point me to a good description of what checkpoints are
and what the difference is between these and transaction commits? I
have read the on-disk documentation that comes with the install, and I
don't have a clear picture of what checkpoints are.

3. What could be causing the sudden spike in transaction commit time?

Many thanks,

PC
Back to top
Google

Back to top
Display posts from previous:   
Post new topic   Reply to topic Page 1 of 1 [2 Posts] View previous topic :: View next topic
The time now is Tue Dec 02, 2008 1:56 pm | All times are GMT
navigation Forum index » Databases » Berkeley DB
Jump to:  

Similar Topics
Topic Author Forum Replies Last Post
No new posts Very slow query Michael Sutter MySQL 0 Fri Jul 21, 2006 1:10 pm
No new posts problem updatenodes in dbxml mahdieh Berkeley DB 0 Thu Jul 20, 2006 5:15 pm
No new posts Slow Connectivity via Gigabit Doug V networking 6 Thu Jul 20, 2006 4:16 pm
No new posts JVM Crash with DBXML dgalewsky@gmail.com Berkeley DB 0 Wed Jul 19, 2006 10:35 pm
No new posts Difference between fast and slow system calls balasam shell 1 Tue Jul 18, 2006 10:05 am

Mortgage Loans | Credit Cards | Credit Counseling | Internet Advertising | Loans
Copyright © 2004-2005 DeniX Solutions SRL
 
Other DeniX Solutions sites: Unix/Linux blog |  electronics forum |  medicine forum |  science forum | 
Privacy Policy


Powered by phpBB © 2001, 2005 phpBB Group
[ Time: 0.1500s ][ Queries: 16 (0.0828s) ][ GZIP on - Debug on ]