Can i create DB in shared mem, rather than backed by a file

Hi
I'm using db 4.2.6 version and trying to create a DB in shared mem rather than a file. How do I achieve that.
While I look at documentation here:
http://www.oracle.com/technology/documentation/berkeley-db/db/programmer_reference/env_region.html
==========
If the DB_SYSTEM_MEM flag is specified to DB->open(), shared regions are created in system memory rather than files. This is an alternative mechanism for sharing the Berkeley DB environment among multiple processes and multiple threads within processes.
===========
But DB->open() rejects DB_SYSTEM_MEM flat out. db->open() doesn't even talk about flag:
http://www.oracle.com/technology/documentation/berkeley-db/db/api_reference/C/dbopen.html
I could specify DB_SYSTEM_MEM for DBENV.
Here is my code. Also DBENV->open() won't let me specify DB_PRIVATE.
flags = DB_INIT_MPOOL | DB_CREATE | DB_SYSTEM_MEM | DB_INIT_TXN | DB_RECOVER | DB_INIT_LOG |
            DB_LOG_AUTOREMOVE;
dbenv->open(dbenv, dbhome, flags, 0);
flags = DB_CREATE | DB_EXCL| DB_AUTO_COMMIT;
dbp->open(dbp, NULL, dbfile, NULL, DB_BTREE, flags, 0);If I create db as above, where is it getting created? I don't see it here:
# ./bdbperf -t -i 10000 -k 32 -v 128;ls -la dbtest
create log/transaction
creating in system mem
inserted 10000 records. errs 0
logs removed
inserting 10000 records took 0s.290ms (29 micros/op)
done. 0s.290ms
total 200
drwxr-xr-x 2 root root 80 Jul 17 03:04 .
drwxrwxrwx 7 root root 1180 Jul 17 03:04 ..
-rw-r----- 1 root root 8 Jul 17 03:04 __db.001
-rw-r----- 1 root root 190424 Jul 17 03:04 log.0000000011
However, if I specify a filename arg in dbp->open(), I do see a file with that name in my env dir 'dbtest'. db_stat on such file seems to be good.
# ./lt-db_stat -d dbfile -h dbtest
Sat Jul 17 02:38:01 2010 Local time
53162 Btree magic number
9 Btree version number
Little-endian Byte order
Flags
2 Minimum keys per-page
1024 Underlying database page size
239 Overflow key/data size
4 Number of levels in the tree
10000 Number of unique keys in the tree
10000 Number of data items in the tree
171 Number of tree internal pages
79122 Number of bytes free in tree internal pages (54% ff)
1822 Number of tree leaf pages
738356 Number of bytes free in tree leaf pages (60% ff)
0 Number of tree duplicate pages
0 Number of bytes free in tree duplicate pages (0% ff)
0 Number of tree overflow pages
0 Number of bytes free in tree overflow pages (0% ff)
0 Number of empty pages
0 Number of pages on the free list
So:
1. how do I create DB in shared-mem area and
2. how do I get stats for such DB?
Appeciate any help.

Hi,
user3143985 wrote:
I'm using db 4.2.6 version and trying to create a DB in shared mem rather than a file. How do I achieve that.There must be a typo, as there is no 4.2.6 release.
user3143985 wrote:
While I look at documentation here:
http://www.oracle.com/technology/documentation/berkeley-db/db/programmer_reference/env_region.html
When reading the documentation, I would indicate to read the documentation from the release package you downloaded. The online documentation is accurate for the latest BDB release.
user3143985 wrote:
==========
If the DB_SYSTEM_MEM flag is specified to DB->open(), shared regions are created in system memory rather than files. This is an alternative mechanism for sharing the Berkeley DB environment among multiple processes and multiple threads within processes.
===========
But DB->open() rejects DB_SYSTEM_MEM flat out. db->open() doesn't even talk about flag:
http://www.oracle.com/technology/documentation/berkeley-db/db/api_reference/C/dbopen.html
That's a documentation error, it should refer to the DB_ENV->open()method. Thanks for pointing it out! As you can see, the DB_SYSTEM_MEM is linked to the DB_ENV->open() method: http://www.oracle.com/technology/documentation/berkeley-db/db/api_reference/C/envopen.html#envopen_DB_SYSTEM_MEM
user3143985 wrote:
1. how do I create DB in shared-mem area and This page should clarify this question and how a memory-only configuration looks like: http://www.oracle.com/technology/documentation/berkeley-db/db/programmer_reference/program_ram.html
user3143985 wrote:
2. how do I get stats for such DB?If you want to allocate region memory from the heap instead of from memory backed by the filesystem or system shared memory, you'll have to specify DB_PRIVATE ( http://www.oracle.com/technology/documentation/berkeley-db/db/api_reference/C/envopen.html#envopen_DB_PRIVATE ). DB_PRIVATE should not be specified if more than a single process is accessing the environment because it is likely to cause database corruption and unpredictable behavior. For example, if both a server application and Berkeley DB utilities (for example, db_archive, db_checkpoint or db_stat) are expected to access the environment, the DB_PRIVATE flag should not be specified.
Bogdan Coman

