Transaction Sync and Database Size

Hello,
We're using BDB (via the Java interface) as the persistent store for a messaging platform. In order to achieve high performance, the transactional operations are configured to not sync, i.e., TransactionConfig.setSync(false) . While we do achieve better performance, the size of the database does seem rather large. We checkpoint on a periodic basis, and each time we checkpoint, the size of the database grows, even though records (messages in our world) are being deleted. So, if I were to add, say 10000 records, delete all of them and then checkpoint, the size of the database would actually grow! In addition, the database file, while being large, is also very sparse - a 30GB file when compressed reduces in size to 0.5 GB.
We notice that if we configure our transactional operations to sync, the size is much smaller, and stays constant, i.e., if I were to insert and subsequently delete 10000 records into a database whose file is X MB, the size of the database file after the operations would be roughly X MB.
I understand that transaction logs are applied to the database when we checkpoint, but should I be configuring the behaviour of the checkpointing (via CheckpoinConfig )?
Also, I am checkpointing periodically from a separate thread. Does BDB itself spawn any threads for checkpointing?
Our environment is as follows:
RedHat EL 2.6.9-34.ELsmp
Java 1.5
BDB 4.5.20
Thanks much in advance,
Prashanth

Hi Prashanth,
If your delete load is high, your workload should benefit from setting the DB_REVSPLITOFF flag, which keeps around the structure of the btree regardless of records being deleted. The result should be less splits and merges, and is therefore better concurrency.
Here you can find some documentation that should help you:
Access method tuning: http://www.oracle.com/technology/documentation/berkeley-db/db/ref/am_misc/tune.html
Transaction tuning: http://www.oracle.com/technology/documentation/berkeley-db/db/ref/transapp/tune.html
If you are filling the cache with dirty pages, you can indeed call checkpoint() periodically in the application, or you can create a memp_trickle thread. See the following sections of the documentation:
- Javadoc: Environment -> trickleCacheWrite" http://www.oracle.com/technology/documentation/berkeley-db/db/java/com/sleepycat/db/Environment.html#trickleCacheWrite(int)
Some related thread for the "database size issue", can be found here: http://forums.oracle.com/forums/thread.jspa?threadID=534371&tstart=0
Bogdan Coman

