Latency increase with large number of databases

Hello,
I'm testing how BDB performs on random updates as the number of databases increases. I'm seeing increase in latency as the number of databases goes up. and strace shows that more time is spent on futex() when there are more databases. Is this an expected behavior?
Thanks!
--Michi
Set Up:
<li> BDB version: db-5.1.19
<li> Operating system: RHEL4
<li> Number of records: 2.5M
<li> Record key size: 32B
<li> Record value size: 4KB
<li> Page size: 32KB
<li> Access method: BTREE
<li> Records are inserted into a database based on the hash of the key.
<li> BDB is accessed via RPC server
<li> RPC server thread pool size: 64. All the threads share the same env and db handles.
<li> Number of RPC client process: 64
<li> Each client does random updates. Throughput is throttled to be about 250 requests/sec, which means each process does about 4 requests/sec.
Flags used for env and db:
ENV flag DB_THREAD | DB_RECOVER | DB_CREATE | DB_READ_COMMITTED | DB_INIT_TXN |
         DB_INIT_LOCK | DB_INIT_LOG | DB_INIT_MPOOL
DB flag DB_AUTO_COMMIT | DB_CREATE | DB_THREADDB_CONFIG
mutex_set_max 2000000
set_cachesize 1 0 1
set_lk_max_objects 2000
set_lk_max_locks 10000
set_lk_max_lockers 10000
set_lg_regionmax 8388608
set_lk_detect DB_LOCK_DEFAULT
set_thread_count 20000
set_lg_max 1073741824 Result
Number of databases: 256
Average latency: 52 milliseconds
strace output
% time     seconds  usecs/call     calls    errors syscall
64.74  121.199645        1032    117398           recvfrom
17.21   32.217921         487     66104      9335 futex
  8.76   16.409370        2724      6024           pread
  2.47    4.630256         813      5694           fdatasync
  2.19    4.102371         105     39162           sendto
Number of databases: 512
Average latency: 123 milliseconds
strace output
% time     seconds  usecs/call     calls    errors syscall
58.33  121.384230         933    130158     20045 futex
23.06   47.977408         383    125146           recvfrom
  4.41    9.167276        1425      6431           pread
  3.11    6.472676         155     41716           sendto
  3.08    6.414824         366     17506           sched_yield
Number of databases: 1024
Average latency: 133 milliseconds
strace output
% time     seconds  usecs/call     calls    errors syscall
70.46  102.981390        1077     95656     14884 futex
  9.88   14.435594         169     85256           recvfrom
  5.48    8.008787        1825      4389           pread
  3.13    4.576880         368     12436           sched_yield
  2.98    4.351077         153     28415           sendto
...

Hi James,
Presently, we never evict a DB after it's opened or encountered during recovery. Each DB takes about 2,000 bytes. So if you have 16K DBs you need approximately 32MB of memory, assuming all of them could be opened or recovered during a process lifetime. Unfortunately, even closing them does not cause them to be evicted. If you encounter them during recovery, this will also pull them into memory.
We have an FAQ entry on this:
http://www.oracle.com/technology/products/berkeley-db/faq/je_faq.html#37
So you will need a bigger cache size. If you are encountering this during recovery, then you could try a more frequent checkpoint interval.
I hope this is useful.
Regards,
Charles Lamb

