Stranger performance profile

I suppose this is pretty vague, but I will ask anyway... I have a couple of very large databases (6G or so apiece) on 64-bit linux using version 4.5 that I access and delete from using the java API in a single long transaction with multiple cursors in various loops-- it's sort of a graph search which is part of a bigger computation.
I'm finding that operations are many orders of magnitude slower in the midst of than what I expect, and to verify that it's not just because I have a huge database or inefficient algorithm, I've taken out the most problematic part and I run it on its own, and it runs hundreds or thousands of times faster. Cursor.getSearchBoth slows down from .08ms in the standalone case to 10ms; Cursor.delete, once it's already positioned, slows from .02ms to almost 5ms, and perhaps most bizarrely, Cursor.close slows from too small to measure to 6ms! I'm not even looking at commit time or anything right now, just performance of these cursors; again there's just one transaction here.
I don't see any evidence that the machine is thrashing, there's tons of free memory in the jvm, the cache misses per operation are extremely similar between the real app and the test app, and almost the whole database would fit in the cache I've set (though changing the cache size has negligible effect on all this). The key/data pairs are all quite small; 8 byte keys and ~40 byte values; I'm using the default page size. I guess I'm wondering how I can start to pin this down. These numbers really seem crazy, especially Cursor.close... what could I possibly be doing to make that run so slow?? If it helps, here is how I set up the environment, transactions, and cursors in both programs:
EnvironmentConfig config = new EnvironmentConfig();
config.setRunFatalRecovery(true);
config.setErrorStream(System.err);
config.setErrorPrefix("BerkeleyDB> ");
config.setCacheSize(40 * 1024 * 1024 * 1024L);
config.setLogRegionSize(512 * 1024);
config.setLogBufferSize(4 * 512 * 1024);
config.setMaxLocks(1000000);
config.setMaxLockObjects(1000000);
config.setMaxLockers(1000000);
config.setLockDetectMode(LockDetectMode.YOUNGEST);
File baseDirectory = new File(dir).getAbsoluteFile();
setDirectories(baseDirectory, config);
config.setAllowCreate(true);
config.setInitializeLocking(true);
config.setInitializeLogging(true);
config.setInitializeCache(true);
config.setTransactional(true);
config.setPrivate(true);
Environment dbEnv = new Environment(baseDirectory, config);
DatabaseConfig config = new DatabaseConfig();
config.setSortedDuplicates(true);
config.setAllowCreate(true);
config.setReadUncommitted(true);
config.setMode(0664);
config.setType(DatabaseType.BTREE);
config.setTransactional(true);
Database db = dbEnv.openDatabase(null, name,
null, config);
TransactionConfig transactionConfig = new TransactionConfig();
transactionConfig.setReadUncommitted(true);
Transaction txn = dbEnv.beginTransaction(null, transactionConfig);

Ugh.. OK, the best way to find a bug that's been driving you crazy all week is to publically whine about it on a forum. I had a cursor in a tight loop that I wasn't closing. I found this literally 5 minutes after posting... but hey, whatever it takes! People, take note! Don't mess with them cursors!