Similar Messages

  • Sharepoint Site and Database Size Conflict

    Hello,
    We are at the initial face of migration from Sharepoint 2010 to Sharepoint online. We have gather all the reports but for some reason, Report for Site show more data size than Content database.
    eg. I have content Database size of 5 GB.
    Site data which also include the subsite size total show as 13 GB. I am confused how is that possible ? Any help appreciated 

    Hi Priti, see the following links for the reason:
    https://social.msdn.microsoft.com/Forums/sharepoint/en-US/34ad8581-b4ae-442d-bce5-1a1f72f6e472/sharepoint-site-and-content-database-size-discrepency?forum=sharepointgenerallegacy
    https://social.msdn.microsoft.com/Forums/sharepoint/en-US/6b5c33f8-be08-466f-81aa-359f8a03ede5/sharepoint-site-collection-size-vs-database-properties-sizemdf-file-size?forum=sharepointadminprevious
    cameron rautmann

  • Data_Transfer and Database size.

    Hello all,
    I am using a Data_Transfer transform to speed up job performance. My question is that if I use these transforms will database size increase by a larger percentage than if not using it. And if so are there options that I can select to limit the size in growth in Data Services and in the Database? The database that is being used is Oracle 11g.
    Thank you

    Hi Shiva,
    Thank you for your response. Just to make sure I understand you mean that after the job is done, whatever temp tables are creating during the "Data_Transfer" are removed from the database and will not take up space? Also does using this method increase the database log size much more than just using a DS job without it?
    Thank you and sorry for all the questions.

  • Transactional Replication and Database Snapshots

    Hi,
    I have a database that is a publisher in transactional replication.
    I create a database snapshot on that database and then let transactions replicate to the subscriber(s).
    I revert the database back to the snapshot.
    What happens to replication?
    Dan Jameson
    Associate Director of IT/DBA
    Children's Oncology Group
    http://www.ChildrensOncologyGroup.org

    Your Log Reader Agent could fail if the publication database LSN is less than the value of the transaction sequence number (max xact_seqno) at the distribution database.  In which case you could execute
    sp_replrestart to resynchronize the Publisher metadata with the Distributor metadata.
    Afterwards it would wise to run a data validation to see how out of sync you are with the Subscriber and use
    tablediff utility or SQL Data Compare to bring the Publisher and Subscriber back into convergence.  Reinitialization is an option as well.  It depends on exactly what you are trying to achieve.
    Brandon Williams (blog |
    linkedin)

  • Rman restore and database size

    I am testing a production database backup from tape.
    Our test machine does not have the same disk space as our production machine.
    Right now, here is the production size info:
    Allocated (GB)               137.16
    Used (GB)                    60.71
    Allocated Free Space (GB)     76.45
    Is there a way to restore with rman and restore only the actual size of the database?
    In my case 61gig instead of 140G.

    Then i am confuse. I had this other problem where i had a big aud$ table in my system tablesace. I have truncated the table, now i need my 20gig space back.
    auditing
    The solution proposed was to do a backup and restore using RMAN after truncating AUD$:
    http://www.dizwell.com/prod/node/613
    I did not tried it yet. But after reading this, i though i could be able to restore a rman backup that takes less space.

  • Urgent: EJB Transaction mechanism and Database Transaction mechanism

    Anybody please clarify me how EJB transaction mechanism use the underlying database transaction mechanism? Here my concern is that in the context EJB transaction, how much reponsibilities are performed by EJB container and how much responsibilities are performed by underlying database server. I will deem it a great favor if you kindly explain the whole story with example(s).

    Actually the ejb container is managing the persistence.
    It will be like this.
    if u r using entity beans or statefull beans
    while creating entity bean class you have to specify in the
    deployment descriptor, which table in the database this bean is representing .
    On the runtime , when you are creating an instance of a entity bean ,that instance will be corresponds to a row in the mapped table.
    what all changes you have made to that instance's attributes ie;
    columns in that row that all will be avilable in the session
    When you commit this particular session .this changes will be written to disk.
    that's how the change is managed ...
    assume if one user is modifying the particular row and another user is deleting it ..which ever transaction commits first will be get effected.
    if modification is committing first and then delete the row will be deleted last.but if first delete and then modify while commiting modifycation..
    you should get an error saying that particular row is missing from storage
    this how ejb container is manging the persistence
    in all cases even in case of synchronus acess
    i think u r cleard with this much

  • Block size in tt for writing data to transaction log and checkpoint files

    Hello,
    what block size is TimesTen using when its writing data to transaction log and checkpoint files? Does it use some fixed block size during filesystem writes?

    Although in theory logging can write 2 KB blocks in almost all circumstances it will write 4 KB or larger so yes a filesystem with a 4 KB block size is fine for both checkpointing and logging.
    Chris

  • Database size and Storage Metrics are mismatching

    Hi,
    When I look at the storage metrics for one of our SharePoint Web Application root site collection it shows the top sized site as 28.2% of parent and the size as 21178.5 MB. When we calculate the total size of the site collection from
    that it should 74994 MB. But when I see the size of the content database ( this is the only site collection in this content database) it shows 185661.5 MB as the size and 26852.5 MB as the space available. When I run the report (Disk Usage By Top Tables)
    on that database it brings the list with dbo.AllDocStreams table at the top (Data - 80333 MB) followed by dbo.AuditData (Data - 48305 MB) followed by dbo.AllUserData (Data - 8593 MB).
    3 years back we migrated this SharePoint Web Application from 2007 to 2010.
    I saw that the recycle bin has only 30 day worth data. 
    How can we reduce the size of the database according to what it shows in the storage metrics? Appreciate any help.
    Thanks.
    rani

    so... your database has:
    80gb in files (includes version history)
    50gb in audit data
    8.5gb of list data
    plus ~27gb of free space for growth between backups
    total of ~165gb (which is close enough to the 185661.5 that you listed)
    you need to split up the site collection, and then spread the site collections across multiple databases.
    Scott Brickey
    MCTS, MCPD, MCITP
    www.sbrickey.com
    Strategic Data Systems - for all your SharePoint needs

  • Counting the size of tablespaces and database

    hi,
    can any one help me with this..
    to write a shell script that counts the size of the tablespaces (excluding the oracle tablespaces like system,sysaux) and come up with the individual database size of evrey databse and mail to team on every month of 2nd for each database.
    thanks in advance..

    to write a shell script that counts the size of the tablespaces (excluding the oracle tablespaces like system,sysaux)To do so requires one to know which shell you use.
    Since you declined to share that with us, You're On Your Own YOYO)!
    How does script know/decide which DBs exist on any system?
    Handle:      user8884944
    Status Level:      Newbie
    Registered:      Dec 13, 2009
    Total Posts:      23
    Total Questions:      15 (15 unresolved)
    Why are you so challenged to get answers to your posts?
    Edited by: sb92075 on Jan 6, 2010 4:52 PM

  • Database size and backups

    I have deleted a large number of records from a database which accounted for much of the space being used as it was not needed at this time. When I take a backup of the database will the size of the db I then restore from this backup be reduced or should
    I shrink the database first. Didn't want to have to perform a shrink operation if not necessary as I've seen posts that it affects performance.
    Thanks
    Robert

    If you have deleted chunks of data and take the backup the size of the backup will be reduced. However if you want to release the unused space from the running database(with out backup and restore), you could do a shrink
    Have a look at this link
    http://dba.stackexchange.com/questions/28360/sql-server-database-size-didnt-decrease-after-deleting-large-number-of-rows
    from
    the above link
    I've blogged about this where I admonished folks to "Don't
    touch that shrink button!" but sometimes... Sometimes you need to. 
    Satheesh
    My Blog |
    How to ask questions in technical forum

  • Transaction executing slow and database undo log increasing soon.

    Dears,
    I developed a transaction which query database many times in a repeater loop and finally generate a SAP MII XML Output Document which I want to display in a html hyper link in MII Navigation.  (Using XacuteQuery and iGrid)
    I found that
    1. if I execute in SAP MII Workbench, the transaction executing very slow, and also the database undo log in D:\oracle\TMI\sapdata2\undo_1\UNDO.DATA1 increasing soon.
    2. If I use MII Schedule Edit to run the transaction, it executing fast.
    Does any one know why?
    Is there any setting can make it executing fast in a MII Workbench?
    Many thanks!
    Ivan

    Hi,
    Can you explain why it's different by using MII Workbench and Scheduler depending on sql  joining and logic?
    My transaction logical is basically as below,
    1. query qualified sfc in SAPME tables
    SELECT *
      FROM (SELECT   s.site, s.sfc, ss.operation_bo, ss.qty_in_queue,
                     ss.qty_in_work, s.priority, s.item_bo, s.shop_order_bo,
                     s.status_bo, ss.sfc_router_bo, ss.step_id, ss.step_sequence,
                     st.status_description, cf.ATTRIBUTE, cf.VALUE
                FROM sfc_step ss,
                     sfc s,
                     sfc_router sr,
                     sfc_routing srt,
                     status st,
                     custom_fields cf
               WHERE sr.handle = ss.sfc_router_bo
                 AND srt.handle = sr.sfc_routing_bo
                 AND s.handle = srt.sfc_bo
                 AND st.handle = s.status_bo
                 AND SUBSTR (s.status_bo, -3) IN ('402', '403', '404')
                 AND sr.handle = ss.sfc_router_bo
                 AND sr.in_use = 'true'
                 AND ((ss.qty_in_queue > 0) OR (ss.qty_in_work > 0))
                 AND s.site = '[Param.1]'
                 AND cf.handle(+) = s.handle
                 AND cf.ATTRIBUTE(+) = 'QTIMECONTROL'
                 [Param.2]
            ORDER BY s.priority DESC, s.sfc)
    WHERE (ATTRIBUTE = 'QTIMECONTROL' AND VALUE != 'N') OR VALUE IS NULL
    2. use Repeater to query sfc's activity_log table
    SELECT   al.site, al.sfc, al.operation, al.operation_revision, op.description,
             al.step_id,
                TO_CHAR (NEW_TIME (date_time, 'PST', 'GMT'),
                         'YYYY-MM-DD'
             || 'T'
             || TO_CHAR (NEW_TIME (date_time, 'PST', 'GMT'), 'HH24:MI:SS')
                                                                     AS date_time,
             TO_CHAR (NEW_TIME (date_time, 'PST', 'GMT'),
                      'YYYY/MM/DD HH24:MI:SS'
                     ) AS complete_date,
             cf.VALUE AS qtime, action_code, ss.operation_bo AS current_op,
             ss.step_id AS current_step_id,
             ss.step_sequence AS current_setp_sequence,
             al.item || ',' || al.item_revision AS item,
             TO_CHAR (SYSDATE, 'YYYY/MM/DD HH24:MI:SS') AS check_time,
             (sysdate-NEW_TIME (date_time, 'PST', 'GMT'))2460 as difference
        FROM activity_log al,
             custom_fields cf,
             sfc s,
             sfc_routing srg,
             sfc_router sr,
             sfc_step ss,
             operation op
       WHERE al.site = '[Param.1]'
         AND (action_code IN( 'COMPLETE' , 'START' , 'SIGNOFF'))
         AND al.sfc = '[Param.2]'
         AND cf.handle(+) =
                   'OperationBO:'
                || al.site
                || ','
                || al.operation
                || ','
                || al.operation_revision
         AND cf.ATTRIBUTE(+) = 'QTIME'
         AND s.handle = srg.sfc_bo
         AND srg.handle = sr.sfc_routing_bo
         AND 'true' = sr.in_use
         AND sr.handle = ss.sfc_router_bo
         AND 0 < ss.qty_in_queue + ss.qty_in_work
         AND s.sfc = al.sfc
         AND al.operation = op.operation
         AND al.operation_revision = op.revision
         AND op.site= '[Param.1]'
         AND al.operation NOT LIKE '%-W'
    ORDER BY date_time DESC
    3. call another transaction to parse  input data and get output data
    4. parse get back data to form a MII xml output Document.
    Thanks!

  • SQLIntegrityConstraintViolationException and database transaction

    Hi,
    I have the following situation:
    - two entities with 1-1 relation
    - there is no "Composition association" since one of the entities is part of another 1-1 relation
    - a view object based on both entities, both are updatable
    - SQL92 SqlBuilder; entities use another attribute to refresh DbSequence after insert
    Use case:
    - user creates a new viewRow, both entities are created
    - user saves data
    - firts entity is persisted OK, key is refreshed (custom code in refreshFKInNewContainees() refreshes key in the other entity)
    - the second entity insert fails due to unique constraint violation
    - exception is thrown and an error message is displayes
    - user changes the duplicated value and saves data again
    - the first entity insert fails, because another entity with the same temporary unique value (used for refresh) already exists in the database (or, if unique constraint is missing in the database, two identical records are inseted and refresh fails)
    The only solution for this problem I found is, to implement a custom Transaction object and do something like:
        public void postChanges(TransactionEvent te){
            try
                super.postChanges(te);
            catch(DMLException ex)
                Throwable t = ex.getCause();
                if(t!=null && t instanceof SQLIntegrityConstraintViolationException)
                        try
                           this.getJdbcConnection().rollback();   
                        catch(SQLException exc)
                throw ex;
        }Is this a good practice? Is there any other way to handle db constraint error without explicitly accessing JDBC transaction?

    Thx Andy!
    Is it 100GB or a particular % of drive space? What if my total log drive is only 80GB? Do you have a link to a whitepaper detailing this?
    Edit - ...and as a followup, is this just monitoring? I'm concerned that Exchange DOES NOT take corrective action (like backpressure is supposed to) for the transaction log drive.
    MA is a can of worms, but you can look at things like adjusting storage monitor thresholds:
    http://blogs.technet.com/b/ehlro/archive/2014/02/20/exchange-2013-managed-availability-healthset-troubleshooting.aspx
    If you are worried about running out of diskspace in the transaction log drive, look at loose truncation instead:
    http://windowsitpro.com/exchange-server-2013/loose-truncation-exchange-server-2013-sp1
    Twitter!: Please Note: My Posts are provided “AS IS” without warranty of any kind, either expressed or implied.

  • Mismatch between the Content Database size and the total of each site collection' storage used.

    Hi All,
    Environment:  SharePoint 2010 with SP2.
    Issue: One of the Content databases size in our farm shows 200 GB as used. There are 25 site collections in the DB and we counted
    the total storage used of all site collections in that Content DB and is not more than 40 GB. (used "enumsites" command and counted the each sitecollections storage used).
    What actions/troubleshooting were done?
    Ran one script which will find the actual size of site collection and how much space used in the disk. But didn’t find major difference in the report.
    Checked “Deleted from end user recycle bin “in all the site collections and no major storage is noticed.
    Planning to Detach the problematic Content DB and attach ,will check whether any major effect is there
    Why the Content DB shows 200 GB as used when the total storage used of all site collections is just 40 GB.
    Appreciate suggestions from any one.
    Best Regards,
    Pavan Kumar Sapara.
    s p kumar

    Hi,
    Thanks for your reply.
    As there is only 20 MB of unallocated space for the above said DB, SQL DB team informed that they cannot perform the DB shrink at this moment.
    So we are thinking to Offload all the site collections to other new DB and then will Drop the problematic database. In this way we can overcome the
    issue.
    Answer for your queries.
    Are the mismatched sizes causing an issue? Are you short on diskspace for DB storage or SQL backups?
    No, there is no issue with the mismatched sizes. We are not on short on disk space. We just worried why it occupies that much size(200 GB) when
    the total storage used of all site collections in that DB is 40 GB.
    Best Regards,
    Pavan Kumar Sapara.
    s p kumar

  • "The transaction log for database 'speakasiaonline' is full." I'm getting this message when I m trying to login to speakasia website and am unable to open it. Pl help.

    The transaction log for database 'speakasiaonline' is full. To find out why space in the log cannot be reused, see the log_reuse_wait_desc column in sys.databases

    What does it return?
    SELECT log_reuse_wait_desc FROM  sys.databases WHERE database_id=2
    Best Regards,Uri Dimant SQL Server MVP,
    http://sqlblog.com/blogs/uri_dimant/
    MS SQL optimization: MS SQL Development and Optimization
    MS SQL Consulting:
    Large scale of database and data cleansing
    Remote DBA Services:
    Improves MS SQL Database Performance
    SQL Server Integration Services:
    Business Intelligence

  • HT4236 Why will my iPod not sync all the photos I want it to - I get a message saying that it cant display certain images.  All my photos are in jpg format and similar size.

    Why will my iPod touch not sync all the photos I want it to.  I get a message saying it cant display some of my photos.  They are all in jpg. format and similar size. Never had any problems before!
    Thanks

    That sounds exactly like an issue that has plagued McAfee users for around a year.
    Try disabling email scanning in your anti virus program.

Maybe you are looking for

  • Enhancing logical database PNPCE

    Dear all, my client wants to include a few z_tables to the standard selection screen and output in their ad hoc reporting infoset in HR. Is there a way to include z_fields to the standard selection screen (PNPCE) as well as output of the ad hoc repor

  • Functions not working please help

    Hi Guys, well here it is: I've been working with flash for a very long time both in as2 and 3 I recently had to re-visit a project in as2 and found something odd. When I create a movie clip with a name:  box_mc and inside I have a function ex: functi

  • Duplicated my entire music library by mistake

    I don't know how I did it, but I somehow duplicated all my itunes songs in my library. I think I did something when I tried to put all my music into one library in Windows 7. How do I get rid of the duplicates without have to delete each song individ

  • Why won't photoshop let me save my images that I edit?

    I have photoshop CS6 and am on a Mac. The photos that I am trying to edit are ones that I have taken and uploaded but everytime I try to save them after editing, I get this message, "the file is locked, you do not have necessary access permissions, o

  • Failed: QuickTime Error: -108

    Everytime I try to use Compressor to create a file using the 'HD for Apple Devices (10 Mbps). it fails within seconds with an error message of 'Failed: QuickTime Error: -108' . I only get this on my MacPro 12 core. The Macbook doesn't have this issue