An embedded and charset-unspecified text was scrubbed... Name: not available URL: <https://stat.ethz.ch/pipermail/r-help/attachments/20111107/739458aa/attachment.pl>
How much time a process need?
10 messages · Alaios, Joshua Wiley, R. Michael Weylandt +3 more
On 07.11.2011 11:09, Alaios wrote:
Dear all, I have finished a large function that takes around 1 day to finish. I was using system.time(callmyfunction()) to measure how much time it needed to finish, my problem is that I do not know how to interpret their numbers. I was looking to convert these results to something more readably like. "This function took 1 Day 2 hours and 35 minutes to complete." How I can convert the system.time output to something like that?
system.time() responds in seconds, hence you can apply simple arithmetic to get days, hours and minutes. Uwe Ligges
B.R Alex [[alternative HTML version deleted]]
______________________________________________ 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.
An embedded and charset-unspecified text was scrubbed... Name: not available URL: <https://stat.ethz.ch/pipermail/r-help/attachments/20111107/5d00fdd1/attachment.pl>
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. Josh
________________________________ From: Uwe Ligges <ligges at statistik.tu-dortmund.de> Cc: "R-help at r-project.org" <R-help at r-project.org> Sent: Monday, November 7, 2011 1:27 PM Subject: Re: [R] How much time a process need? On 07.11.2011 11:09, Alaios wrote: Dear all, I have finished a large function that takes around 1 day to finish. I was using system.time(callmyfunction()) to measure how much time it needed to finish, my problem is that I do not know how to interpret their numbers. I was looking to convert these results to something more readably like. "This function took 1 Day 2 hours and 35 minutes to complete." How I can convert the system.time output to something like that? system.time() responds in seconds, hence you can apply simple arithmetic to get days, hours and minutes. Uwe Ligges B.R Alex ??? [[alternative HTML version deleted]] ______________________________________________ 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. ? ? ? ?[[alternative HTML version deleted]] ______________________________________________ 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.
Joshua Wiley Ph.D. Student, Health Psychology Programmer Analyst II, ATS Statistical Consulting Group University of California, Los Angeles https://joshuawiley.com/
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 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. Josh
________________________________ From: Uwe Ligges <ligges at statistik.tu-dortmund.de> Cc: "R-help at r-project.org" <R-help at r-project.org> Sent: Monday, November 7, 2011 1:27 PM Subject: Re: [R] How much time a process need? On 07.11.2011 11:09, Alaios wrote: Dear all, I have finished a large function that takes around 1 day to finish. I was using system.time(callmyfunction()) to measure how much time it needed to finish, my problem is that I do not know how to interpret their numbers. I was looking to convert these results to something more readably like. "This function took 1 Day 2 hours and 35 minutes to complete." How I can convert the system.time output to something like that? system.time() responds in seconds, hence you can apply simple arithmetic to get days, hours and minutes. Uwe Ligges B.R Alex ??? [[alternative HTML version deleted]] ______________________________________________ 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. ? ? ? ?[[alternative HTML version deleted]] ______________________________________________ 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.
-- Joshua Wiley Ph.D. Student, Health Psychology Programmer Analyst II, ATS Statistical Consulting Group University of California, Los Angeles https://joshuawiley.com/
______________________________________________ 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.
On 07.11.2011 14:32, Alaios 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?
Yes, the elapsed time in seconds. Uwe Ligges
________________________________
From: Uwe Ligges<ligges at statistik.tu-dortmund.de>
To: Alaios<alaios at yahoo.com>
Cc: "R-help at r-project.org"<R-help at r-project.org>
Sent: Monday, November 7, 2011 1:27 PM
Subject: Re: [R] How much time a process need?
On 07.11.2011 11:09, Alaios wrote:
Dear all,
I have finished a large function that takes around 1 day to finish.
I was using system.time(callmyfunction()) to measure how much time it needed to finish, my problem is that I do not know how to interpret their numbers.
I was looking to convert these results to something more readably like.
"This function took 1 Day 2 hours and 35 minutes to complete."
How I can convert the system.time output to something like that?
system.time() responds in seconds, hence you can apply simple arithmetic
to get days, hours and minutes.
Uwe Ligges
B.R
Alex
[[alternative HTML version deleted]]
______________________________________________
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.
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
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.
An embedded and charset-unspecified text was scrubbed... Name: not available URL: <https://stat.ethz.ch/pipermail/r-help/attachments/20111108/c112adb1/attachment.pl>
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.