JVMTI Heap Measurement vs. external measurement

Hello,
I am about to do some memory distribution analysis of the content of a java heap. In a first step I build an JVMTI agent which writes all reachable objects with their size to a file. For each reference caught by IterateOverReachableObjects() I write refererer and referee to another file too.
First the sum of all object sizes is is around 130 % of the heap size reported by jstat and Runtime.getRuntime().totalMemory() - Runtime.getRuntime().freeMemory() Both report exactly the same.
Taking the sum of all objects only found as referees is the references-file is little smaller, but none the less significantly larger than reported by the two named possibilities.
Whats the reason for this? What is wrong on my approach? Is it what the JVMTI reference says? That :
"... This size is an implementation-specific approximation of the amount of storage consumed by this object. It may include some or all of the object's overhead, and thus is useful for comparison within an implementation but not between implementations. The estimate may change during a single invocation of the JVM."
Robert

Here are a few more comments which might be helpful:L
1. IterateOverReachableObject didn't report all references to resolved entries in the constant pool in 5.0. I don't have the bugID at hand but it is a known issue that was fixed in 6.0.
2. IterateOverHeap doesn't report internal objects but there are some objects in the perm generation (such as interned Strings) that may not be reachable with IterateOverReachableObjects. The constant pool issue in #1 is part of the same issue.
3. IterateOverReachableObjects skips over classes which aren't linked. I believe you will see these classss with IterateOverHeap as does a linear iteration over the heap and reports all (non-internal) objects.
4. For the most part the classes and counts for +PrintClassHistogram should be the same as what you see with IterateOverHeap.  There are a few differences such as internal objects but there are a few others that need a more detailed explanation - I'll post a reply on that when I get time.                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                       

