R Performance Differential (Solaris vs Windows)

I noticed an interesting problem. If I run the following code in R 2.12.0 (32-bit) on a Windows 3.00 GHz Core 2 Duo CPU with 2 GB of RAM, it works in less than one second. If I ran it on unix-box with sparc-sun-solaris2.10 (also 32-bit, although the Unix box can work 64-bit), it takes 84 seconds. The processing speed of the Unix block is 2.5 GHz. If I run the top while the code is running, I noticed that my R process takes up to ~ 3.2% of the available processor states, even if more is available. Could this be part of the problem? I read the installation instructions, but nothing jumped at me as an obvious solution to my problem. Is the unix operating system a limitation of available resources while there are no windows? Or, is there a preferred way to compile R from a source that has not been executed? I apologize if I did not give enough information to answer this problem, this is not my area of ​​knowledge.

t0 <- proc.time()[[3]] x <- rnorm(10000) for(i in 1:10000){ sd(x) } print(proc.time()[[3]]-t0) 
+4
source share
1 answer

Processors, such as T1 or T2, have several cores, and each core has several chains (hardware-level context switching). If you can run a multi-threaded application, you will get more bandwidth. A typical intended use case would be a Java-based web server, such as processing. 20-40 compounds at a time.

The disadvantage of this type of processor is that the single-threaded performance of these SPARC chips is rather low. It looks like > Oracle is aware of the problem; current development on the T4 focuses on improving single-threaded speed.

The T1 processor provides 32 logical processors in the operating system. If this was your case, and the displayed value was a percentage of the total processing power, 1/32 ~ = 3.125%, which is close to what you saw.

To compress all the performance from the T1 processor, you need to make R use several processors, for example, through a multi-core package .

+1
source

All Articles