[R] How much time a process need?

jim holtman jholtman at gmail.com
Tue Nov 8 14:53:07 CET 2011


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:
> Actually I want to have a rough approximation. A process that takes one day
> and a half it is good to send me how many hours it gets. It is not a problem
> to convert the values of system.error the major is that I am not sure If I
> should use the user or elapsed time for getting an estimation of how much it
> takes once  I press enter theh process to finish
>
> A
> From: Jim Holtman <jholtman at gmail.com>
> To: Rolf Turner <rolf.turner at xtra.co.nz>
> Cc: "R-help at r-project.org" <R-help at r-project.org>
> Sent: Tuesday, November 8, 2011 12:34 PM
> Subject: Re: [R] How much time a process need?
>
> 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:
>
>> On 08/11/11 02:40, Joshua Wiley wrote:
>>> On Mon, Nov 7, 2011 at 5:32 AM, Alaios<alaios at yahoo.com>  wrote:
>>>> So I just need to get the
>>>>
>>>>    user  system elapsed
>>>>  0.460  0.048  67.366
>>>>
>>>>
>>>> user value and convert the seconds to days and then to hours ? Right?
>>>>
>>>> What about this elapsed field?
>>> It's all in seconds.  Convert whatever fields you want.
>>
>> 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
>>
>> ______________________________________________
>> R-help at r-project.org mailing list
>> https://stat.ethz.ch/mailman/listinfo/r-help
>> PLEASE do read the posting guide
>> http://www.R-project.org/posting-guide.html
>> and provide commented, minimal, self-contained, reproducible code.
>
> ______________________________________________
> R-help at r-project.org mailing list
> https://stat.ethz.ch/mailman/listinfo/r-help
> PLEASE do read the posting guide http://www.R-project.org/posting-guide.html
> and provide commented, minimal, self-contained, reproducible code.
>
>
>



-- 
Jim Holtman
Data Munger Guru

What is the problem that you are trying to solve?
Tell me what you want to do, not how you want to do it.



More information about the R-help mailing list