Hi, I have R version 2.0.1 on my PowerBook G4 1.5Ghz, 512RAM, running OS X 10.3.9. I have noticed that the "official" R GUI runs considerably slower than R in the terminal and also JGR. Whilst the differences in speed are unimportant for simple parametric stats, it becomes a bit of a pig when doing non-parametric stats e.g. neural nets, feature selection algorithms. In all my experiments I have set my CPU speed to "maximum" in system preferences. I have also looked at the CPU usage for each implementation: on average R in the terminal and JGR manage to get 98% of CPU usage, compared to only around 75% for the R GUI. I guess my questions are: 1) Why the difference in speed when its on the same machine? 2) Is there any way of tweaking R GUI to make it run faster, a la R in the terminal? Any help would be appreciated. Best regards, Sam.
R GUI slow on mac?
5 messages · Samuel E. Kemp, Sean Davis, Thomas Lumley +2 more
On Apr 20, 2005, at 10:40 AM, Samuel E. Kemp wrote:
Hi, I have R version 2.0.1 on my PowerBook G4 1.5Ghz, 512RAM, running OS X 10.3.9. I have noticed that the "official" R GUI runs considerably slower than R in the terminal and also JGR. Whilst the differences in speed are unimportant for simple parametric stats, it becomes a bit of a pig when doing non-parametric stats e.g. neural nets, feature selection algorithms. In all my experiments I have set my CPU speed to "maximum" in system preferences. I have also looked at the CPU usage for each implementation: on average R in the terminal and JGR manage to get 98% of CPU usage, compared to only around 75% for the R GUI. I guess my questions are: 1) Why the difference in speed when its on the same machine?
Just a guess, but are you running into memory issues and swapping? I don't know how much more memory the GUI version uses over the command-line version--I would have thought not that much.
2) Is there any way of tweaking R GUI to make it run faster, a la R in the terminal? Any help would be appreciated. Best regards, Sam.
_______________________________________________ R-SIG-Mac mailing list R-SIG-Mac@stat.math.ethz.ch https://stat.ethz.ch/mailman/listinfo/r-sig-mac
I think the difference in speed is related to the interrupt processing calls. It was most dramatic in the beta (or binomial?) distribution code, but that got rewritten to do fewer calls. Periodic checking for events is necessary, but the R Gui seems to do a lot more work when it happens. -thomas
On Wed, 20 Apr 2005, Sean Davis wrote:
On Apr 20, 2005, at 10:40 AM, Samuel E. Kemp wrote:
Hi, I have R version 2.0.1 on my PowerBook G4 1.5Ghz, 512RAM, running OS X 10.3.9. I have noticed that the "official" R GUI runs considerably slower than R in the terminal and also JGR. Whilst the differences in speed are unimportant for simple parametric stats, it becomes a bit of a pig when doing non-parametric stats e.g. neural nets, feature selection algorithms. In all my experiments I have set my CPU speed to "maximum" in system preferences. I have also looked at the CPU usage for each implementation: on average R in the terminal and JGR manage to get 98% of CPU usage, compared to only around 75% for the R GUI. I guess my questions are: 1) Why the difference in speed when its on the same machine?
Just a guess, but are you running into memory issues and swapping? I don't know how much more memory the GUI version uses over the command-line version--I would have thought not that much.
2) Is there any way of tweaking R GUI to make it run faster, a la R in the terminal? Any help would be appreciated. Best regards, Sam.
_______________________________________________ R-SIG-Mac mailing list R-SIG-Mac@stat.math.ethz.ch https://stat.ethz.ch/mailman/listinfo/r-sig-mac
_______________________________________________ R-SIG-Mac mailing list R-SIG-Mac@stat.math.ethz.ch https://stat.ethz.ch/mailman/listinfo/r-sig-mac
Thomas Lumley Assoc. Professor, Biostatistics tlumley@u.washington.edu University of Washington, Seattle
On 20/apr/05, at 16:40, Samuel E. Kemp wrote:
Hi, I have R version 2.0.1 on my PowerBook G4 1.5Ghz, 512RAM, running OS X 10.3.9. I have noticed that the "official" R GUI runs considerably slower than R in the terminal and also JGR. Whilst the differences in speed are unimportant for simple parametric stats, it becomes a bit of a pig when doing non-parametric stats e.g. neural nets, feature selection algorithms. In all my experiments I have set my CPU speed to "maximum" in system preferences. I have also looked at the CPU usage for each implementation: on average R in the terminal and JGR manage to get 98% of CPU usage, compared to only around 75% for the R GUI. I guess my questions are: 1) Why the difference in speed when its on the same machine?
R.app is a GUI app (embedding R) and not just a wrapper around a terminal command. Which means that R.app calls R for computation, but during R computation some time is spent to handle user events back in R.app. It's a real problem, we can't do anything in this direction until we change the R internal event loop (you can search r-devel maling list).
2) Is there any way of tweaking R GUI to make it run faster, a la R in the terminal?
no The best thing to do is to use the cmd line version in batch mode, i.e. R CMD BATCH --vanilla myscript.R This is what I actually do when I don't need interaction on unix as well (which is the case of very long computational tasks) stefano
Any help would be appreciated. Best regards, Sam.
_______________________________________________ R-SIG-Mac mailing list R-SIG-Mac@stat.math.ethz.ch https://stat.ethz.ch/mailman/listinfo/r-sig-mac
On Apr 20, 2005, at 10:08 AM, Sean Davis wrote:
On Apr 20, 2005, at 10:40 AM, Samuel E. Kemp wrote:
I have R version 2.0.1 on my PowerBook G4 1.5Ghz, 512RAM, running OS X 10.3.9. I have noticed that the "official" R GUI runs considerably slower than R in the terminal and also JGR. Whilst the differences in speed are unimportant for simple parametric stats, it becomes a bit of a pig when doing non-parametric stats e.g. neural nets, feature selection algorithms.
If I remember correctly there was an issue in the internals of pbinom where the R_ProcessEvents was called quite often during long iterations for extreme p and R_ProcessEvents is not a cheap operation in the way R GUI implements it (it should be in the archives). This was fixed in R 2.1 so please be patient just a few more days until we release R 2.1 binaries and R GUI 1.10.
Just a guess, but are you running into memory issues and swapping? I don't know how much more memory the GUI version uses over the command-line version--I would have thought not that much.
Swapping issue would be really surprising - JGR uses Java and it definitely uses more memory than the Cocoa GUI ;). JGR uses threads, so it doesn't have to rely on R_ProcessEvents - that may be the reason why it doesn't affect the speed as much as R GUI does. Cheers, Simon