Skip to content

How much time a process need?

10 messages · Alaios, Joshua Wiley, R. Michael Weylandt +3 more

#
On 07.11.2011 11:09, Alaios wrote:
system.time() responds in seconds, hence you can apply simple arithmetic 
to get days, hours and minutes.

Uwe Ligges
#
On Mon, Nov 7, 2011 at 5:32 AM, Alaios <alaios at yahoo.com> wrote:
It's all in seconds.  Convert whatever fields you want.

Josh

  
    
#
Alaios:

Generally I would think you would look at the elapsed field (at least
I do): consider the example you ran to give that data. Did it take
about half a second or a minute?

Gabor showed this example once to illustrate the difference:

system.time(Sys.sleep(20))

Michael

PS -- If you really want to dig into this, try this set of tools:
https://code.google.com/p/rbenchmark/
On Mon, Nov 7, 2011 at 8:40 AM, Joshua Wiley <jwiley.psych at gmail.com> wrote:
#
On 07.11.2011 14:32, Alaios wrote:
Yes, the elapsed time in seconds.

Uwe Ligges
#
On 08/11/11 02:40, Joshua Wiley wrote:
That being said, doesn't having an elapsed time of over 67 seconds,
when the actual calculation takes less than half a second, indicate
that something weird is going on?  At the very least the R calculations
are fighting for resources with some other very greedy processes.

     cheers,

         Rolf Turner
#
could be that the process was waiting for the user to select a file from a list, or some other input before proceeding.  Would have to see what the overall performance of the system was at that point.  It could also have been that the process was low on physical memory and there was a lot of paging going on.

Sent from my iPad
On Nov 7, 2011, at 21:50, Rolf Turner <rolf.turner at xtra.co.nz> wrote:

            
#
The 'user' + 'system' will give you how much CPU is required which is
an indication of how many of the CPU cycles you are using.  The
elapsed time is just how long it spent.  If the script is CPU
intensive, and there is no paging going on, you should see the CPU
time close to the elapsed time.  Longer extensions in the elapsed time
is an indication of extensive I/O, or it might  be an indication that
you are calling another process; e.g., you have a PERL script that is
parsing some data in preparation to using in R.

If you are really interested, then enable the monitoring on your
system and see what else is running.  Use 'perfmon' on WIndows or a
combination of 'ps' and 'vmstat' on UNIX/Linux systems.  Run you
script on a system that has nothing else running and interfering with
resources and then look at the results along with the performance data
from the entire system in  order to create a "model" of how long
things will take.
On Tue, Nov 8, 2011 at 8:31 AM, Alaios <alaios at yahoo.com> wrote: