Cpu timing

Hi
I'm writing a program to find per thread CPU time using JNI with C and UNIX.Actually i want to compare the
1)java system time using system.currenttimemillis();
2)JNI time using UNIx system call.
3)JVMPI time using GetCurrentThreadCpuTime();
I want jni time should be faster then java system time and JVMPI time.Please help me out.I have used all UNIx system calls like gethrtime(),gettime(),clock()..etc.,but it gives almost same as java system time and is more the JVMPI time.Since there is performance degradiation of JVMPI in IBM AIX ,we have to follow JNI approach here.Please anyone can help me out.
Regards,
Prashant

I believe you're right! I've found that my error occurs at the GPIBwrite command, would the two strings here cause a race condition during the writing process?
Attachments:
Helpme.jpg ‏63 KB

Similar Messages

  • Total CPU time consumed by all Oracle sessions combined.

    Hello, I need to summarise total cpu time consumbed by all active Oracle sessions and below is the query thta I could come up with.
    However the problem: even if I execute query in a miliseconds duration, the value of total cpu time is always changing for a given session. Hence, is the query below right?
    SELECT SUM( c.value)
    FROM V$SESSION a,
    v$sesstat c,
    v$statname d
    WHERE a.sid = c.sid
    and c.statistic# = d.statistic#
    AND d.name = 'CPU used by this session'
    AND a.status = 'ACTIVE';
    Thanks,
    R

    Your findings are correct - the statistics is changing all the time. I don't see what is the problem here, you just have to add the time stamp and then you can measure the difference between them.
    If you are on 10g or 11g version then I would suggest you to look at V$SESS_TIME_MODEL which also gives interesting aggregated data for session level and for the database level the V$SYS_TIME_MODEL is probable the thing you are looking for.
    SQL> select stat_name,value from v$sys_time_model where stat_name='DB CPU';
    STAT_NAME                                                             VALUE
    DB CPU                                                           2125109375But I would like to warn you that there are some anomalies with time measurement in the database. Consider the following case:
    SQL> create or replace function f_cpu( p number) return number is
      2  m_date date;
      3  begin
      4    for a in 1..p loop
      5       m_date := sysdate;
      6    end loop;
      7    return 0;
      8  end;
      9  /
    Function created.
    SQL> alter session set events '10046 trace name context forever, level 8';
    Session altered.
    SQL> set arraysize 1
    SQL> select f_cpu(300000) from dual connect by level <= 10;
    F_CPU(300000)
                0
                0
                0
                0
                0
                0
                0
                0
                0
                0
    10 rows selected.
    SQL> alter session set events '10046 trace name context off';
    Session altered.From the other session you run your statement which just looks for the CPU usage in the first session. You will see that the CPU time is increased all the time, not just after every fetch call, but also between them.
    Now comes the funny thing - the SQL_TRACE shows the following ( I have removed all wait events to get more clear picture for my purpose):
    PARSING IN CURSOR #4 len=53 dep=0 uid=88 oct=3 lid=88 tim=347421772231 hv=2194474452 ad='230f2310' sqlid='2m7v6ua1cu1fn'
    select f_cpu(300000) from dual connect by level <= 10
    END OF STMT
    PARSE #4:c=0,e=124,p=0,cr=0,cu=0,mis=0,r=0,dep=0,og=1,tim=347421772223
    EXEC #4:c=0,e=103,p=0,cr=0,cu=0,mis=0,r=0,dep=0,og=1,tim=347421772446
    FETCH #4:c=671875,e=588199,p=0,cr=0,cu=0,mis=0,r=1,dep=0,og=1,tim=347422360764
    FETCH #4:c=1437500,e=1282871,p=0,cr=0,cu=0,mis=0,r=2,dep=0,og=1,tim=347423644892
    FETCH #4:c=1156250,e=1182013,p=0,cr=0,cu=0,mis=0,r=2,dep=0,og=1,tim=347424827769
    FETCH #4:c=1234375,e=1181276,p=0,cr=0,cu=0,mis=0,r=2,dep=0,og=1,tim=347426009910
    FETCH #4:c=1187500,e=1179318,p=0,cr=0,cu=0,mis=0,r=2,dep=0,og=1,tim=347427190068
    FETCH #4:c=593750,e=593217,p=0,cr=0,cu=0,mis=0,r=1,dep=0,og=1,tim=347427784188In this output "c=" is CPU time in 0.000001s (microseconds) and "e=" is elapsed time. There are many rows where CPU time > elapsed time, what is a well known problem of reporting for CPU timing. This was a single session so this result is unrealistic: how one can use 1.43s CPU time in only 1.28s time.
    FETCH #4:c=1437500,e=1282871,p=0,cr=0,cu=0,mis=0,r=2,dep=0,og=1,tim=347423644892The CPU time is bigger than elapsed time - and you can probably notice as well that CPU time is rounded to 00,25,50,75 .
    There are some interesting problems with time measuring in Oracle and one can easily be caught in this trap. I have written a post about this in my blog: http://joze-senegacnik.blogspot.com/2009/12/measurement-error-in-trace-file.html
    HTH, Joze
    Co-author of the forthcoming book "Expert Oracle Practices"
    http://www.apress.com/book/view/9781430226680
    Oracle related blog: http://joze-senegacnik.blogspot.com/
    Blog about flying: http://jsenegacnik.blogspot.com/
    Blog about Building Ovens, Baking and Cooking: http://senegacnik.blogspot.com

  • Trace file analysis: High cpu timings for FETCH

    Hi!
    I am doing a 10046 trace file analysis for a performance problem we see on a customer site, but we can't reproduce the problem on our local reference test system.
    Basically, the cpu timings for FETCH calls for a SELECT statement are ten times as high on the customer system. There are no WAIT events in the trace file (for this statement), only a high cpu timing for the FETCHES:
    Customer instance:
    FETCH #19:c=140625,e=140189,p=0,cr=3358,cu=0,mis=0,r=1,dep=1,og=1,tim=1500177409
    Reference system;
    FETCH #4:c=15625,e=7984,p=0,cr=2262,cu=0,mis=0,r=1,dep=1,og=1,tim=5624714062
    I see that the number of consistant reads is 50% higher, but I don't see why this result in 10 times the CPU time and about 20 times the elapsed time. This is does not seem to be a general problem with all statements, so the general timings are comparable to our reference system. The problem seems to be this Select statement only which only joins two tables.
    I had the idea that a long running transaction that didn't commit would lead to this problem, since Oracle would need to reconstruct blocks from undo, but there are no such transactions on the system.
    With no WAIT events emitted, where does the time go?
    Thanks for your help,
    Marcus

    MMarcus wrote:
    Here is the execution plan for the query. It is the same on both systems, with slightly different total costs (8 or 10).
    | Id  | Operation                      | Name                | Rows  | Bytes | Cost (%CPU)| Time     |                                                                                                                                                                                                      
    |   0 | SELECT STATEMENT               |                     |     1 |    35 |    10  (10)| 00:00:01 |                                                                                                                                                                                                      
    |   1 |  SORT ORDER BY                 |                     |     1 |    35 |    10  (10)| 00:00:01 |                                                                                                                                                                                                      
    |*  2 |   FILTER                       |                     |       |       |            |          |                                                                                                                                                                                                      
    |*  3 |    TABLE ACCESS BY INDEX ROWID | PLANHIERARCHIE      |     1 |    35 |     5   (0)| 00:00:01 |                                                                                                                                                                                                      
    |*  4 |     INDEX RANGE SCAN           | PLANHIERARCHIEINDEX |    21 |       |     2   (0)| 00:00:01 |                                                                                                                                                                                                      
    |   5 |    NESTED LOOPS                |                     |     1 |    39 |     4   (0)| 00:00:01 |                                                                                                                                                                                                      
    |*  6 |     TABLE ACCESS BY INDEX ROWID| PLANSCHRITTFOLGE    |     1 |    21 |     3   (0)| 00:00:01 |                                                                                                                                                                                                      
    |*  7 |      INDEX RANGE SCAN          | PLANSCHRITTFOLGEPK  |    11 |       |     2   (0)| 00:00:01 |                                                                                                                                                                                                      
    |*  8 |     TABLE ACCESS BY INDEX ROWID| PLANHIERARCHIE      |     1 |    18 |     1   (0)| 00:00:01 |                                                                                                                                                                                                      
    |*  9 |      INDEX UNIQUE SCAN         | PLANHIERARCHIEPK    |     1 |       |     0   (0)| 00:00:01 |                                                                                                                                                                                                      
    You have omitted the predicate section from the execution plan - and [+*there may be important clues*+|http://jonathanlewis.wordpress.com/2008/12/03/predicate-problems/] in the predicate section.
    In your case the problem may +(*for example*+) simply be the way in which the predicates apply to the PLANSCHRITTFOLGEPK index range scan.
    Imagine you have 250 index entries per leaf block, and the predicates that apply to the index identify an index range scan that spans 25 entries in one system but 25000 entries (100 leaf blocks) in the other. It is possible that filter predicates against the index eliminate most of the index entries before you go to the table. The CPU used to examine (filter) large numbers of index leaf entries can be significant - and since that index range scan is part of a filter subquery it could many several time - escalating the CPU usage. A check of the access and filter predicates may give you some clue about whether you are seeing that type of problem.
    Regards
    Jonathan Lewis
    http://jonathanlewis.wordpress.com
    http://www.jlcomp.demon.co.uk
    To post code, statspack/AWR report, execution plans or trace files, start and end the section with the tag {noformat}{noformat} (lowercase, curly brackets, no spaces) so that the text appears in fixed format.
    "Science is more than a body of knowledge; it is a way of thinking"
    Carl Sagan                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                       

  • I am using jboss 4.2, java5.0 and Fedora Linux Enterprise Version 4.0 with

    Hi,
    I am using jboss 4.2, java5.0 and Fedora Linux Enterprise Version 4.0 with kernel 2.6 and NPTL 2.3.4
    I am using open source network chart generation API provided by geosoft ( http://geosoft.no/graphics/). This API generates chart into swing window.
    I wrote the code to change this swing window into web browser compatible jpeg image. I used thread to generate the image. It is working fine, for one user and no other processes running on the application.
    ISSUE:- When more than 5 users hit the application at the same time, some images get generated, some donot, there is no fixed trend to this image generation process.
    I analyzed CPU timing, it is using 100% CPU and after the images are generated / not generated, the CU usage goes down to zero.
    When I used the same code with Linux 9.0 (kernel 2.4, NPTL � 0.6), rest remain the same, it is working perfectly fine with more than 10 users, with all images being generated within 30 secs
    Can somebody help me out to figure out whether it is a kernel issue / NPTL issue? Does it have something to do with thread processing?
    Code for network chart generation :-
    NetworkGenerator ntw=new NetworkGenerator();
    BufferedImage img;
    ntw.setVectRootNodes(vectRootNodes);
    ntw.setHashChildNodeNames(hashNodeData);
    ntw.setHashNodeRelation(hashNodeRelation);
    ntw.setHashNodesCreated(hashNodesCreated);
    ntw.setSupplyChainBean(supplyChainBean);
    Thread t=new Thread(ntw);
    t.setPriority(Thread.MAX_PRIORITY);
    t.start();
    try{
    t.join();
    catch(Exception e)
    DebugManager.doDebug(className.toString(),e);
    if(t!=null)
    System.out.println(t.getState().name());
    System.out.println(t.isAlive());
    public class NetworkGenerator extends JFrame implements Runnable{
    public void run()
    //call the garbage collector
    System.gc();
    // Create the graphic canvas
    window = new no.geosoft.cc.graphics.GWindow();
    window.getCanvas().setSize(screenWidth,screenHt );
    // Create the GUI
    JPanel topLevel = new JPanel();
    topLevel.setBackground(new Color(255,255,255)) ;
    topLevel.setLayout (new BorderLayout());
    getContentPane().add (topLevel);
    topLevel.add (window.getCanvas(), BorderLayout.CENTER);
    topLevel.setVisible(true);
    // Create scene with default viewport
    scene = new no.geosoft.cc.graphics.GScene(window, "My Scene"+ (new Date().getTime()));
    no.geosoft.cc.graphics.GStyle style = new no.geosoft.cc.graphics.GStyle();
    style.setForegroundColor (new Color (0, 0, 0));
    style.setBackgroundColor (new Color (255, 255, 255));
    style.setFont (new Font ("Arial", Font.BOLD, 10));
    scene.setStyle (style);
    int xPos=minY ;
    int yPos=0;
    int noofChild=vectRootNodes.size();
    int dev=(screenHt -minY )/(noofChild+1);
    int newDev=Math.round(dev-(dev/5));
    //log.debug("---------noofChild-----------------------------------"+noofChild);
    if(!hashNodesCreated.isEmpty())
    for(int i=0;i<noofChild;i++)
    yPos=minY +(dev*(i+1));
    String nodeName = vectRootNodes.get(i).toString();
    log.debug("root nodename===="+nodeName+" with ypos :"+yPos);
    //log.debug("nodeName=="+nodeName);
    //create root nodes
    Node rootNode = createChildNode( nodeName,minY,screenHt,xPos, yPos ,newDev,1);
    scene.add(rootNode);
    log.debug("screenWidth ===="+screenWidth );
    // if(screenWidth>minExtXval)
    // minExtXval = screenWidth;
    // w2 o
    // * |
    // * |
    // * |
    // * w0 o-------o w1
    double w0[] = {0.0,screenHt ,0.0};
    double w1[] = {screenWidth,screenHt,0.0};
    double w2[] = {0.0,0.0,0.0};
    scene.setWorldExtent (w0, w1, w2);
    this.pack();
    Thanks in advance.

    How do I do that as I checked for it in utilities and is not there? Thanks in advance

  • Firefox is supposed to be faster - it's far slower than any other version & I'm going to back to Explorer - this is too much & it keeps crashing!. Is anything going to be sorted soon?

    It is now so slow to load pages - I can have coffee and then maybe a page has loaded. Otherwise it's "embarrassed" because it cannot load pages/ bookmarks. This version is terrible - can you not put back the previous version till you've sorted out the problems?

    I don't know anything about that.  But I googled it and found this post in another forum -
    "I have more info on the issue at hand.
    The RDTSC instruction has, until recently, been an excellent high-resolution, low-overhead way of getting CPU timing information. With the advent of multi-core/hyperthreaded CPUs, systems with multiple CPUs, and "hibernating" operating systems, RDTSC often no longer provides reliable results. The issue has two components: rate of tick and whether all cores (processors) have identical values in their time-keeping registers. There is no longer any promise that the timestamp counters of multiple CPUs on a single motherboard will be synchronized. So, you can no longer get reliable timestamp values unless you lock your program to using a single CPU. Even then, the CPU speed may change due to power-saving measures taken by the OS or BIOS, or the system may be hibernated and later resumed (resetting the time stamp counter).
    I might be understanding this wrong but... Basically both RDTSC and QPC are used to time code in time-sensitive programs. However, RDTSC might be inaccurate in above described situations. I also might be wrong about this but I believe QPC has something to do with the HPET high precision event timer. Which is a more accurate timer.
    So this might explain why RDTSC and QPC has a delta that is too high. And if all of what I said above is true, then this error is benign."
    This signature left intentionally blank.

  • What is the highest level of spam I can enable in Adobe Business Catalyst?

    i have enable spam for our adobe BC site and spam continues to pile up - any advice on bullet-proofing solutions is appreciated. thanks

    Samsung if you can or micron chip type ram as all the others use cheap chips for their ram and so you get errors.
    http://www.hardmac.com/articles/56/
    They tested some.
    The speed is limited by the cpu timing so 167mhz FSB = 167mhz / 333mhz / 500mhz / 667mhz as this is in-sync with fsb / ram but will only achieve 333mhz max .
    Faster ram will likely run cooler in theory as it is only working at 50%.
    Get server grade and make sure it is 100% correct stuff.
    This is the stuff I got and is working 100% with no problems since 2 feb 2006
    http://stores.ebay.com/McWare-Computer-StuffApple-Laptop-MemoryW0QQcolZ4QQdirZ1QQfsubZ5QQftidZ2QQtZkm

  • Skype causes Blue Screen of Death after a while in...

    Hello, I'm currently having a problem with my skype where it will cause my computer to BSOD after a while in a call, it's only happening during skype calls, not during other voice communication programs like steam's voice calling and the blue screen is more likely to happen when I'm running Firefox.
    The Blue screen error I get is "Clock Interrupt was not receieved on a secondary processor within the alloted time interval."
    Any help would be appreciated.
    Solved!
    Go to Solution.

    The issue might be triggered by Skype and other software but definitely not due to Skype.  It's a very broad multiple CPU timing's issue that can be caused by several things. 
    1.  Problematic BIOS settings
    2.  Failing hardware/drivers
    3.  CPU/Fan/HW monitor control programs
    4.  Power management settings
    As a temporary workaround you can try setting the processor affinity for Skype or set your Windows to boot off only 1 CPU using msconfig.
    http://www.addictivetips.com/windows-tips/how-to-s​et-processor-affinity-to-an-application-in-windows​...

  • IPhone could not update - error 1062

    I tried to update to 1.1.4 and also to restore and both times it says it either could not be updated or could not be restored. Both times is says error 1062. I've read about 1064 but what is 1062 and how can I fix it so I can update/restore my phone?
    Message was edited by: tag098
    Message was edited by: tag098

    Error -1602 means that the iPhone could not communicate correctly with iTunes. There is a Apple product at one end of the connection, and an Apple product at the other end. These are the only two parts that Apple can control, and even then iTunes is subject to the whims of other programs on your computer (especially antivirus programs). In between there is Windows itself, USB drivers, USB hardware, other USB devices sharing the bus, memory, CPU timing...none of which Apple can control.
    If you have carefully followed all of the instructions in http://docs.info.apple.com/article.html?artnum=306084, updated your USB drivers, made sure your USB ports are version 2, are not using an external USB hub and have no other USB devices connected then there is something about your computer that does not meet Microsoft and industry standards. This is beyond Apple's control to fix. If you take your phone to an Apple store they will update it for you. You can also try another computer.

  • K7N2-L stuck with 100MHz FSB?

    First sorry for my bad english.  
    I can´t get 166MHz FSB. X(
    I have tried bios v3.4, 3.5 and 3.62b.
    No matter if I use auto, high perf or manual for cpu, normal or high perf cpu timing and auto, spd or manual memory timings. Bios always tell it´s XP 1100MHz.
    When I changed multipler to 12.5 I get 1250MHz XP.
    Two times I had blank screen and system halt when using 133MHz FSB.
    When entering to bios setup with del-key, sometimes bios screen is black, only 2 centimeters high blue line bottom screen. Rebooting few times and it is normal again and can change settings.
    I had before D1000MHz morgan and I run it default FSB and memory 1:2 (200MHz) with high perf settings and had no problems.
    Is bios corrupted or some onboard component blown?!

    MSI version for jumperless MB? YES, that helped very much Crazyjak and wonkanoby. I owe you long cold beer, gimme a call if you came to Tampere, city in Finland.  

  • Athlon64 3200+ Venice on Neo4 Plat (no SLI) showing +10MHz but no OC

    Hi all- I've a:
    Athlon64 3200+ Venice (no OC)
    MSI Neo4 Platinum (not SLI)
    (2) 512MB Kingston Value 3200 (200MHz) DDR (dual-channel, slots 1 and 2)
    250GB Seagate SATA
    Some kind of 16x DVD+R/W 
    Gigabyte 6600GT (stock clocking)
    Antec 450W SmartPower 2 (12V-17A + 12V-15A IIRC)
    Back story: I was having random lockups during gameplay, every 2 or 3 hours in Guild Wars (all games did it, just GW most of all). Moved RAM from slots 1 and 3 to slots 1 and 2. Didn't help. Then set PCIe clock 5 MHz ahead at the suggestion of one of these forums, which seems to have fixed the problem. (Thank you so very much all!)
    I look at PC health when I go to BIOS and it shows (with no overclocking) DDR at 1 MHz higher than normal and CPU at 2010 MHz, instead of the supposedly stock 2000 MHz.
    Could my lockup issues be related to this quirky MHz speed? (OC'ing the PCIe appears to have fixed it). I now understand PCIe was probably running asynchronous to CPU timing the entire time (and still is?)  :(
    What could cause the slight OC in RAM and CPU? I have all settings on auto for CPU voltage, which hovers around 1.4 (normal from what I see online). Interestingly, all my voltages are being reported as pretty much spot-on except the 12V, which is showing 12.5V consistently.
    Any ideas or suggestions? I'd like everything with as tight a timing as possible because I want to make sure this lockup issue NEVER comes back!
    Thanks in advance for any advice!
    EDIT: (2) 512MB oops. . !

        It think it may finally be gone, but I'll have to try tonight and tomorrow to be sure. I played Guild Wars for around 5 hours last night with no lockups.
    Here's what I did:
    Googled "PC lock up" for some crazy reason, just to see what other ideas were out there. Like 3rd link down brought me to a page where a guy had my exact same issues and same board but an ATI card. He had tried pretty much the same things too. He said he fixed it by updating his AC97 sound card drivers.
    At that moment I didn't even know what was actually on my board, but I knew it was a generic card I was probably never going to use anyway, and I didn't recall getting any sound card updates for this board. So I looked in device manager, and bingo: AC97 device under multimedia devices.      I immediately did two things to completely eliminate the rascal: updated the driver for it and promptly went to BIOS and disabled the sucker. Also disabled SATA group 2 (slots 3 and 4), the Marvell LAN because I only use one ethernet anyway (the nVidia one, which from what I was reading, was probably the more robust of the two), both RAID controllers (actually I had disabled them earlier to skip the annoying RAID setup screen), and put the PCIe bus back to 100MHz (rogue: I was wondering about possible damage over time with this too high too, so I was glad to try setting it back to normal!) Also ran Driver Cleaner to rip out the detonators even though I was putting in another nVidia, and then put in the 6800GT and installed drivers. (In case you were interested, my 3dMark05 score went from 3511 under the 6600GT to 4939 under the 6800GT! I now run in 1280x1024 at max effects and I'm completely spoiled in one night already!  )
    Anyway, one of these myriad, desperate attempts must have worked because I get neither audio stutters (should have been a freaking clue in the first place, duh!) nor lock ups.
    Since this is the first PC I've built, I was certain I had to have screwed something up hardware-wise or found some combination that had incompatibilities. If it WAS just the freaking sound card driver I'm going to leave this place in shame and never post again!    In my defense, the MSI Update utility didn't show any updated sound drivers for me, and I had assumed it was being pre-empted by my SB Live in any case.
    I was convinced this problem was (if it is indeed gone) a video card issue but I can't say it ever was without putting the 6600 back in and running for several hours. I'm going to bet it was the AC97 though because nVidia boards have always been fantastic for me, I haven't had any actual motherboard issues, my RAM and CPU are just fine, and Win2k has never let me down. 
    Don't assume anything, though, I've learned. 
    One thing to note: when I was checking out the AC97, I noticed it was *sharing* IRQ 20 with the nForce NIC detector (might have a different name, I can't remember right now). Apparently this is a capability of Win2k to share IRQs but it kind of added to my suspicions anyway.
    I'll let you know how the next few sessions go and whether this issue is still an issue!   

  • Timed loop and CPU usage

    Platform is WIN_XP Pro and machine is a P4 at 2.5Ghz with 512 Mb ram.
    LV7.1 + PCI 6229
    I am using  50ms Timed loop for running a state machine inside it
    and also a  whole lot of other things like reading / writing
    DAQMx  functions;  file I/O functions and such. As the
    project involves a  main and sub-panlel set up local variables
    could not be elimnated fully and there should be something like 150 of
    them. But not all are accessed always - maybe about 15 of them at any
    given time depending on the SM staus.
    Problem :
    Once started the "Finished late"  indication  is off and
    the  actual timing  alternates between 49 to 52 ms. The CPU
    usage is around 25%.
    But as time goes by,  the system gets unstable : After 15 minutes
    or so, the Finished Late indication is always ON and the CPU usage is
    gradually tending towards or exceeds 100%. 
    Obviously the machine control timing now gets affected and things slow
    down badly. Closing the application ands restarting repeats the above
    cycle.
    I am at a loss  to understand what is happening ?  WIll
    breaking down the single Timed Loop to multiple ones help  ? WIll
    that be an efficient way of parallel threading ?
    I can post the code but its quite large and will do it as a last resort.
    thanks
    Raghunathan
    Raghunathan
    LV2012 to Automate Hydraulic Test rigs.

    Hello,
    It sounds like an interesting problem.  It would be worth some experimentation to figure out what's going wrong - attempting to decouple major "pieces" of the code would be helpful.  For example, you could try breaking your code into multiple loops if that makes sense in your architecture, but perhaps you could even eliminate all but one of the loops to begin with, and see if you can correlate the problem to the code in just one of your loops.
    Another concern is that you mention using many local variables.  Variable read operations cause new buffer allocations, so if you're passing arrays around that way, you could be hitting a problem of forcing your machine to perform many allocations and deallocations of memory.  As arrays grow, this can be a bigger and bigger problem.  You can use other techniques for passing data around your block diagram, such as dataflow if possible (just simple wires), or queues where dataflow can't dicatate program flow completely.
    Hopefully looking into your code with the above considerations will lead you in the right direction.  In your case, removing code so that you can identify which elements are causing the problem should help significantly.
    Best Regards,
    JLS
    Best,
    JLS
    Sixclear

  • CPU Time in Top 5 Timed Events

    Hi,
    We have a 2 node RAC database(10.2.0.3) on Solaris 10.
    There is performance issue with CMRO application R12.
    In database I see CPU time consistently as the top wait event in the Top 5 Timed Events.
    This is mostl followed by db file sequential read.
    For one of the days:
    Top 5 Timed Events
    Event Waits Time(s) Avg Wait(ms) % Total Call Time Wait Class
    CPU time 8,383 82.8
    db file sequential read 173,417 838 5 8.3 User I/O
    SQL*Net break/reset to client 26,015 651 25 6.4 Application
    enq: TX - row lock contention 1,063 356 335 3.5 Application
    gcs log flush sync 37,747 88 2 .9 Other
    For other day:
    Top 5 Timed Events
    Event Waits Time(s) Avg Wait(ms) % Total Call Time Wait Class
    CPU time 25,286 62.0
    db file sequential read 2,644,332 8,267 3 20.3 User I/O
    gc buffer busy 1,358,725 3,830 3 9.4 Cluster
    read by other session 438,494 1,169 3 2.9 User I/O
    SQL*Net more data to client 19,423 879 45 2.2 Network
    Any idea of the of the bottleneck?
    Thanks

    8 CPUs, load average 4, runqueue 0 and usage 30-35%
    Does this indicate any issue with system resourcesNO. Not at all.
    However a poor schema design or inefficient SQL execution can mean that a query that should do 100 'consistent gets' is doing 10,000 'consistent gets' -- in the buffer cache, consuming CPU and not waiting for I/O. This is a scenario where you have idle CPU but CPU usage is inefficient. (Thus, for example, adding more CPUs will not help your users at all).
    So you should look at the queries and see if queries can be improved.
    If, on the other hand, users are not complaining of performance and all response times are within expectations, than you have no issue at all.
    Hemant K Chitale

  • CPU TIME and DB CPU events under TOP 5 TIMED FOREGROUND EVENTS section in AWR report

    Is there any difference between "CPU TIME" event and "DB CPU" event when shown in AWR report under section "TOP 5 TIMED FOREGROUND EVENTS"?
    As per my understanding of both these terms they indicate the same thing. But then if it is so then why have different names?
    I searched around but the only relevant discussion that I found was as under, which didn't really cleared the doubt.
    https://forums.oracle.com/message/2571255#2571255

    In the article that you have mentioned - Jonathan Lewis gives you a very clear explanation. CPU Time is updated at the end of a query. DB CPU is updated every few seconds.
    So the CPU Time may be less than DB CPU if there is a long running query that did not complete during the snapshot that you are reporting for. Conversly CPU Time may be larger than DB CPU if there is a long running query that spanned multiple snapshots but completed in the snapshot that you are reporting for.

  • Statspack : Top 5 Timed Events - CPU time

    Hi,
    I just get some statspack reports on my 10.2.0.2 database (HP-UX 11i).
    I'm just surprise about the CPU time into the Top-5 events.
    Top 5 Timed Events                                                    Avg %Total
    ~~~~~~~~~~~~~~~~~~                                                   wait   Call
    Event                                            Waits    Time (s)   (ms)   Time
    CPU time 4,263 97.3
    latch: cache buffers chains                    197,925          42      0    1.0
    log file parallel write                          8,982          22      2     .5
    log file sync                                    8,620          22      3     .5
    wait list latch free                               399           7     17     .2What does CPU time here ? Is it a problem here ?
    Thanks in advance for your lights.

    Hi,
    it seems that your database experiences a high SQL workload. The section of statspack report called "Top SQLs by Buffer Gets" might give you an idea what SQLs caused this CPU workload.

  • Jdev CPU profiler doesn't show inherint method timing - Any way to get it

    Hi,
    CPU profiler both in HOTSPOT and Callstack doesn't give method's inherint timings . it only shows parent + descendant timing (inclusive timing) . This doesn't help me to quickly find which method inherintly is expensive (ie timing withouts its child included ) .Is there a way to get the timing of a method without including its child method timing ..
    Regards,
    Indraneel

    Depending on what version of JDeveloper 11 you are running, exclusive time in a method is called "CPU Exclusive" or "CPU Shallow" in the CPU profiler column headings. The column is there; there is data in the column for some methods (Click on the 'CPU Exclusive/Shallow' column to sort by those values). So it's hard to understand how the profiler does not report it.
    Perhaps your issue is that the profiler doesn't report it accurately?

Maybe you are looking for

  • How can i sync my ipod to my computer with out re-adding them??

    I just got a new laptop and i already have all my music on my ipod i want all the music from my ipod into a library on my laptop on itunes.please any suggestions

  • Query related to inner join V/S all entries........

    Hi all, I have a dought ...related to join and all entries Which one will be the better as per performance prospective : 1>For all entries or 2> using inner join condition i am combining 2 tables ... but in my where clause is having 6-7 condition if

  • Problems with getting internet explorer on my mac with virtual box 4.3.20, who can help?

    This is what I did: 1) downloaded and installed virtual box 4.3.20 2) copied curl -s https://raw.githubusercontent.com/xdissent/ievms/master/ievms.sh | IEVMS_VERSIONS="11" bash in the Terminal (for IE 11 only). I got this from the link: Internet Expl

  • Do anything in just one scheme

    Hi friends. I have a user with DBA privileges but it is so much. How do I know which schemes exists in my Oracle and then how do I give privileges for do anything but in just one specific scheme? <br> Thanks

  • Can't find sent sms messages in 8330

    I need to retrieve some sent messages, but when I go to view folder, it only shows the oldest message and I can't find any way to view more recent ones. Any help would be greatly appreciated. Thank you Solved! Go to Solution.