Similar Messages

  • Heap Measurement: jstat (and what exactly it reports)

    Hello,
    while doing some heap measurements (on a 1.5 JVM) I found some contradictory values for heap size by different means. Using a JVMTI approach ( iterateOverReachableObjects() and iterateOverHeap() ) has given me some values which I could bring in harmony which values given by -XX:PrintClassHistogram. As those two approaches give identival values I have found 3 other ways which report another 3 identical values, which are significantly smaller than the first two.
    Those (last 3) approaches are using:
    - jstat -gc
    - Runtime.getRuntime().totalMemory() - Runtime.getRuntime().freeMemory() (inside Java)
    - ManagementFactory.getMemoryMXBean().getMemoryUsage().getUsed() (inside Java)
    As those values do not correspond to anything I could evaluate using JVMTI I would like to have explained how those techniques work and what exactly they report.
    jstat is one of the three. I guess it helps if its measurements are explained to solve my problem.
    Robert

    From my experience, manual reports, for example, are created in a tool like Excel.
    A business analyst will extract data from a source system and create a report in Excel for other business users. This often happens for Monthly and Quarterly reporting cycles.
    Many businesses are choosing Oracle Hyperion to automate this process.
    Using a system of servers and software Oracle Hyperion can extract data and create reports automatically. This helps to improve efficient as well as data quality and allows everyone to analyze the same values the same way across the business.
    Does this help?
    Brian Chow

  • Unified CCX Engine JVM Heap counter monitoring

    Greetings!
      I'm looking for solution how I can monitor Unified CCX Engine JVM Heap counter from external system.
    Description for the object in RTMT:
    Object: Unified CCX Engine JVM Heap
    Counter: PercentageMemoryUsedAfterGC
    Desc: This represents the percentage of heap memory that is used by the application after the last full Garbage Collection cycle.
    At the moment I see the only one solution which is to get the value via SNMP. But I couldn't find the OID for this counter. Can anyone tell me where I can find it or suggest another solution ?
    Thanks in advance for your answers.

    AMOR is a new one for me, and I like it!
    I have not tried to access this API from UCCX, however, it's just another VOS API which should be the same on all VOS platforms.  An attempt to query the UCCX server for its PerfMon WSDL, does not return one, so perhaps it doesn't.  It did work on my CUCM.
    https://ServerName:8443/perfmonservice2/services/PerfmonService?wsdl

  • Goes black in full screen

    There are a few issues I am running into on iMOVIE 11 running on lion. The first is that sometimes when editing the preview screen of the video will be stuck on a freeze frame image of a random clip and sort of ken burns it as if the video were a photo. Sometimes it just goes black. When I restart imovie i can get some editing doen then it goes back to the problem. The audio still plays. Also after about 5 minutes of playback in fullscreen mode -the screen will flash off and on and then just cut out, all the while still having some audio. The film I am using was captured by the camera on my computer from the import button in imovie and some from an external hd camera. When I try to export the video it gets to one minute left and then imovie quits unexpectedly or it says there is not enough memory in the heap zone.

    The external camera is not HD just found that out

  • How to use external timebase for Two Edge Separation measurement with PCIe 6351

    Hi
    I am working with PCIe 6351 x series DAQ card.
    counter measurements.
    Here i need to measure the time/no edges between two edges. Falling to Raising of two signals.
    I got the measurement with internal time base.
    here i need to synchronize the measurements with external clock from the external setup.
    so i need to use that external clock,timebase for the counters.
    Any solution please..
    Regards,
    Hari

    First, the VI you mention is NOT for STC timer/counters. Therefore, it won't work.
    If you want to get the time interval between two edges, you want to use the Functions -> Data Acquisition -> Counter -> Count Events or Time VI. This will do the function you are looking for.
    Mark

  • Measure scan frequency using 2 e-series boards and an external clock.

    I am setting up a data acquisition system in which the user has the ability to select between multiple sources for the scan frequency. The user can choose either hardware based and select the scan frequency or an external source, in this case, an encoder. When the user selects the external case, I would like to measure the scan frequency. I have a PXI chassis with 3 6071E DAQ boards. I have the encoder pulse train wired into the master board and would like to use one of the slave boards to count the pulses and measure the frequency. I based the code I developed on example code that shipped with LabView. However, when I drive the master board with a known frequency using its internal clock,
    I measure 0 frequency on using the slave boards counter.
    Attachments:
    DAQ_3_Boards_-_State_Machine_-_Scaled_Array.llb ‏1525 KB

    It sounds like you have your program setup to measure the frequency of the clock only when you are using an external source. The counter won't get an input if you are not using an external source, right? So, when you drive the master board with an internal clock, the counter will have nothing to count.

  • External sample clock with pulse width measurement

    Dear all,
    I am using a NI 6220 board (programming with ANSI C) and would like to perform a "single pulse-width measurement" using an external gate signal and an external signal as source.
    Using the  "DAQmxCreateCIPulseWidthChan" command the program and card works only partly as intended. Namely, the external gate did work, but the card uses the internal 80 MHz time base signal instead of the external source connected to the default source pin (PFI 8).
    I tried to route another PFI pin to the default source pin using the "DAQmxConnectTerms" command but this did not help either.
    Obviously, I am missing something...
    Best, Uli
    Solved!
    Go to Solution.

    Hi Uli,
    I posted to your thread here.
    Best Regards,
    John Passiak

  • NI6602 pulse width measurement: Do I have to use an external sample clock?

    Hi
    In the .NET 4 example 'MeasPulseWidthBuf_SmplClk_Cont' it is stated in the comments that:
    An external sample clock must be used. 
    Counters do not have an internal sample clock available.  You can use
    the Gen Dig Pulse Train-Continuous example to generate a pulse train on
    another counter and connect it to the Sample Clock Source you are using
    in this example.
    I have an application running without specifying an external clock. The applications is running, but I'm not sure I can trust the recorded data. Here is the channel creation code:
                    task.CIChannels.CreatePulseWidthChannel(readTaskCounter,
                                                            "ReadPulswidthTask", 25e-9, 20e-6,
                                                            CIPulseWidthStartingEdge.Rising,
    CIPulseWidthUnits.Seconds);
    task.CIChannels.All.DataTransferMechanism = CIDataTransferMechanism.Dma;
                    task.Stream.Timeout = callbackTimeoutInMilliSeconds;
    task.Stream.Buffer.InputBufferSize = 50000;
                    task.SynchronizeCallbacks = true;
                    task.Timing.ConfigureImplicit(SampleQuantityMode.ContinuousSamples);
                    task.Control(TaskAction.Verify);
    Note that I'm not specifying any external clock.
    1) Which clock is the daq using? -It is obviously using some clock since I can collect data via this task.
    2) Do I need to change the configuration to use an external clock to achieve reliable readings - as mentioned in the 'MeasPulseWidthBuf_SmplClk_Cont' example?
    /mola
    Solved!
    Go to Solution.

    Hi mola,
    That specific example is for sample-clocked pulse width measurements.  This type of measurement is only supported on newer hardware such as X Series boards and will not run on the 6602.
    Your application that you linked uses Implicit timing, meaning that the signal itself serves as the sample clock.  That is, at the end of each pulse width that you measure, the sample is deterministically latched in.  So, you end up with a buffered array of every pulse width that is seen by the counter.
    Best Regards,
    John Passiak

  • Measuring point External Number range

    Dear Masters,
    I am trying to create the external number range for one of my measuring point type. Is it not possible to do so? If no why? If yes how?
    Thanks to all in advance.

    Hello Vaibhav,
    I have already followed the steps given by you only I cannot find the assignment of measuring point category to the number range. I have also done the number range assignment for equipment and functional location but there it exists here it does not.
    It is also showing me the error of external number while creating the new measuring point. Please do guide about the assignment to the number range.
    Thanks again.

  • How to "measure" working time of external SAP consultant, impossible?

    Hello,
    Could anyone tell me is there any way to track/measure external SAP consultant time (which works from different geographic location online) and how much did one SAP consultant spend time/effort in solving any problem, no matter if it is entering new entry in some table (DEV-QAS-PRD) or some serious problem etc.
    Problem is I that  external SAP consultant had send me the bill for solving some problem which took him 3 hours to resolve. However, I know that this problem can be solved 100% for 1.5h and that's reason I am asking this question.
    Is the best soulution to ask for detailed timesheet every time my external SAP consultant makes some changes - sends me the bill?
    I hope I explained it correctly, any help is appreciated and many thanks in advance for prompt replys!
    Cheers;)
    Sam

    Thnx for quick reply Lucas!
    It's a matter of trust that way...
    Better have him come to your location and have him work locally with you or whomever together so you can actually see what he does.
    I already had chance to to this and that is ok but sometimes my external SAP consultant must work from another geographic location (online via Interent) because there is no other way..
    The fact that you could solve a problem faster than the consultant doesn't justify paying less or the like either... switching the consultant might help ;-/
    I know but thing is that I would like to know why someone says that he needs 12 minutes to do a 5 push-ups when average person can do it in 2-3 minutes, if you know what I mean.
    not really a helpful reply and a bit pessimistic, I know... let's see what the others suggest :-P
    It's ok, I understand because you are realistic but I also hope for some other answers, I hope some of the answers will help me and put smile on my face;))
    All the best,
    Sam
    Edited by: samnovice on Feb 6, 2012 7:28 PM

  • External signal gated measurement

    Hi,
    I have a PCI-6602 card and use it in LabVIEW 8.2 with DAQmx.
    I use an external digital signal as trigger to PFI0 channel (choose pause when low option),
    and using ctr0 for the source signal channel.
    The problem is: the external trigger signal contains three parts: 1 ms high voltage, 3 ms low votage,
    1 ms high voltage, I want to get the counts for first 1 ms duration and the second 1 ms duration, how to do it? Thanks.

    Hi JackN,
    It sounds to me that you simply want to make a pulse width measurement using your counter. This is no problem. If you go into the example finder Help>>Find Examples... The browse to the path Hardware Input and Output>>DAQmx>>Counter Measurements>>Period or Pulse Width and find the example Meas Pulse Width-Buffered Finite.vi. You can simply use this VI which will give you a measurement of the that 1ms pulse width in either seconds or ticks of the source signal. You will want to connect your "trigger" signal (1ms-3ms-1ms) to the gate of the counter you're going to use. Then if you have an external sample clock to make this measurement you'll connect it to the source of the counter, other wise do not connect anything else and use implicit timing on the DAQmx Timing.vi. If you are using an external sample clock to make this pulse width measurement you might also want to check out the VI just below the one I mentioned that also includes ...Sample Clock... in the name. 
    Using this VI will give you the pulse width of both of the 1ms pulses and if you keep it as a finite acquisition you'll only need to take 2 measurements. So in this case you don't really need to think of the signal as a trigger but as the signal that you're actually measuring. If you're curious about the capabilities of the counters in your 6602 take a look at the M Series User Manual in the Counters section starting on page 107.
    http://digital.ni.com/manuals.nsf/websearch/2025C99AB0614F9E8625748000577B9A
    Chris W

  • External number range for measuring point

    Hi experts,
    How to assign external number range for measuring point ?
    Regards
    Shashi

    I have just checked and the measurement point number is linked directly with tthe object for eaxample equipment and when I tried this I got the same result the system defaults the number based ont he internal number range.
    This being the case what is the business requirement that you need to use external numbering as this may help and someone may be able to assist either with an answer to the problem or an alternative solution.
    SAP documentation as follows:
    Create Number Ranges for Measuring Points
    In this step you define number ranges for measuring points.
    Notes
    As the numbers for measuring points are assigned internally, you should work with the standard settings. If you want to make changes, you should always use number range 01.
    Jim
    Edited by: JamesPetrie on Feb 28, 2012 2:45 PM

  • NI WSN 3212 takes incorrect measurement with external power

    Hi, all.
    I have a problem with temperature measurement using NI WSN 3212 node with external power supply. The value randomly changes for all four channels. It happens if at least one thermocouple connected to any channel. If I disconnect all thermocouples, the values of channels are NaN. I have not this problem when node powers by battery.

    Hi,
    1. Check for the correct power cord that you have attached with the node to give the external power.
    2. Check for any external power supplied to the channels from your side.
    3. Reboot the node and try to obtain the temperature from thermometer.

  • How I can measure frequency of TTL signal without external clock?

    Hello,
    I want to measure frequency of TTL signal using PXI-6254 or PXI-6713, without using external clock.
    Frequency will be up to 100kHz. How I can use internal counter of 20MHz or 80MHz?

    Hi Yuta K,
    You have not stated what software you want to use for this measurement, but in case you're using LabVIEW, please go to the Example Finder (in LabVIEW go to "Help >> Find Examples"). 
    In the Example Finder, you make sure the "Browse" tab is stil selected, and than you go to:
    Hardware Input and Output >> DAQmx >> Counter Measurements >> Digital Frequency
    Here you will find some good examples of measuring a digital frequency with 1 or 2 onboard counters.
    If you need additional information, please let us know!
    Best regards,
    Peter S

  • External clock LabView crash with Measurment Computing board.

    Hi,
    I'm using a Measurment Computing PCI-DAS6402-16 board with Labview (using Universal librarys VIs) in a 4-stroke engine DAQ application and amognst the signals obtain Internaly clocked, there is In-Cylinders Pressure signal which is timed with a Crank-angle deocoder sending analog pulse signal.
    Although there seems to be no problem while the motor is running, it appears that when to external clocked signal  is not getting any pulses (while the motor is not running) then Labview stops to respond and awaits for the external clock to start, and that doesnt happen within 10s then it crashes.
    I dont know whether it is Software problem (because external and internal clocked signals are both in the same WHILE LOOP) or if it is a Hardware problem (because With a NI card there seem to be no problems).
    THNX in Advance

    Well it couldnt be a more typcal windows crash:
    If a channel is externally timed with an analog pusle signal, If the VI starts running but the external clock isn't then:
    -Labview stops to respond to any clicks (there is no .exe at this point) but it keeps working though (That i know cause if i start the ext. clock at this point it "un-stucks' and starts working)
    -But, if for some secs no ext. pulse signal is generated then labnview app stops respondin and i get the typical 'send error report' window.
    Could it be that the Universal library for Measurment Computing boards haw a bug? Cause the same thing happens with the "Analog input External Clock.vi" example given with the Library..so it can't be my mistake..or can it?!

Maybe you are looking for