Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 9092921
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 16, 20262026-06-16T22:57:34+00:00 2026-06-16T22:57:34+00:00

We have a recent performance bench mark that I am trying to understand. We

  • 0

We have a recent performance bench mark that I am trying to understand. We have a large script that performance appears 50% slower on a Redhat Linux machine than a Windows 7 laptop where the specs are comparable. The linux machine is virtualized using kvm and has 4 cores assigned to it along with 16GB of memory. The script is not io intensive but has quite a few for loops. Mainly I am wondering if there are any R compile options that I can use to optimize or any kernel compiler options that might help to make this more comparable. Any pointers would be appreciated. I will try to get another machine and test it in using raw metal also for a better comparison.

Peformance comparisons

These are the configure flags that I am using to compile R on the linux machine. I have experimented quite a bit and this seems to cut 12 seconds off the execution time in the green for larger data sets. Essentially I went from 2.087 to 1.48 seconds with these options.

./configure CFLAGS="-O3 -g -std=gnu99" CXXFLAGS="-O3 -g" FFLAGS="-O2 -g" LDFLAGS="-Bdirect,--hash-stype=both,-Wl,-O1" --enable-R-shlib --without-x --with-cairo --with-libpng --with-jpeglib

Update 1

The script has not been optimized yet. Another group is actually working on the script and we have put in requests to use the apply function but not sure how this explains the disparity in the times.

The top of the profile looks like this. Most of these functions will later be optimized using the apply functions but right now it is bench marked apples to apples on both machines.

"eval.with.vis"                    8.66    100.00      0.12     1.39
"source"                           8.66    100.00      0.00     0.00
"["                                5.38     62.12      0.16     1.85
"GenerateQCC"                      5.30     61.20      0.00     0.00
"[.data.frame"                     5.20     60.05      2.40    27.71
"ZoneCalculation"                  5.12     59.12      0.02     0.23
"cbind"                            3.22     37.18      0.34     3.93
"[["                               2.26     26.10      0.38     4.39
"[[.data.frame"                    1.88     21.71      0.82     9.47

My first suspicion and I will be testing shortly and updating with my findings is that KVM linux virtualization is to blame. This script is very memory intensive and due to the large number of array operations and R being pass by copy ( which of course has to malloc ) this may be causing the problem. Since the VM does not have direct access to the memory controller and must share it with it’s other VM’s this could very likely cause the problem. I will be getting a raw machine later on today and will update with my findings.

Thank you all for the quick updates.

Update 2

We originally thought the cause of the performance problem was caused by hyper threading with a VM, but this turned out to be incorrect and performance was the same on a bare metal machine comparatively.

We later realized that the windows laptop is using a 32 bit version of R for computations. This led us to try the 64 bit version of R and the result was ~140% slower than 32 bit on the same exact same script. This leads me to the question of how is it possible that the 64 bit could be ~140% slower than the 32 bit version of R?

What we are seeing is that the 32

Windows 32 bit execution time 48 seconds
Windows 64 bit execution time 2.33 seconds.

Linux 64 bit execution time 2.15 seconds.
Linux 32 bit execution time < in progress > ( Built a 32 bit version on RHEL 6.3 x86_64 but did not see performance improvement am going to reload with 32 bit version of RHEL 6.3 )

I found this link but it only explains a 15-20% hit on some 64 bit machines.

http://www.hep.by/gnu/r-patched/r-admin/R-admin_51.html

Sorry I cannot legally post the script.

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-16T22:57:36+00:00Added an answer on June 16, 2026 at 10:57 pm

    The issue was resolved and it was caused by a non optimized BLAS library.

    This article was a great help. Using ATLAS was a great help.

    http://www.cybaea.net/Blogs/Data/Faster-R-through-better-BLAS.html

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

Recent events on the blogosphere have indicated that a possible performance problem with Scala
I have read two recent posts that discuss Depends and Imports Upcoming NAMESPACE, Depends,
I have an ASP.NET website project that until recent had all code in App_Code
I have a production performance issue that I'm stumped on. I'm hoping that someone
I have a table of recent web guest who have registered. One of the
After a recent submission I have gotten the following error: Invalid Signature - the
I have two sections next to eachother- one is for recent work, the other
Does anyone have any experiences from recent daily build of AnkhSVN? Please let me
In a recent project, I have to maintain some PHP code. I set up
Lets say you have a fragment of the page which displays the most recent

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.