Similar Messages

  • Can I create a calendar in French rather than in my default English?

    I want to create a 2009 calendar to send to a French-speaking friend. It would be nice if I could produce one that displays the names of the months etc in her own language. Is there a straight-forward way to create an iPhoto calendar in French instead of my default English?

    virro:
    I believe you can go to the System/International preference pane and set the computer's language to French. That should let you create your calendar in French and order it. Then reset the default language back to English.
    TIP: For insurance against the iPhoto database corruption that many users have experienced I recommend making a backup copy of the Library6.iPhoto (iPhoto.Library for iPhoto 5 and earlier) database file and keep it current. If problems crop up where iPhoto suddenly can't see any photos or thinks there are no photos in the library, replacing the working Library6.iPhoto file with the backup will often get the library back. By keeping it current I mean backup after each import and/or any serious editing or work on books, slideshows, calendars, cards, etc. That insures that if a problem pops up and you do need to replace the database file, you'll retain all those efforts. It doesn't take long to make the backup and it's good insurance.
    I've created an Automator workflow application (requires Tiger or later), iPhoto dB File Backup, that will copy the selected Library6.iPhoto file from your iPhoto Library folder to the Pictures folder, replacing any previous version of it. It's compatible with iPhoto 6 and 7 libraries and Tiger and Leopard. Just put the application in the Dock and click on it whenever you want to backup the dB file. iPhoto does not have to be closed to run the application, just idle. You can download it at Toad's Cellar. Be sure to read the Read Me pdf file.
    Note: There's now an Automator backup application for iPhoto 5 that will work with Tiger or Leopard.

  • Can I purchase TTS voices that can be uploaded into Cap. 7 rather than imported as seperate files?

    I purchased Neospeech in the past and had to create the files in their software and import them into Captivate. Can I purchase a voice that can be used in the same way as those that come free with the Captivate software?

    To integrate the voices, see some tips from Kimberly CBT on this thread.
    http://forums.adobe.com/message/5734631#5734631
    On this thread, John Pierre mentioned that he could integrate Cereproc's voices easily with Captivate 6. See if you can get a trial version to check the voice quality and other aspects before you pay for the full version.
    http://forums.adobe.com/message/5027815#5027815
    Sreekanth

  • Is it possible to use Aperture to make a new image from two existing ones--ie, in a new jpg? I essentially want to create a collage that I can then print as a single image, rather than in a book. Any advice will be most welcome!

    Is it possible to use Aperture to make a new jpg from two existing ones? I'd essentially like to create a photo collage (without using existing templates) that I can then print as a single image, rather than in a book. Any advice will be most welcome! Thanks.

    https://discussions.apple.com/message/15678716#15678716
    (Added)
    The main point is that Aperture is used to make digital negatives as good as they can be (for the uses you define), but it does not ADD date to your digital negatives, nor does it produce NEW combination files.  For those tasks you need a Graphics program.
    Message was edited by: Kirby Krieger

  • Can i manage ibook collections on itunes, rather than on the ipad

    can i manage ibook collections on itunes, rather than on the ipad.

    did you mean, iTunes Store and then Books?  thats the only thing i can find (following your notes above).
    what I am trying to do is add PDF documents to iBooks and organise them into collections. 
    however, i have found a work around:
    1. transfer the PDFs to the library (they go into Books automatically)
    2. highlight/select the PDFs that I want to group
    3. right click, get info, info tab
    4. create a Genre.
    doing this method creates categories.  not as good as collections, but this will do for now.
    if anyone can tell me how to create collections for iBooks (using iTunes - not iBooks on the iPad); please reply.
    thanks anyway.

  • HT5361 Can mail preview be diplayed on bottom rather than side

    Can mail preview be diplayed on bottom rather than side

    Hi tdenoia,
    Welcome to the Support Communities!
    The article below explains some viewing options for Mail.
    Most of these changes can be made by choosing Mail in the menu bar, choosing Preferences, and then selecting the Viewing command on the toolbar.
    Mail (Mountain Lion): View messages
    http://support.apple.com/kb/PH11705
    Mail > Preferences, click Viewing
    To see the Preview on the bottom of the screen, choose the "Classic" layout option.
    Resize the message preview
    You can increase or decrease the area in which a message is displayed, or hide that area and show only the message list.
    Resize the message preview:
    Drag the separator bar left or right.
    Show or hide the message preview:
    Double-click the separator bar.
    I hope this information helps ....
    Happy Holidays!
    - Judy

  • Can 'track list' button show your playlist rather than album track list?

    Hi all
    My 3GS iPhone has my music on it in the form of whole albums which live in individual playlists on my Mac, but I also have playlist 'mixes' which I've created from various songs from multiple albums.
    When selecting to play a 'mixed' playlist on my iPhone I tap on it, tap the first song to start the music playing, but then if I tap the top right 'track list' button, instead of showing all the tracks in my created playlist it just shows the entire album tracks from where this particular song has come from. Visually I prefer the 'track list' screen but it seems I can't use it if I'm playing a 'mixed' playlist. Is there any way around this?
    Also, this is the same if I have a double CD album: once I hit the 'track list' button it shows just CD 1 (or 2 if I'm further down the play list of course), rather than all the tracks even though on they all live in one single playlist on my iTunes. I've even taken the starts of the track names off (some of them start with '1_01 Song Title' for example) when importing them into iTunes to see if that helps but it doesn't: the iPhone KNOWS how that track was originally supplied!
    Any help or clarification on this would be very helpful!
    Markos

    sadly, that kind of customization is only easily doable on a computer. the iPhone and it's core apps can not be changed by users. you can request the feature be put in, but unless there are a LOT of requests, you shouldn't get your hopes up as there are a lot of these kinds of requests, and by implementing it, how many other users would be angry and demand it be changed back? http://www.apple.com/feedback/
    if you are playing a song that you selected in a playlist, you should be able to hit the 'back' button in the top left to go back to the playlist and view your songs in the playlist.
    in regards to the 'cd 1 of 2' thing, you will need to change your song info to get this to show in the format you want. to see the song info, select a song and go to 'file -> get info'. that will show you all of the ID3 tag information, which you can edit to do whatever you want.

  • Can Project Web App track output produced rather than time spent?

    Hi -- I understand how team members can track the amount of time that they've spent on different tasks using Project Web App.  However, what I really need to keep track of is how much they've produced, rather than how much time that they've spent on
    it. 
    For example, I would like each team member to be able to give me a weekly report that says:
    # of sparkly blue widgets completed:  10
    # of pink matte widgets completed: 15
    # of beige widget accessories: 50
    I don't care how long it took them to make any of the widgets or widget-related items.  I just want to know how many each team member made in a week. Right now we do this in Excel, but I would love to figure out a way to make some sort of form in PWA
    where they could just enter their numbers. 
    Is that possible? 
    Thanks

    Hi,
    In the above provided articles the video briefs with the steps with which we can build the reports according your requirements.
    https://support.office.microsoft.com/en-in/article/Whats-new-in-Project-2013-1d223a6e-9e54-4c42-a79b-6df1fa59f5f0?CorrelationId=98506976-c209-406b-9f60-fb4b397f391c&ui=en-US&rs=en-IN&ad=IN
    Reports can also be built from SQL\Sharepoint using SSRS feature. Many TechNet articles are inplace to build these reports.
    The below article provides the steps to create reports from Project Professional.
    https://support.office.microsoft.com/en-in/article/Report-on-project-status-6e74dc79-0e2d-480b-b600-3a466bf289a3
    Cheers!! Happy troubleshooting!!!
    Shiva Prasad B C

  • How can I use the database default time rather than Java supplied time

    I've searched over and over and nobody seems to have this issue so maybe its just me!
    When inserting a record I would like the a create_date column to automatically use the database time rather than a supplied time via JPA. That was all times a relative to the database which makes sense.
    The trouble is I cant figure out how to do this in a sensible manor.
    If I specify an column like :
         @Temporal(TemporalType.TIMESTAMP)
         @Column(name = "CREATE_DATE")
         private Date createDate;
    and IDL
    CREATE_DATE TIMESTAMP WITH TIME ZONE DEFAULT CURRENT_DATE NOT NULL
    If I leave createDate null I get an exception. If modify the column to allow Nullable then column is set as Null.
    If I leave the column out of the entity bean and then and create a row then the database current time is inserted. The trouble then is that if I want to read the date I'm going to have to create a copy of the bean but with the CREATE_DATE in it, and this doesn't make sense.

    I should also mention that TopLink has always supported the ability to retrieve the current time from the database for use in optimistic locking. The TimestampLockingPolicy offers the ability to configure the next value being retrieved from the database instead of using the local time from the JVM. Our extended optimistic locking configuration does not currently support setting this option but it could be done using a descriptor customizer which can be configured in your persistence unit properties.
    Using optimistic locking may be a good solution for the last modified date since it will also ensure that you do not corrupt the database if someone else has incremented this value since your last read.
    Doug

  • How can I file at last location rather than location of current file?

    I have Abobe Reader X.  In the old Adobe, when I saved a file, it took me to the last folder I was in, not the location of the current file.  Thus far, I have not been able to find out how to get Adobe Reader X to do this.  I even asked work help desk for help and their solution to unclick 'Automatically save document changes to temp file' worked once. 
    Is it possible?  This is what I want.
    Example:
    I open file that is saved at Y:Scanned Files and save it at
    X:Dogs/Breeds/Hounds/Sighthounds/Basenjis.  I open the next file that is at Y:Scanned Files and click on File:Save As/PDF and window opens to save at Y:Scanned Files rather than at X:Dogs/Breeds/Hounds/Sighthounds/Basenjis, where I just was.  I want to save file at X:Dogs/Breeds/Hounds/Sighthounds/Afghans so instead of just one click, I now have to go through six.  Now imagine you have 30 or 40 documents you have to save.  That's minimum 180 clicks versus 30.  A big difference.  And if you multiply it further by daily and weekly, it's a lot.
    How can I get Adobe Reader X to open the 'save as' window at the last location rather than the current file's address?  I also have Adobe Acrobat, but can't figure out how to get it work in that either.
    I do not like Adobe Reader X.   Unfortunately, it got downloaded automatically at work. 
    Another complaint I have is when I have Adobe Acrobat open and I click on a pdf to open, rather than open in Adobe Acrobat, it opens in Adobe Reader X (which was not the case with the previous Reader).  If I want to open a doc in Acrobat, I have to go to Acrobat and File/Open, which is a pain.
    Another complaint is, why do you have 'save as' and then 'pdf' or 'text'?  This is another time consuming click I have to make.  Add it to the 180 I'm already making above and you can see why I'm extremely unhappy and frustated with this version of Adobe. 
    Please let me know if the above is feasible or not and if it is, how to do it.  If it isn't feasible, please make the above adjustments to Reader Y and put it out pronto.  Thank you.

    If you would like to contact one of the UK based BT Care Team who moderate this forum, they may be able to help you.
    They can be contacted using this link BT Care Team
    They normally respond by phone or e-mail, within three working days, however you should get an immediate confirmation, with a tracking number.
    There are some useful help pages here, for BT Broadband customers only, on my personal website.
    BT Broadband customers - help with broadband, WiFi, networking, e-mail and phones.

  • My entire iTunes library has been duplicated.  How can I delete all duplicates at once rather than each one individually?

    My entire iTunes library has been duplicated.  Is there any command that will let me delete all duplicates at once, rather than each individual song?

    In particular:
    Once you have used the Show Exact Duplicates feature* you can set about deleting all but one copy of each duplicate file. If all the duplicates have recently been added into your library then you could sort the list on the date added column, select a range of tracks with SHIFT-click and delete all the recent entries.
    * On a Mac hold down Option, then click File > Show Exact Duplicates.
    You could also check out Doug's Scripts for useful tools.
    tt2

  • How can I get iTunes to use voucher rather than credit card when downloading to iPod touch?

    How can I set up an iPod touch so that it uses iTunes vouchers when downloading apps etc rather than charging to a credit card?

    Hello, Helen. 
    Thank you for visiting Apple Support Communities. 
    Here is the best resource on how iTunes Store purchase are billed. 
    iTunes Store: How iTunes Store purchases are billed
    http://support.apple.com/kb/HT5582
    Regards,
    Jason H. 

  • How can I split edit css screen horizontally rather than vertically?

    How can I split the edit css split-screen horizontally rather than vertically?

    Unfortunately, Firefox doesn't have a built in "tile two windows side-by-side" command. There might be an add-on for that (in a quick search, I mostly found add-ons to tile two or more tabs rather than separate windows).
    If that sounds completely off topic, can you describe the steps to get to what you're seeing?

  • Can photos be edited via apple tv rather than with iphoto

    Im able to view my selected photos from iPhoto/tunes through Apple TV, however I'm wondering if there's a way to edit photos through Apple TV rather than iPhoto.

    Welcome to the Apple Community.
    No, there are no editing features on the Apple TV.

  • Can I make ICloud my online storage rather than Google

    I keep getting messages that my Google folder is full at 15 G and they want to charge 1.99/mo for more storage. I already pay for extra ICloud storage, if I use Safari instead, does my info go to that storage instead? When did this change in using Google start? Is there some other function I'm missing here?

    iCloud storage is intended for use with iDevices' data rather than storing that data on the computer via iTunes. It is not for general cloud storage.

Maybe you are looking for