On Mon, 29-Jun-2009 at 09:05AM +0200, Zeljko Vrba wrote: |> On Mon, Jun 29, 2009 at 06:56:55PM +1200, Patrick Connolly wrote: |> > On Mon, 29-Jun-2009 at 02:13AM -0400, milton ruser wrote: |> > |> > |> Really? |> > |> |> > |> In fact I have a quadcore. But how can I know if Linux are really |> > |> using only one core, and how can I setup it to use the 4cores? |> > |> > I use GKrellM (install with "aptitude install gkrellm" if you don't |> > have it already). It shows a trace of the % activity for each CPU |> > where it's very clear if only one is being used. I've never had |> > occasion to change such a setting, but someone more skilled in such |> > things could say how to make it use more than one. |> > |> How do you know that it is *R* that uses all 4 CPUs, and not other |> applications on the system? What does running "top" in the |> terminal say? If R uses more than one CPU, it's CPU usage will be |> > 100%.
There are undoubtedly more scientific ways, but if the machine is idling with both krells showing a very low number like 2% BEFORE running the R script, and then we see only one suddenly become 99 or 100%, it's a fairly safe bet that it was R that made the difference -- particularly if it drops back once the R code finishes. I think top adds the two usages together, so values over 100% would be possible. The numbers shown by GKrellM could be thought of as more sensible where you have the choice of composite, real or both. HTH -- ~.~.~.~.~.~.~.~.~.~.~.~.~.~.~.~.~.~.~.~.~.~.~.~.~.~.~.~.~.~.~.~.~.~.~.~. ___ Patrick Connolly {~._.~} Great minds discuss ideas _( Y )_ Average minds discuss events (:_~*~_:) Small minds discuss people (_)-(_) ..... Eleanor Roosevelt ~.~.~.~.~.~.~.~.~.~.~.~.~.~.~.~.~.~.~.~.~.~.~.~.~.~.~.~.~.~.~.~.~.~.~.~. ______________________________________________ R-help@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.