Similar Messages

  • OutOfMemoryError with large number of databases

    Hey,
    I was wondering how the databases themselves are tracked in an environment and whether caching is handled differently for this information. we have one environment with many (~16000) databases. each database only has a few entries. when we start up our process with 64mb heap size, the process gets an OutOfMemoryError just opening the environment, even with the maxMemoryPercent set to 10%. It seems like bdb is not handling the database info well. any ideas would be helpful.
    thanks,
    -james

    Hi James,
    Presently, we never evict a DB after it's opened or encountered during recovery. Each DB takes about 2,000 bytes. So if you have 16K DBs you need approximately 32MB of memory, assuming all of them could be opened or recovered during a process lifetime. Unfortunately, even closing them does not cause them to be evicted. If you encounter them during recovery, this will also pull them into memory.
    We have an FAQ entry on this:
    http://www.oracle.com/technology/products/berkeley-db/faq/je_faq.html#37
    So you will need a bigger cache size. If you are encountering this during recovery, then you could try a more frequent checkpoint interval.
    I hope this is useful.
    Regards,
    Charles Lamb

  • BerkeleyDB + Tomcat + large number of databases.

    Hi all,
    for my bioinformatics project, I'd like to transform a large number of SQL databases (see http://hgdownload.cse.ucsc.edu/goldenPath/hg18/database/ ) to a set of read only BerkeleyDB JE databases.
    In my web application , the Environment would be loaded in tomcat and one can imagine a servlet/jsp querying/browsing each database.
    Then I wonder what are the best practices ?
    Should I open each JE Database for each http request and close it at the end of the request ?
    Or should I just let each Database open once it has been opened ? Wouldn't it be a problem if all the database and secondary databases are all open ? Can I share one Database for some multiple threads ?
    Something else ?
    Many thanks for your help
    Thanks in advance
    Pierre

    Hi Pierre,
    Normally you should keep the Environment and all Databases open for the duration of the process, since opening and closing a database (and certainly an environment) per request is expensive and unnecessary. However, each open database takes some memory, so if you have an extremely large number of databases (thousands or more), you should consider opening and closing the databases at each request, or for better performance keeping a cache of open databases. Whether this is necessary depends on how much memory you have and how many databases.
    You'll find the answer to your multi-threading question in the getting started guide.
    Please read the docs and also search the forum.
    --mark                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                               

  • How to Capture a Table with large number of Rows in Web UI Test?

    HI,
    Is there any possibility to capture a DOM Tabe with large number of Rows (say more than 100) in Web UI Test?
    Or is there any bug?

    Hi,
    You can try following code to capture the table values.
    To store the table values in CSV :
    *web.table( xpath_of_table ).exportToCSVFile("D:\exporttable.csv", true);*
    TO store the table values in a string:
    *String tblValues=web.table( xpath_of_table ).exportToCSVString();*
    info(tblValues);
    Thanks
    -POPS

  • Lookups with large number of records do not return the page

    Hi,
    I am developing an application using Oracle JHeadstart 10.1.3 Preview Version 10.1.3.0.78
    In my application I created a lookup under domains and used that lookup for an attribute (Display Type for this attribute is: dropDownList) in a group to get the translation fro this attribute. The group has around 14,800 records and the lookup has around 7,400 records.
    When I try to open this group (Tab), the progress shows that it is progressing but it does not open even after a long time.
    If I change the Display Type for the attribute from dropDownList to textInput then it works fine.
    I have other lookups with lower number of records. Those lookups work fine with dropDownList Display Type.
    Only I have this kind of problem when I have a lookup with large number of records.
    Is there any limitation of record number for lookups under Domains?
    How I can solve this?
    I need to translate the attribute (get the description from another table using the code).
    Your help would be appreciated.
    Thanks
    Syed

    We have also faced similar issue, but us, it was happening when we were using the dropDownList in a table, while the same dropDownList was working in table format. In our case the JVM is just used to crash and after google'ing it here in forums, found that it might be related to some JVM issue on Windows XP machines without Service Pack 2.
    Anyway... the workaround that we taken to get around the issue is to use LOV instead of a dropDownList in your jHeadStart.
    Hope this helps...
    - rutwik

  • Barcode CODE 128 with large number (being rounded?) (BI / XML Publisher 5.6.3)

    After by applying Patch 9440398 as per Oracle's Doc ID 1072226.1, I have successfully created a CODE 128 barcode.
    But I am having an issue when creating a barcode whose value is a large number. Specifically, a number larger than around 16 or so digits.
    Here's my situation...
    In my RTF template I am encoding a barcode for the number 420917229102808239800004365998 as follows:
    <?format-barcode:420917229102808239800004365998;'code128c'?>
    I then run the report and a PDF is generated with the barcode. Everything looks great so far.
    But when I scan the barcode, this is the value I am reading (tried it with several different scanner types):
    420917229102808300000000000000
    So:
         Value I was expecting:     420917229102808239800004365998
         Value I actually got:         420917229102808300000000000000
    It seems as if the number is getting rounded at the 16th digit (or so, it varies depending of the value I use).
    I have tried several examples and all seem to do the same.  But anything with 15 digits or less seems to works perfectly.
    Any ideas?
    Manny

    Yes, I have.
    But I have found the cause now.
    When working with parameters coming in from the concurrent manager, all the parameters define in the concurrent program in EBS need to be in the same case (upper, lower) as they have been defined in the data template.
    Once I changed all to be the same case, it worked.
    thanks for the effort.
    regards
    Ronny

  • FR Layout issue with large number of columns

    Hi!
    I'm developing a report in FR 11.1.1.3 with over 30 columns.
    The issue is that when I run the report in web preview, the dropdown of dimension in page goes to the far right and disappears from the display.
    If I reduce the number of the columns I don't have this problem.
    I've already tried to maximize the workspace to the maximum without any result.
    Can anyone help me to deal with reports with large numbers of columns?
    Regards,
    Luís
    Edited by: luisguimaraes on 13-Mar-2012 06:48

    IE8 could be the reason. According to the supported platform matrices (http://www.oracle.com/technetwork/middleware/bi-foundation/oracle-hyperion-epm-system-certific-2-128342.xls), check tab EPM System Basic Platform, row 70, in order IE8 to work, FR and Workspace should be patched.
    FR Patch number: 9657652
    Workspace Patch number: 9314073
    Patches can be found on My Oracle Support. Just search for the patch number.
    Cheers,
    Mehmet

  • TableView performance with large number of columns

    I notice that it takes awhile for table views to populate when they have a large number of columns (> 100 or so subjectively).
    Running VisualVM based on CPU Samples, I see that the largest amount of time is spent here:
    javafx.scene.control.TableView.getVisibleLeafIndex() 35.3% 8,113 ms
    next is:
    javfx.scene.Parent$1.onProposedChange() 9.5% 2,193 ms
    followed by
    javafx.scene.control.Control.loadSkinClass() 5.2% 1,193 ms
    I am using JavaFx 2.1 co-bundled with Java7u4. Is this to be expected, or are there some performance tuning hints I should know?
    Thanks,
    - Pat

    We're actually doing some TableView performance work right now, I wonder if you could file an issue with a simple reproducible test case? I haven't seen the same data you have here in our profiles (nearly all time is spent on reapplying CSS) so I would be interested in your exact test to be able to profile it and see what is going on.
    Thanks
    Richard

  • SSO with large number of users

    Hi,
    We want to implement SSO using user mapping because we have different user ids from system to system.
    We have large number of users in our system, how can we implement user mapping.
    Is there anyway to write a program so that it can take care of user mapping, if yes? can you please give overview so that i can dig in to it.
    Thanks,
    Damodhar.

    Hi Damodhar
    User mapping can be done in the programming level. The User Management Engine in EP 6.0 provides two interfaces to access the user mapping data namely
    1. IUserMappingService.
    2. IUserMappingData.
    You can implement these two intefaces to enable User Mapping. Please refer to the following link for further details.
    http://help.sap.com/saphelp_nw04/helpdata/en/69/3482ee0d70492fa63ffe519f5758f5/content.htm
    Hope that was helpful.
    Best Regards
    Priya

  • [JS] Export jpg from each page with specified number from database

    Hello,
    I imported a database into InDesign (CS 5 with OS X 10.7.2), so that every product and product number is on a different page in InDesign. Now I need to export each page to a jpg-file. The name of the jpg should be "productnumber.jpg".
    I found the script „PDFExportCropper.jsxbin“, which does what I want but creates pdf-files instead of jpgs.Thereafter, I can convert the pdfs to jpgs automatically with Photoshop.
    But: The script takes hours and hours to create the pdf-files: Right now, more than 8 hours for only 100 pdf-files. The database has 65.000 products!
    Any idea to improve the workflow? Any other script available which I did not find but does what I need?
    As a designer, I have no experiences at all in scripting.
    Thanks for answering!
    Best regards
    Rainer
    from Germany

    I think I fixed it.
    In line 20, I have now the following code:
    var page = myImage[i].parentPage.name;
    Is this the right way, to get the actual page?
    Also I would like to know, how can I export the images cropped to their "box"? How do I have to change my script?
    Thanks

  • Generating table with large number of columns (256)

    Hi,
    I don't know if this is right place for posting this:
    for data mining purposes I need a table which column names needs to be size N, where N is 2, 3 or 4. Column name is build upon alphabet of nucleotids A,C,T,G and all variations with repetition. For N=2, columns are: AA, AC, AT, AG, CA, CC, CT, CG, TA, TC, TT, TG, GA, GC, GT, GG (4^2 = 16). For N=3, 4^3 = 64, and for N=4 4^4 = 256.
    Primary key in table is array of nucleotids, and values in previously mentioned columns for each nucleotid array are 1 or 0, based on that if such nucleotid of size N exists in that chain or not.
    My questions are:
    1) is there any tool (in Oracle Data Miner or whatever) which can generate such table from array of nucleotids (one array of nucleotids is ordinary string)?
    2) It's not a problem to generate this table myself but is it "normal" to have database table with 257 columns (when N = 4)?
    I hope that my problem is clear (because of my English).
    Thanks in advance.
    Regards.

    Without knowing the reason for doing so, I would guess, this kind of design is quite poor.
    How are you planning to specify your queries? (I do know dynamic SQL would be a possibility ...).
    Another point of view:
    What if someone decides to have column names built using 5 nucleotids? This would exceed the maximum number of columns of a table which currently (10g, 11g) is 1000?

  • Bi publisher with large number of  columns

    Hi everyone,
    i am having this report that have to have a 70 column. i am trying to add them but its not allowing me to include more than 20.
    any advice how to do it ?
    is there anything that i cant do with the config file to increase the number of column allowed ?
    thanks

    Hi,
    U have to increase the page width(Edit layout->Properties) there increase the page width then add the columns.
    I don't know the exact bench mark,but in my project i added the above 25 columns
    Once check it.
    if it helps please mark it....
    Thanks

  • Slow record selection in tableView component with large number of records

    Hi experts,
    we have a Business Server Page (flow logic) with several htmlb:inputField's. As known from SAP standard we would like to offer value helper (F4) to the users for the ease of record selection.
    We use the onValueHelp() method of the inputField to open a extra browser window through JavaScript. In the popup another html-website is called, containing a tableView component with all available records. We use the SINGLESELECT mode for the table view.
    Everything works perfect and efficient, unless the tableView contains too many entries. If the number of possible entries is large the whole component performs very very slow. For example the selection of the record can take more than one minute. Also the navigation between pages through the buttons at the bottom of the component takes a lot of time. It seems that the tableView component can not handle so many entries.
    We tried to switch between stateful and stateless mode, without success. Is there a way to perform the tableView selection without doing a server-round-trip? Any ideas and comments will be appreciated.
    Best regards,
    Sebastian

    Hi Raja,
    thank you for your hint. I took a look at sbspext_table/TableViewClient.bsp but did not really understand how the Java-Script coding works. Where is the JavaScript code in that example? Which file, does it contain.
    Meanwhile I implemented another way to evite the server round trip.
    - Switch page mode of the popup window to "Stateful"
    - Use OnInitialization method like OnCreate (as shown in [using OnInitialization like OnCreate])
    - Limit the results of the SELECT statement with UP TO 1000 ROWS
    Best regards,
    Sebastian

  • File Bundle with large number of files failed

    Hi!
    Well, I thought there will appear problems. We do have some apps for distribution just by copying large amount of files (not large in size) to Windows (XP Pro, usually) machines. These is some programs which works from directory wo any special need for installation. Happy situation for admin. From one side. In ZfD 4.0.1 we did install this app on one of machines and then did take snapshot via special app (who remember) and did copy file to (Netware) server share, give rights for device (~ workstation) and associate it with ws via eDir and ... voila, next restart or whatsoever and app was there. Very nice, indeed, I miss this!
    So, I tried to make this happen on ZCM 10 (on SLES 11). Did app, sorry, bundle, upload files (first time it stuck, second time id accomplish, around 7500 files) and did distribution/launch association to ws (~device). And ... got errors. Several entries in log as examples below.
    Any ideas?
    More thanks, Alar.
    Error: [1/8/10 2:41:53 PM] BundleManager BUNDLE.UnknownExceptionOccurred An Unknown exception occurred trying to process task: Novell.Zenworks.AppModule.LaunchException: Exception of type 'Novell.Zenworks.AppModule.LaunchException' was thrown.
    at Novell.Zenworks.AppModule.AppActionItem.ProcessAct ion(APP_ACTION launchType, ActionContext context, ActionSetResult previousResults)
    Error: [1/8/10 2:41:54 PM] BundleManager ActionMan.FailureProcessingActionException Failed to process action: Information for id 51846d2388c028d8c471f1199b965859 has not been cached. Did you forget to call CacheContentInfo first?

    ZCM10 is not efficient in handling that number of files in a single
    bundle when they are in the content repo.
    Suggestions include zipping the files and uploading to the content repo
    and then downloading and extracting the zip as part of the bundle.
    Or Use the "Copy Directory" option to copy the files from a Network
    Source Directly like you did in ZDM.
    On 1/8/2010 8:56 AM, NovAlf wrote:
    >
    > Hi!
    > Well, I thought there will appear problems. We do have some apps for
    > distribution just by copying large amount of files (not large in size)
    > to Windows (XP Pro, usually) machines. These is some programs which
    > works from directory wo any special need for installation. Happy
    > situation for admin. From one side. In ZfD 4.0.1 we did install this app
    > on one of machines and then did take snapshot via special app (who
    > remember) and did copy file to (Netware) server share, give rights for
    > device (~ workstation) and associate it with ws via eDir and ... voila,
    > next restart or whatsoever and app was there. Very nice, indeed, I miss
    > this!
    > So, I tried to make this happen on ZCM 10 (on SLES 11). Did app, sorry,
    > bundle, upload files (first time it stuck, second time id accomplish,
    > around 7500 files) and did distribution/launch association to ws
    > (~device). And ... got errors. Several entries in log as examples
    > below.
    > Any ideas?
    > More thanks, Alar.
    > ---
    > Error: [1/8/10 2:41:53 PM] BundleManager
    > BUNDLE.UnknownExceptionOccurred An Unknown exception occurred trying to
    > process task: Novell.Zenworks.AppModule.LaunchException: Exception of
    > type 'Novell.Zenworks.AppModule.LaunchException' was thrown.
    > at Novell.Zenworks.AppModule.AppActionItem.ProcessAct ion(APP_ACTION
    > launchType, ActionContext context, ActionSetResult previousResults)
    > ---
    > Error: [1/8/10 2:41:54 PM] BundleManager
    > ActionMan.FailureProcessingActionException Failed to process action:
    > Information for id 51846d2388c028d8c471f1199b965859 has not been cached.
    > Did you forget to call CacheContentInfo first?
    > ---
    >
    >

  • IPhoto 9.5.1 face recognition slow with large number of photos ( 20,000)

    I have a new fast Imac with new Iphoto 9.5.1. I have >20,000 photos. When I use face recognition with people who have >50 photos associated with them, the rolling ball continues for 20-40 seconds. I didn't have this with the same number of photos with my old Imac2009 with Iphoto 9.4.3, 2011.
    Thanks.

    That is probably still the initial setup for face recognition for you new iPhoto version.  Once the "Faces" database has been rebuild, the performance  should get better. Give it a day or two.  If the problem persists, back up your iPhoto library and rebuild it.
    Hold down the key combination alt/option- command ⌥⌘ firmly and double click the iPhoto library to launch the First Aid Tools. Keep holding down the keys, until you are seeing the First Aid Panel.  Select the entry "Rebuild Database" from the panel and click "Rebuild".

