bugGNU Octave - Bugs: bug #44703, 10X slowdown on Windows XP vs....

 
 

bug #44703: 10X slowdown on Windows XP vs. Linux

Submitted by:  Rik <rik5>
Submitted on:  Thu 02 Apr 2015 05:31:59 PM UTC  
 
Category: InterpreterSeverity: 3 - Normal
Priority: 5 - NormalItem Group: Performance
Status: InvalidAssigned to: None
Originator Name: Open/Closed: Closed
Release: devOperating System: Microsoft Windows

Add a New Comment(Rich Markup)
   

You are not logged in

Please log in, so followups can be emailed to you.

 

(Jump to the original submission Jump to the original submission)

Fri 10 Apr 2015 04:00:57 PM UTC, comment #9:

Okay, it's good to know that this is just an artifact of the virtual machine rather than an actual problem. Closing report.

Rik <rik5>
Project Administrator
Fri 10 Apr 2015 03:46:10 PM UTC, comment #8:

It seems that the Virtual Machine is the cause for
the time diferences.

I run 32 bit Octave on 64 bit Win7, and got:

I have Linux (Ubuntu) on this computer, installed as VM

Avinoam Kalma <avinoam>
Project Member
Mon 06 Apr 2015 09:08:02 AM UTC, comment #7:

One thing I'd be wary of is that you run XP in a virtual machine.
I'd expect loads of overhead there esp. for user I/O stuff like terminal interaction, mouse/keyboard, etc., that all has to be captured and translated by the virtual machine SW.

Philip Nienhuis <philipnienhuis>
Project Member
Mon 06 Apr 2015 12:43:18 AM UTC, comment #6:

I guess we just leave this alone until we have more data points. All of your testing seems correct and I can't explain why Windows is 3X faster for you, but 10X slower for me.

Rik <rik5>
Project Administrator
Sat 04 Apr 2015 09:37:06 PM UTC, comment #5:

I'm also surprised, if not flabbergasted.
Note that years ago, Octave on Linux also ran slower than on Windows and both were slower than OS/2; I think OS/2 was twice as fast as Linux (AFAIU OS/2 in its time had a superior threading model).
But yes 3 X slower is, well, ridiculous :-) - esp. as I ran the GUIs on Windows and the CLI on Linux to avoid workspace pane updates.

I've built the Windows versions with MXE & OpenBLAS (cross-build; --enable-windows-64); the Linux one (64-bit indexing) also with MXE (native build) and (IIRC) OpenBLAS, with the configure options outlined by JWE in a bug report from some months ago:

https://savannah.gnu.org/bugs/index.php?43319, see comment #13 there.

I also tried a "regular" Linux build with the 32-bit indexing libs supplied by Mageia, without OpenBLAS; that had about the same execution time as the 64-bit indexing Octave. So that may be a clue that OpenBLAS wasn't invoked on Linux.

I'm not very sure I've also specified the --enable-openblas option, but OpenBLAS was built and in the .tgz, I figure just symlinking libblas.so to libopenblas.so would suffice?

Just to be sure, in the Windows version I copied librefblas.dll to libblas.dll and tried again:

...so it seems OpenBLAS or refBLAS don't make much difference.
There seems to be a lot of overhead elsewhere in Octave.

FWIW, my desktop system:
Gigabyte Z87-HD3 mobo, 8 GB RAM
Core i5-4570 3.2GHz
500 GB SSD
Windows 7 Prof. 64-bit & Mageia-4 Linux 64-bit

Philip Nienhuis <philipnienhuis>
Project Member
Sat 04 Apr 2015 04:03:54 PM UTC, comment #4:

@Philip: It's strange to me that Linux is ~3X slower than Windows on the same hardware. Are they Windows and Linux versions compiled with the same options? Or was Windows from an executable installer and Linux from a compiler or distribution?

Rik <rik5>
Project Administrator
Sat 04 Apr 2015 12:24:17 PM UTC, comment #3:

I wouldn't care too much about Win XP.

FWIW, I see quite different results on my multiboot box (all OSes running on bare metal):

It was quite against my expectations to see 32-bit Octave being quite a bit faster than 64-bit Octave; when reading & processing large .mat files at work I often experience it differently.

I figured the slow results from the Linux side were probably due to having reference BLAS rather than OpenBLAS. So I ran it again with a older 64-indexing 3.9.0+ build (built using MXE) where I had a symlink from libblas.so-> libopenblas.so. Results:

Philip Nienhuis <philipnienhuis>
Project Member
Thu 02 Apr 2015 07:26:55 PM UTC, comment #2:

It's the same hardware. I run Linux on the bare metal and Windows XP as a virtual machine within Linux.

Information on csrss.exe is here (http://en.wikipedia.org/wiki/Client/Server_Runtime_Subsystem).

It appears that csrss is invoked whenever there are console operations. During for loops, Octave may be checking the console repeatedly for a 'Ctrl+C' character which is actually causing the crazy amount of activity I see.

This is another example which shows only 8-18% CPU usage for csrss.exe.

Rik <rik5>
Project Administrator
Thu 02 Apr 2015 06:13:03 PM UTC, comment #1:

Is that comparing like (or same) machines running windows and Linux, or virtual OS?

Not that it can be used to compare time, but running on my Win7 laptop, the BIST test takes 30 seconds, but I don't have any issue with csrss.exe running high CPU.

octave was running a little under 10% during the test.

Perhaps related however, each time I did the run, the virus scanner decided to run 20%, until I turned it off. It consistently did that each time I ran the test.

With virus scanner off, I got down to 22 seconds.

John Donoghue <lostbard>
Project Member
Thu 02 Apr 2015 05:31:59 PM UTC, original submission:

While debugging another issue I wrote a small script to run the BIST tests in linsolve.m 100 times. This script is attached as lintst.m

Running

as a quick benchmark I find dramatically slower behavior on Windows XP than Linux. At the same time that the Octave is running the code I see that the csrss.exe process is taking about 75% of the CPU. As soon as the code completes the csrss.exe process drops back to non-existent.

Results:

Rik <rik5>
Project Administrator

 

(Note: upload size limit is set to 16384 kB, after insertion of the required escape characters.)

Attach File(s):
   
   
Comment:
   

Attached Files
file #33517:  lintst.m added by rik5 (103B - text/x-objcsrc)

 

Depends on the following items: None found

Items that depend on this one: None found

 

Carbon-Copy List
  • -unavailable- added by avinoam (Posted a comment)
  • -unavailable- added by lostbard (Posted a comment)
  • -unavailable- added by rik5 (Submitted the item)
  •  

    Do you think this task is very important?
    If so, you can click here to add your encouragement to it.
    This task has 0 encouragements so far.

    Only project members can vote.

     

    Please enter the title of George Orwell's famous dystopian book (it's a date):

     

     

    Follow 3 latest changes.

    Date Changed By Updated Field Previous Value => Replaced By
    Fri 10 Apr 2015 04:00:57 PM UTCrik5StatusNone=>Invalid
      Open/ClosedOpen=>Closed
    Thu 02 Apr 2015 05:31:59 PM UTCrik5Attached File-=>Added lintst.m, #33517

    Back to the top


    Powered by Savane 3.1-cleanup1