How do I measure the CPU/GPU split of load/usage in Java3D?

Hello,
Is it possible to measure the split between graphics and CPU usage to find out how much work each is doing, what work is done, and which is doing the most work, for example? If so, how can this be implemented in the Java3D code?
For example, on a particular system, measure whether the GPU is doing the most work, or the CPU.
Thanks for your help :)

In Linux, you can read /proc/uptime. It does NOT give you the load averages that the command uptime gives. It gives you numerically the amount of time the CPU was idle vs how much time it was spent doing something. You need to read these two floating point numbers one every second, or once every 5 or 10 seconds then do the delta on the change: The maths are as follows:
Read the file in twice in 5 seconds, parse into two floats/doubles:
double[] last;  // the first read of the file
double[] rect;  // the latest read of the file
double ld = last[1] - last[0];
double rd = rect[1] - rect[0];
double cpu = (1.0d-(rd/ld)) * 100.0d;This should print the CPU percentage in Linux for that given time frame (5 second updates).

Similar Messages

  • How Can I Measure the CPU Power My Flash Movie Uses?

    Hi All,
    I'm working on a complex job that is intended to play on low-end PCs so I'm looking at ways to reduce the processor load the movie needs to play. Obviously large screen size, high frame rate, intensive ActionScript, and complex graphics all add greatly to how much CPU power is needed to run a Flash movie, but is there a way of getting an accurate reading of the CPU power it is using? I am modifying a job that was running badly on low-spec PCs so now want to adjust it to run faster and smoother so would like to somehow be able to compare the modified job with the original. Any Idea how I could do this?
    Any help would be greatly appreciated.

    Hi. I tried your suggestion and I could not get it to work well. In
    fact it worked better without the running average (which suprised me).
    I also played with the number of data points but still could not get it
    to work well.
    Do you have any other suggestions on how I could sort this problem out?
    I
    have attached a screen shot of the signal. To recap, I'm trying to
    measure the'y' position of the flat regions of the signal. The signal
    does not have a constant level, so this 'y' position varies with time
    in a non-unform manner.
    I am currently differentiating
    the signal and selecting the y position when the differential is equal
    to zero (within a tolerance band).
    In the screenshot, the
    signal has been zeroed using the method I have described above.
    However, it occasionally has glitches which may be caused when the code
    picks up a zero gradient at a peak or valley in the signal.
    I therefore need some kind of algorithm that only measures the position of the flat regions.
    Many thanks
     John
    Attachments:
    screenshot.gif ‏121 KB

  • Measuring the cpu and ram consumption of a given query in sql server

    hello there how you doing and am new to this sql server forum and i suddenly popped to ask questions related to sql server
    and my question goes like this
    in sql server i have table called testt and it have more thna10000000 records
    and i have written a query select * from testt limit 9000000; and what i want is to measure the
    CPU consumption of this given query=???????????????
    and
    RAM consumption of this given query=???????????????
    Time consumption of this given query=?????????????? this i will get it from the result bar but i don't know whether it is correct or not
    any help on this it may be query, tool or configurations all are acceptable and appreciated
    10Q for letting me ask questions and feeling freely.

    Please check these queries and this may helps you to get whats happening on with CPU currently..
    SELECT getdate() as "RunTime", st.text, qp.query_plan, a.* FROM sys.dm_exec_requests a CROSS APPLY sys.dm_exec_sql_text(a.sql_handle) as st CROSS APPLY sys.dm_exec_query_plan(a.plan_handle) as qp order by CPU_time desc
    Top 50 CPU usage :
    SELECT TOP 50 st.text
                   ,st.dbid
                   ,st.objectid
                   ,qs.total_worker_time
                   ,qs.last_worker_time
                   ,qp.query_plan
    FROM sys.dm_exec_query_stats qs
    CROSS APPLY sys.dm_exec_sql_text(qs.sql_handle) st
    CROSS APPLY sys.dm_exec_query_plan(qs.plan_handle) qp
    ORDER BY qs.total_worker_time DESC
    SP_Whoisactive --- download from : http://www.brentozar.com/responder/log-sp_whoisactive-to-a-table/
    Activity Monitor and sp_who2 active also will give some idea...
    Reference links...
    http://channel9.msdn.com/posts/SQL-server-High-CPU--Part-1
    http://channel9.msdn.com/posts/Troubleshooting-SQL-server-High-CPU--Part-2
    http://jeffstevenson.karamazovgroup.com/2008/09/identifying-high-cpu-sql-processes.html
    http://searchsqlserver.techtarget.com/tutorial/Step-1-CPU-usage
    ================
    Execute this script and and start doing your analysis in your server so that you will get more idea how its working and all the details...
    Sample CPU Test : Dont try this in production and try this in your test or Dev server..
    -- Query to Keep CPU Busy for 2 0 Seconds
    DECLARE    @T DATETIME, @F BIGINT;
    SET @T = GETDATE();
    WHILE DATEADD(SECOND,20,@T)>GETDATE()
    SET    @F=POWER(2,30);
    You can easily change the parameter in the DATEADD and can make it run for 50 seconds.
    -- Query to Keep CPU Busy for 50 Seconds
    DECLARE    @T DATETIME, @F BIGINT;
    SET @T = GETDATE();
    WHILE DATEADD(SECOND,50,@T)>GETDATE()
    SET    @F=POWER(2,30);
    Raju Rasagounder MSSQL DBA

  • How can I measure the Graphics Card usage? I.e. percent load

    Hello,
    How can I measure the Graphics Card usage, like with the processor in Task Manager, but instead giving a percentage usage for the graphics card instead? Is there an easy way to do this, or would it require a lot of code? Is it even possible?

    Ah, so It's unlikely that Java3D will include anything for reading this data then? I was really aiming at measuring the GPU usage under this API which although i have limited knowledge using, I do at least have some knowledge - I wouldn't have a clue how to access any other API's!
    I'm using an NVidia TNT2 card at the moment, which is quite old.

  • How can I measure the hertz in a wave form?

    How can I measure the hertz in a wave form?

    As an example, this is from BBC Technical Requirements for HD material:
    3.1.1 Stereo line-up tones
    All stereo tracks must use EBU 1KHz tone (left ident). All tones must be sinusoidal, free of distortion and phase coherent between channels.
    Digital Audio Reference level is defined as 18dB below the maximum coding value (-18dBFS) as per EBU recommended practice R68.
    See also:
    http://www.bbc.co.uk/guidelines/dq/pdf/tv/tv_delivery_to_network_programmes_v1.2-2011.pdf
    for full document.
    And for BBC Radio:
    Not every Network requires tone. Check the delivery requirements with the commissioning network or click here.
    Reference tone, where used, should be at -18dBFS or PPM 4 on A, B and/or M.
    If submitting material with reference tone, tone and programme material must be have been monitored and measured through the same technical chain. The level of the tone must be equivalent to 0dBu and no less than 8dB below peak audio level for the programme material.
    THE LEVEL OF TONE MUST HAVE A KNOWN RELATIONSHIP WITH THE LEVEL OF THE PROGRAMME MATERIAL AND THIS MUST BE STATED; for example: “Tone at 8dB below peak programme level”.
    As a newcomer to digital sound (my background is camera) I confess to being somewhat confused. We are normally told to record at the highest level possible. So for voice podcasts I tend to record at about -6dB below peak for maximum volume, distributeds on MP3 files.
    But I can underatand that televison and radio especially for analogue transmission) may have limited headroom, hence the requirement for -18dB peak = 0dBM.
    I remember when we first rented out Digital Betacam cameras, some recordists were recording almost everything OVER -18dBM.
    I suspect that until we have an all-digital world, these requiremnents will still be in place.
    Many thanks to all. It's a ghreat community!
    Brian Rose

  • How do u measure the size of the infocube?

    hai gurus
    1) how do u measure the size of the infocube?
    2) what r the asap methodolagies?
    thanks in advance
    rams

    hi Rams,
    1. use transaction se16, infocube table /../f[infocube name] and /.../e[infocube name], count 'number of entries' - total records
    use transaction db02 tablename infocubename - size in bytes
    Re: how can we measure the info cube size
    2. asap methodology
    Re: Lifecycle Implementation
    hope this helps.

  • Probook 6570b - Are the CPU & GPU upgradeable?

    Hi, I bought a refurbished Probook 6570b running Windows 7 Professional 32-bit. It seems it doesn't come with the core cpu but rather a celeron B840 1.9GHz. Nor has it a discrete Graphics unit.
    My question is this. Are the CPU & GPU upgradeable? 
    Thanks for taking time to read this!
    This question was solved.
    View Solution.

    Thank you!

  • HELP!!! - can i somehow tell my program how much percent of the CPU to use?

    can i somehow tell my program how much percent of the CPU to use?

    Yes but that doesn't mean that it is only going to
    use, for example, 10% of the CPU. It just means it
    won't use as much, maybe, as some other process.The
    answer is no.In my previous reply I made the assumption the OS
    wanted one program not to "hog" the processor. The
    normal way to deals with this is to use priorities.
    But the answer is still yes. The answer, in terms of the question, is still no.
    The OS can, or nothing
    would prevent an OS from, also putting restrictions on
    a program and say it may never claim more than 1/10 of
    the availible CPU time.I know of know OS that has any tool that allows one to set an application to use a percentage of the CPU.
    I can't even imagine a business need for it except under some obtuse testing (and only testing) conditions.

  • How can I measure the thickness of a circle line?

    Hi,
    we try to measure the thickness of a circle line to find out if the circle is round or if there is any deviation in the circle. By now we are using the FindEdges tool and measure the circle at different points.but this is not sufficient.
    Does anyone has an idea how we can measure the thickness of the line of a circle?
    thanks
    Oliver

    Hi,
    yes I have two pictures.
    Picture 1 is the original, Picture 2 is the "working picture"
    greetings
    Oliver
    Attachments:
    Picture1.zip ‏243 KB
    Picture2.zip ‏5 KB

  • How can i measure the speed of the fan in sound and vibration signal simulator box

    how can i measure the speed of the fan in sound and vibration signal simulator box
    provided the values  tach out:2 pulses/revolution and  maximum speed = 6000rpm

    Hi. I tried your suggestion and I could not get it to work well. In
    fact it worked better without the running average (which suprised me).
    I also played with the number of data points but still could not get it
    to work well.
    Do you have any other suggestions on how I could sort this problem out?
    I
    have attached a screen shot of the signal. To recap, I'm trying to
    measure the'y' position of the flat regions of the signal. The signal
    does not have a constant level, so this 'y' position varies with time
    in a non-unform manner.
    I am currently differentiating
    the signal and selecting the y position when the differential is equal
    to zero (within a tolerance band).
    In the screenshot, the
    signal has been zeroed using the method I have described above.
    However, it occasionally has glitches which may be caused when the code
    picks up a zero gradient at a peak or valley in the signal.
    I therefore need some kind of algorithm that only measures the position of the flat regions.
    Many thanks
     John
    Attachments:
    screenshot.gif ‏121 KB

  • How can I measure the copy speed of my compact flashcard to folder?

    how can I measure the copy speed of my compact flashcard to folder?
    I dont have a stop watch.

    Hi Steve Zavodny;
    Generally compact flash cards or basically slow because of them being flash memory and USB. What are you after here?
    Allan

  • How can I get the 23 July update to load onto my iPad. I haven't been able to access my documents or work for weeks and need to use it. Has anyone else had similar problems?

    How can I get the 23 July update to load onto my iPad. I haven't been able to access my documents or work for weeks and need to use it. Has anyone else had similar problems?

    Hello Arthur,
    Thank you for the reply.
    You were correct that deleting the app and reinstalling it was the only thing to make it work but unfortunately I lost all the documents I made, even though they were backed up to iCloud before i deleted the app. At the same time as deleting pages I had to delete keynote and numbers too, so I've lost all the documents in them too.
    The mb of data which was assigned to each programme in iCloud has reduced, so. I guess they are gone for good. Is there any other way to reaccess them?
    Not your fault but I am a bit fed up the the iPad. I have lost work that I've done and have no other copy apart from what was in iCloud, as I don't have a printer and couldn't email them too myself as I couldn't get into the programme and  i've also got episodes of tv series I purchased that I can't download and albums that are half downloaded with songs missing, so I feel a bit swindled out of time and money and am going back to DVD ,  pen and paper and CDs .
    Instead of using iCloud I guess the only way to make sure I don't loose any more documents it to email them to myself each time I save them on the iPad. Is there anything else you could suggest please?
    I don't have any other apple products apart from iPods, so I can't access the iCloud on anything else can I?
    Thanks
    Amanda

  • Can I load Microsoft Office Word 2011 for MAC on an IPAD 2?  If yes, then how?  I have the software and one more load opportunity left.

    Can I load Microsoft Office Word 2011 for MAC on an IPAD 2?  If yes, then how?  I have the software and one more load opportunity left.
    Reason that I ask is that I'm worried that I will not be able to read or work word or excel docs that people send me.

    No. Office 2011 for Mac is coded to run with OS X. In order to work on the iPad the app must be coded for iOS instead.
    If you look in the iTunes App Store, you will find that there are many apps that allow you to work with Office files on an iPad.
    Allan

  • How do I find the URL for a document loaded into Buzzword?

    How do I find the URL for a document loaded into Buzzword?

    What kind of document? What is Buzzword?

  • How do I measure the period of one TTL signal and the delay until a second TTL signal?

    Hi,
    I have a PCI 6024E board, the SCB-68 terminal box and am running LabView 6.1.  If needed I could install 7.1.
    I have two Honeywell sensors (HOA7720) which each consist of an infrared transmitter and a infrared reciever.  When the beam is broken they output 5V, when the beam is open it outputs 0V.  These are sensing the presence of a hole in two discs passing thru the sensors.  
    So as disc 1 rotates the signal is 5V until the hole passes thru sensor 1, then it drops to 0V until the hole passes.  Then it jumps back to 5 V. 
    Disc 2 is rotating at exactly the same RPM as disc 1 because they are coupled with a spring loaded coupling.  There is a delay between the first hole passing thru sensor 1 and the second hole passing thru sensor 2.  The delay increases with torque. 
    Using the oscilliscope function and connecting Signal1 and Signal2 to AIn0 and AIn1, I have verified that the TTL signals are there.  So electrically everything is working.  I just need to know how to measure the period and delay.  I'm familiar with A/D, but not with counters/gates etc and I think that's what is required here. 
    The first measurement needed is RPM.   Somehow I need to measure the period of the TTL signal. 
    The second measurement needed is the delay between the 1st falling edge and the 2nd falling edge.  
    I don't think it's possible to use the millisecond timer for anything, because the accuracy wouldn't be good enough.  At 3600RPM the disc will spin 60 revs per second, or one every 17ms.  A resolution of 17 samples per revolution is not good enough.    
    Help please!

    It worked!
    I ended up figuring it out today.  It's really simple.  I went analog in to AIn14 and AIn15 which were free. Then the program does a multichannel scan of the signals (collects array of 2 waveforms), Signal 1 and Signal 2 at some scan rate.  I used 100,000 S/s for 10,000 samples. Then I split the array into two separate waveforms.  Then I did an edge detect on each one and it returns the position in the array where the falling edge occurs.  The difference is the delay (after correcting for the scan rate), unless Sig2 comes first in which case the delay is the period - (or +) the difference
    To find the period I used a subset of the Signal 1 waveform from the first falling edge on to the end of the waveform, then did the same edge detect except set the reset setting to true instead of false so it wouldn't detect the low signal which was now at the position 0 in the waveform.  So it would ignore the initial low value, wait for it to go high, then detect the falling edge position.
    Anyway, it works awesome, seems very accurate and gives very stable readings.  3600rpm no problem.  It detects changes of one or two degrees in angular position, with a range from ~145 degrees to ~280 degrees

Maybe you are looking for