Maybe you are looking for

  • BADI or user exit in payment proposal

    hi experts,              i need to call a workflow after the payment details are saved. Is there a <b>BADI</b> which is executed after saving the transaction. I would also like to know the user exits for the same.

  • Adding a button when a system form is opened

    Hiya, I'm trying to add a button to a system form in vb.net.  For some reason when i run my code the button will add to the form succesfully only when I have that form open in SAP.  If the form isn't open I get the error 'Form - Not found'  Can anyon

  • 320GB hard disc is full, but only 112GB of data used

    As you can see OmniDiskSweeper could only find 112GB of Data.  The same goes for the Programme WhatSize. I don't know what these 143GB of music should be either.  I've got 11GB of music in my iTunes library, and maybe 10GB of video files on my mac. 

  • HTML Eamils

    Hi, I was trying to send a html mails with image through java mail and I got some samples at http://java.sun.com/developer/EJTechTips/2004/tt0625.html#sample In the article they are talking about some sample codes in "ttjun2004.jar" as downloadable .

  • Are sprint and apple trying to fix the 3g speed problem with the iphone 4s?

    Ive had my 4s for about a month now, and i am about 50% happy with it. The internet speed is so slow when im not on wi-fi, and in the evenings the picture mail service is so slow, since it runs on the 3g network. Ive sat back and waited to see if it