Similar Messages

  • Strange performance issue with 3510/3511 SAM-FS disk cache

    Hi there!
    I'm running a small SAM-QFS environment and have some strange performance issue on the disk storage part, which somebody here might be able to explain.
    Configuration: one 3510, dual controller, RAID-5 9+1, one hot spare and one disk not configured for whatever reason. The R5 logical drive hosts a 150GB LUN for SAM-QFS metadata (mm in SAM-FS speak) and a 1TB LUN for data (mr in SAM-FS speak). Further, there are two small LUNs (2GB, 100GB) for some other purpose. Those two LUNs have nearly no I/O. All disks are SUN146G. Host connection is 2GBit, multipathing enabled and working.
    Then the disk cache became too small, and the customer added a 3511 expansion unit with SUN300G disks. One logical drive is a RAID-1, 1+1, used for NetBackup catalog. The other is a RAID-5, 8+1, providing two LUNs: 260GB SAM-FS metadata (mm) and 1.999TB SAM-FS data (mr).
    For SAM-FS, the LUNs form two file systems: one "residing" in the 3510, the other "residing" in the 3511 expansion. Cabling is according to the manual and checked several times by several independant people. Operating system is Solaris 10, hardware is a V880.
    The problem we observe: SAM-FS I/O on LUNs on disks inside the 3510 is fine. With iostat, I see 100MB/s read and 50MB/s write at the same time. On the SAM-FS file system which is running on the two LUNs in the 3511, the limit seems to be at 40MB/s read/write. Both SAM-FS file systems are configured the same in regards of block size.
    In case I have activity on both SAM-FS file systems, I see 100MB/s+ on the LUN running inside the controller shelf and another 40MB/s on the disk runnin in the 3511 expansion chassis. So, the controller is easily capable of handling 150MB/s.
    Cache settings in the 3510 controller are default I think (wasn't installed by me), batteries are fine.
    Is this 40MB/s we experience a limitation by the expansion shelf? Don't think so. Anybody has any ideas on this? What parameters to check or to change? Any hint appreciated. I can also provide further details if needed. Thank you.
    wolfgang

    SUN300G disks sound like 300GB FC disks.
    Depending on how many files are in the SAMFS file system, sharing the mm and mr devices on the same RAID array can be a pretty horrible idea. In my opinion and experience, it's almost always better to NEVER put more than one LUN on a RAID array. Period. Putting more than one LUN on an array results in IO contention on that array. And large, unnaturally configured (9+1? Why?) RAID arrays will have problems from the start.
    What are the block sizes used on the RAID arrays? It wouldn't surprise me to see that the RAID array on the expansion tray has a very large block size. Larger block sizes are, in general, not better. Especially for SAMFS metadata - which IIRC is something like 8k or 16k blocks.
    I suspect what is happening is most of the metadata updates are going to the mm device on the new array, contending with the IO operations on the file data.
    How much space is left on each mm device? What does "iostat -sndxz 2" show when you're having the IO problems?

  • Using Flex Performance Profiler for Profiling Flex  with Java Applications

    Hi , I am planning to use Flex Profiler to profile my Application .
    I have developed a sample Application using Flex MXML ,some ActionScript classes for Events and Cairngorm , Java , Oracle as database and Blazeds . 
    Can i use Flex Performance Profiler to Profile my Application . ?? I am asking this question as i ad read the below line from Adobe site and My Application includes java Methods 
    "You can use the profiler to profile ActionScript 3.0 applications " Can anybody please tell me What does this mean ?? and can i use the Flex Performnace Profiler . Please suggets me .

    Thanks Karl for the prompt response .
    I am making a call to a Java Method from my Action Script function , or getting data from Java Method into the ActionScript function .
    So my question  is , will the Flex Profiler will be applicable in this case as it internally calls Java Methods .

  • AFAB program strange performance in TEST mode

    Hi colleagues,
    We are experiencing a strange performance in AFAB program.
    We have uploaded several assets in a particular company code. When executing AFAB transaction in TEST mode, the new assets are not considered, whereas, when performing a REAL execution yes they are.
    We think that when reconciliating assets at the end of the year, this issue which is not harmful (but strange indeed) may be solved, but we are not sure at all.
    Can anybody provide a clue on what is happening.
    Thanks and my best regards

    Hi When you run this report online in test it will only show +/- the first 1.000 assets and the new asset are later in the data base and you don't see them.
    You have to run it in test mode in back ground and look in the spool to the result (default the spool shows arround 20 page's but this you can change or go to the next 20 pages)

  • Very strange performance issue

    Hi!
    I've got a very very strange performance problem and I have no more ideas what it might be:
    The following code fragment contains the useless line int count=0;
    However, deleting the line reduces(!) the execution speed of the program by ~30%. This is not only weird because the line is absolutely useless, but also because the whole function only takes <1% total execution time in the program.
        public void simuliere_bis_soll_erreicht()
            int count=0;  //????
            while(welt.soll_simulationszeit>welt.ist_simulationszeit && simu_active)
                simuliere_einen_schritt();
        }The problem occurs both under Java 1.5 and 1.4.2, using the HotSpot-Client.
    Cleaning and rebuilding the project does not help.
    It occurs on different computers in the same way, too.
    Thank you very much in advance! :-)
    Mirko Seithe

    well, this is what you get:
    1.) run totally interpreted since compilation threshhold is reached (1500 (client jvm) - 10000 (server-jvm)
    2.) start background compilation, run further in interpreted mode till compilation finishes (depends on code, but about 1000-10000)
    3.) run compiled code
    so this is what you get:
    ~20.000 invokations interpreted (about 70-90%n of total time)
    ~80.000 invokations compiled (30-10% of total time)
    maybe your int takes much longer to optimize, so the loop executes much longer in interpreted code.
    I would not bet on such microbenchmarks, since they do not tell you real stories under real circumstances. Believe me, I am the programmer working on performance optimizations in the company I am employed.
    lg Clemens

  • Performance Profile broken in Flex 4?

    I'm trying to profile my application, but I can't get the Performance Profile view to show anything.  When profiling began I did tell it to profile performance, are there any other steps to make it work, or is it broken?

    Hi,
    If you have selected only performance profiling you need to capture performance profile data by clicking on the capture performance profile data button.
    If you have reset the performance data before capturing the performance profile data then you may not see performance of any of the methods.
    Thanks,
    Kishan

  • FB4 Performance profiling - what's up with [tincan]?

    Hello folks,
    I just profiled my application in FB4 and when viewing the performance profile that was recorded there is an entry with name "[tincan]", which claims around 70 to 90% of all time.
    Reading blogs etc I found that tincan is the time spend on rendering a video?! This doesn't make sense, of course, and my conclusion at this point is that profiling in FB4 is useless.
    Any help? Thanks!

    Hey folks,
    any thoughts on this one?

  • Can't access root share sometimes and some strange performance issues

    Hi :)
    I'm sometimes getting error 0x80070043 "The network name cannot be found" when accessing \\dc01 (the root), but can access shares via \\dc01\share.
    When I get that error I also didn't get the network drive hosted on that server set via Group Policy, it fails with this error:
    The user 'W:' preference item in the 'GPO Name' Group Policy Object did not apply because it failed with error code '0x80070008 Not enough storage is available to process this command.' This error was suppressed.
    The client is Windows Server 2012 Remote Desktop and file server is 2012 too. On a VMware host.
    Then I log off and back on, and no issues.
    Maybe related and maybe where the problem is: When I have the issue above and sometimes when I don't (the network drive is added fine) I have some strange performance issues on share/network drive: Word, Excel and PDF files opens very slowly. Offices says
    "Contacting \\dc01\share..." for 20-30 sec and then opens. Text files don't have that problem.
    I have a DC02 server also 2012 with no issues like like this.
    Any tips how to troubleshoot?

    Hi,
    Based on your description, you could access shares on DC via
    \\dc01\share. But you couldn’t access shares via \\dc01.
    Please check the
    Network Path in the Properties of the shared folders at first. If the network path is
    \\dc01\share, you should access the shared folder by using
    \\dc01\share.
    And when you configure
    Drive Maps via domain group policy, you should also type the Network Path of the shared folders in the
    Location edit.
    About opening Office files very slow. There are some possible reasons.
     File validation can slow down the opening of files.
     This problem caused by the issue mentioned above.
    Here are a similar thread about slow opening office files from network share
    http://answers.microsoft.com/en-us/office/forum/office_2010-word/office-2010-slow-opening-files-from-network-share/d69e8942-b773-4aea-a6fc-8577def6b06a
    For File Validation, please refer to the article below,
    Office 2010 File Validation
    http://blogs.technet.com/b/office2010/archive/2009/12/16/office-2010-file-validation.aspx
    Best Regards,
    Tina

  • Free performance-profile tool ?

    Hi Folks,
    Might anyone know of a good and free performance profile tool ?
    I am looking for something like Candle, Intrascope or Mercury 'Deep Diagnostics'.
    I've just seen a list on http://www.javaperformancetuning.com/resources.shtml
    anyone used these ?
    thanks!
    JM

    "Marmelstein" <[email protected]> wrote in message news:40bd9e54$1@mktnews1...
    I should add that I'm more interested in application-level stuff than the JVM.
    The kind of thing I'd really like to see is (for example) lots of time is spent
    in a particular ejb 'find' method.
    Hi Folks,
    Might anyone know of a good and free performance profile tool ?
    I am looking for something like Candle, Intrascope or Mercury 'Deep Diagnostics'.
    I've just seen a list on http://www.javaperformancetuning.com/resources.shtml
    anyone used these ?
    I'd get a commercial one. Usually such tools pay off after the first use.
    Regards,
    Slava Imeshev

  • Strange performance issue in SSRS SharePoint integrated / Kerberos

    Hi,
    current setup / situation:
    Four server farm for a BI Portal:
    SQL Server instances
    SSAS instances
    SharePoint apps (SSRS, Central Admin ...)
    SharePoint frontend
    Three different environments (Dev, Test, Prod) with the same configuration (servers, versions, CPU/RAM,...)
    Kerberos properly configured (as far as we can see) pushing the current user credentials forward from the SharePoint frontend to the SSRS integrated service app to the SSAS OLAP cube.
    Problem:
    When we connect the report on dev to the dev cube, report execution time is about 7 seconds. In the execution log we can see in the additional info field, that we have a ConnectionOpenTime of a couple of milliseconds (~ 20-40).
    When we connect the report on test to the test cube OR to the dev cube OR the dev report to the test cube, we have runtimes of about 60 seconds with ConnectionOpenTime of a Little bit more than 2000 ms.
    When we change the data source connection to a fixed Windows account, the runtime drops down to about 7 seconds. When we switch back to "Use current user credentials" the runtime stays at the 7 seconds for about 1-2 hours, then in drops back to
    60 seconds.
    Question:
    What can cause this huge ConnectionOpenTime? Is it AD/DNS related? Claims To Windows Token Service? Any other caching/OS issue?
    Thanks for any input.
    KR
    Rainer
    Rainer

    Hi Rainer,
    The issue is little complex. I suggest that you could try to narrow down the issue deeper with below steps:
    1. Enable the verbose log on Sharepoint side.
    2. Capturing the SQL Server profiler trace on both test(slow) and dev(fast) environment.
    3. The same, RS exectionlog3 table
    Then reproduce the issue on both fast and slow environment, we need to compare both the Sharepoint ULS log and RS exection log to find out the slowness part.
    Could you please follow the below article for how to narrow down the issue with all logs?
    http://blogs.msdn.com/b/psssql/archive/2013/07/29/tracking-down-power-view-performance-problems.aspx
    Since you have found out the slowness is at ConnectionOpenTime , so we should focus on the Sharepoint frontend and SQL Server reporting service side. The ConnectionOpenTime should not reach the SSAS instance.
    Regards,
    Doris Ji

  • SSAS Strange Performance Issues (Long running with NO read or write activity) - UAT Test Environment

    Hi All,
    Im looking for some pointers, my team and I have drawn a blank as to what is going on here.
    Our UAT is a virtual machine.
    I have written a simple MDX query which on normal freshly processed cube executes in under 15 seconds, I can keep running the query.
    Run 1. 12 secs
    Run 2. 8 Secs
    Run 3. 8 Secs
    Run 4. 7 Secs
    Run 5. 8 Secs
    Run 6. 28 MINUTES!!
    This is on our test environment, I am on the only user connected and there is no processing active.
    Could anyone please offer some advice on where to look, or tips on what the issue may be.
    Regards,
    Andy

    Hi aown61,
    According to your description, you get long time processing after executing processing several times. Right?
    In this scenario, it's quite strange that a processing take long time. I suggest you using SQL Profiler to monitor the event during processing. It can track engine process events, such as the start of a batch or a transaction, you can replay the events captured
    on the Analysis Services instance to see exactly what happened. For more information, please refer to link below:
    Use SQL Server Profiler to Monitor Analysis Services
    If you have any question, please feel free to ask.
    Regards,
    Simon Hou
    TechNet Community Support

  • Performance Profiler with Sub-Panel linked VI's

    I've got a Main vi which contains a tab control, each page holding a subpanel linked to a SubVI. When using the Performance and Memory Profiler my Main.vi is the only one that shows up, so the timing information isn't very useful. If I get a Snapshot while the profiler is running it shows the linked subVI's as being in memory, but doesn't show any timing information on them (All 0.0's for all vi's including Main).
    Am I doing something incorrectly?
    Attachments:
    Profiler.jpg ‏50 KB
    Snapshot.jpg ‏58 KB

    Looks like you are doing everything correctly.  The problem is somewhere between how the SubPanel deals with VIs in memory, and where the Profiler gets its data.  You should be able to see stats for your main VI once you stop it, but not the subVIs you are loading into the panel.  Sorry if this isn't what you were looking for, but at least we can say that it is not you doing anything wrong.  I would head on over to the Product Suggestion Center and submit this (these are taken seriously!).  It's certainly a valid use case that may not have been considered yet.
    Cheers, 
    Brian A.
    National Instruments
    Applications Engineer

  • Filter hud performance profiling results

    I was really curious why it took so long for the filter hud to open and I think I may have at least a partial answer. I used the awesome Sampler and fs_usage tools that come with the developer kit. I started profiling and pushed the filter button. Here's what I found:
    1) A bunch of database access happens in the main thread. When you push the filter hud button you loose control of the application (SBOD) until the query is complete. I'm guessing it's asking the database which keywords exist in the currently selected project so it can make filter buttons for them. Why does a query of 600 images take 10 seconds...
    2) Whenever you push the filter hud button thousands of little seeks and reads happen on the hard disk. I'm assuming this is the bottleneck.
    Is this interesting to anyone? It's wandering off the standard subject matter a bit. However, performance is abysmal and knowing is half the battle!
    Dual 1.8 G5   Mac OS X (10.4.3)   1GB RAM, Sony Artisan Monitor, Sony HC-1 HD Camera

    I've dissected the SQLite database that Aperture uses. My current best guess is that either Aperture is doing something wrong with SQLite or it's doing extra queries that I don't understand. I recreated the database query that gives you a list of keywords for all images in the working set. It only took between 1/4 and 1/2 second to execute. Opening the filter hud in Aperture with the same working set of images takes over 3 seconds.
    I've posted more detailed information on my site. It includes an overview of the database structure.
    http://www.mungosmash.com/archives/2005/12/theapertureda.php
    This is good news to me. It means the Aperture guys only have themselves to blame and should be able to speed it up considerably since the db is fast.
    Dual 1.8 G5   Mac OS X (10.4.3)   1GB RAM, Sony Artisan Monitor, Sony HC-1 HD Camera

  • "Call Library Function" absent from performance profiling

    Hello,
    I'm trying to optimize my VI execution time by using the "Profile Performance and Memory" window.
    The VI takes 25 sec to run, however the profiler reports something like 25 ms, if I understand correctly.
    I know the 25 sec includes all other processes on the CPU. However I highly suspect a lot of time is spent in 3rd party DLL functions I use, which read and write files, among other things.
    The problem is that the "Call Library Function" nodes do not appear in the profiler window at all! My questions:
    1) Why don't clf nodes appear?
    2) Is there some way to inspect the time spent in the DLL functions?
    Note: There is a related (unanswered) post from 2009 here: http://forums.ni.com/t5/LabVIEW/Profile-performance-of-a-VI-using-DLL/m-p/888833#M401525
    Thanks
    Itay.

    I recommend taking the simple approach - put a millisecond timer function before and after the call to the DLL, and subtract. I suspect that CLFNs do not appear in the profiler because LabVIEW hands off execution to the DLL and can't monitor the internals of what the DLL is doing. LabVIEW has no way to know how much memory the DLL allocates nor how much processor time the DLL uses.

  • Using WLST to export from MDS - strange- perform diff. in two environments

    It is very strange that the same WLST command perform differently in tow environment.
    1. I did full export MDS from environment A using the following WLST command
    2. import all of them into environment B (before that, I delete meta data from environment B).
    3. use the same command below to export from environment B
    exportMetadata(application='MyApp',server='AdminServer',toLocation='/mds2',docs='/**') However, in step1, export from environment A, I got over 700 documents (both my customizations and base doc). in step 3, export from environment B, I only got 5 documents (which are my customization only).
    Is there any configuration in WLS control how the WLST exportMetadata perform?

    Hi,
    probably best to try this question on a Web Logic Server forum as WLST doesn't belong to JDeveloper
    Frank

Maybe you are looking for

  • In-app purchase approved for sale, folios published, why would new issue not show in Newstand?

    Has anyone had this issue and what should I be looking for to problem solve?

  • Slow word-to-pdf creation

    I have a user who is having long creation times when making a Word document into a PDF. She is having to wait 5-10 minutes at least because the process will hang up at 10% then complete after awhile. Are there any settings I could adjust to help spee

  • Anonymizer.encode

    I need to resolve a problem of encoding in a scenario IDOC->JMS. I'm receiving Idoc from R/3 ->XI -with special characters that are not recognized in the target system (WebMethod). I saw some recommendations on the forum to use anonymizer.encode to s

  • Ilustrator dejo de funcionar

    Hola, Tengo un problema con Ilustrator desde la ultima actualziación a CC 2014. Utilizo Win 8.1 Al ejecutar la aplicación durante el proceso de carga sale un mensaje "Windows está buscando una solución a su problema" y después una pantalla que dice "

  • In uploading changes complete uploaded page does not upload

    In uploading a page via Firefox part of the page is missing