bugGNU Octave - Bugs: bug #61365, dlmwrite performance regression...

 
 

bug #61365: dlmwrite performance regression (via network) between Octave version 4 and 6

Submitted by:  None
Submitted on:  Thu 21 Oct 2021 02:09:25 PM UTC  
 
Category:  Performance Severity:  3 - Normal
Priority:  5 - Normal Item Group:  Regression
Status:  Need Info Assigned to:  None
Originator Name:  Luigi Molea Originator Email:  -email is unavailable-
Open/Closed:  Open Release:  6.3.0
Operating 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)

Wed 27 Oct 2021 06:51:43 AM UTC, comment #11: 

The differences between comment #7 and #9 are due to different PC.
In comment #9 I run the test on the same PC.

I tried to change the file encoding, but I have the same results from the speed test.

L M <gigi_m>
Tue 26 Oct 2021 04:11:48 PM UTC, comment #10: 

Thanks for the additional data points.

In comment #7, you showed times that were slightly different. In particular writing to the server with version 4.2.1 seems to be about an order of magnitude faster in comment #9 than in comment #7 (while the other timings don't seem to differ as much).
Is one of those a typo?

Trying to track down which change might have caused that difference, could you please try to bisect which version of Octave was the first with the noticeable performance difference?

Just a wild guess (and I don't know why that would differently affect network shares vs. local files):
IIRC starting with Octave 6, writing to and reading from `fopen`-ed files translates between UTF-8 (Octave's internal encoding) and the system's locale encoding (or more precisely, whatever is set with `__mfile_encoding__`).
Converting digits between ISO encodings (I'm guessing you're on a Latin-1 system) and UTF-8 should be a no-op and I guess it would be fast. But just to be sure, could you please try and change the .m-file encoding to UTF-8 (only works in newer Octave versions) and repeat the test? That would skip the conversion step entirely.
You could change that for the current session with `__mfile_encoding__("utf-8")` or more permanently in the preferences window.

Markus Mützel <mmuetzel>
Project Member
Tue 26 Oct 2021 03:22:39 PM UTC, comment #9: 

Hi @mmuetzel
I carried out the speed tests on the same PC and the results are theese:
- Octave 4.2.1, local path  ->  0.02 seconds
- Octace 6.3.0, local path ->   0.07 seconds
- Octave 4.2.1, server path  ->  0.03 seconds
- Octave 6.3.0, server path ->  6.3 seconds

The "dlmwrite" problem affects both portable and installed versions.

L M <gigi_m>
Tue 26 Oct 2021 07:42:26 AM UTC, comment #8: 

@gigi_m: To find out whether this is a general slow down on dlmwrite or it applies only to network shares, could you please time writing the same output to a local path with Octave 6 and Octave 4?

Which version of Octave 4.x.y specifically did you use for these tests?

Markus Mützel <mmuetzel>
Project Member
Mon 25 Oct 2021 08:41:32 AM UTC, comment #7: 

I have the same output:
which fprintf
'fprintf' is a built-in function from the file libinterp/corefcn/file-io.cc

I tried to "tic/toc" the dlmwrite function (in which fprintf is contained) in varying the Octave version and the path where I want to save my *.txt files. I have this responses:
- Octave 6: save txt to a local path -> 0.07 seconds
- Octave 6: save txt to a server path -> 5 seconds
- Octave 4: save txt to a server path -> 0.2 seconds

Obviously it seems that working on servers leads to a slow down of performances.

Thanks a lot!

L M <gigi_m>
Mon 25 Oct 2021 07:11:36 AM UTC, comment #6: 

Thanks again for the further problem analysis and your great enthusiasm to help us narrowing down the issue.

Regarding local files (not stored on the server).  Is there a noticalbe performance regession too?

Your last sentece makes me a little suspicious.  What is the output for

>> which fprintf
'fprintf' is a built-in function from the file libinterp/corefcn/file-io.cc

Kai Torben Ohlhus <siko1056>
Project Member
Mon 25 Oct 2021 07:06:04 AM UTC, comment #5: 

Hi,
I tried to dectivate the Antivirus and to put an option in the Firewall, but the result is the same.
I also tried to update BIOS and network adapter.

Octave 4 is faster than Octave 6 when I work on server, but it doesn't work correctly with Windows 10.
I think that the problem is in fprintf function contained in Octave 6 folder.

L M <gigi_m>
Sun 24 Oct 2021 12:27:52 PM UTC, comment #4: 

@gigi_m: Thank you for the further problem analysis 🙂👍

Do you find a performace regression for a local files as well?  Or does this regression only affect network files?

Is Octave 4 faster on your new MS Windows 10 machine/setup?

How do you access those network files?  Is a firewall / "AntiVirus" software installed and probably slows down the server communication?

Kai Torben Ohlhus <siko1056>
Project Member
Fri 22 Oct 2021 02:24:46 PM UTC, comment #3: 

Today I analyzed better the problem and it is not related do the plot function. I'm sorry if I gave wrong information yesterday.

I found that the dlmwrite function is slower than Octave 4, specially when I work with file on server (to give an idea: if Octave 4 takes 1 second to write a matrix on txt file, Octave 6 takes 20 seconds).
I believe that the problem lies within fprintf function.

I am trying to look for updates for this function; otherwise, I could try to replace the new version with the older one.

L M <gigi_m>
Fri 22 Oct 2021 02:12:42 PM UTC, comment #2: 

comment #1:

> Not sure if this is causing the performance difference for you. But might be worth a try:
>
> We had reports from users in the past that had issues with plotting. It looked like these issues were caused by some OpenGL drivers.
> To prevent these issues from happening, we started bundling a software OpenGL renderer years ago. That might have been after Octave 4. But I don't recall the exact timeline now.
>
> If your hardware drivers work without issues, you could rename the following file and Octave should be picking up the (possibly hardware-accelerated) OpenGL driver installed on your system:
> "C:\Program Files\GNU Octave\Octave-6.3.0\mingw64\bin\opengl32.dll"
>
> The path to that file might be different depending on where you installed Octave.
>
> Does that speed up plotting again?

L M <gigi_m>
Thu 21 Oct 2021 02:23:36 PM UTC, comment #1: 

Not sure if this is causing the performance difference for you. But might be worth a try:

We had reports from users in the past that had issues with plotting. It looked like these issues were caused by some OpenGL drivers.
To prevent these issues from happening, we started bundling a software OpenGL renderer years ago. That might have been after Octave 4. But I don't recall the exact timeline now.

If your hardware drivers work without issues, you could rename the following file and Octave should be picking up the (possibly hardware-accelerated) OpenGL driver installed on your system:
"C:\Program Files\GNU Octave\Octave-6.3.0\mingw64\bin\opengl32.dll"

The path to that file might be different depending on where you installed Octave.

Does that speed up plotting again?

Markus Mützel <mmuetzel>
Project Member
Thu 21 Oct 2021 02:09:25 PM UTC, original submission:  

Hello,

my name is Luigi Molea.
As suggested, I replaced Octave 4 with Octave 6 when I updated Windows 7 to Windows 10.
However, I am performance issues in using the software.
In particular, scripts in Octave 6 are slower than Octave 4, specially when using the "plot" function.

Is there any way to speed up Octave 6?

Thanks,

Luigi

Anonymous

 

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

Attach Files:
   
   
Comment:
   

No files currently attached

 

Depends on the following items: None found

Items that depend on this one: None found

 

Carbon-Copy List
  • -email is unavailable- added by siko1056 (Posted a comment)
  • -email is unavailable- added by gigi_m (Posted a comment)
  • -email is unavailable- added by mmuetzel (Posted a comment)
  • -email is unavailable- added by None (Submitted the item)
  •  

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

    Only project members can vote.

     

     

     

    Follow 2 latest changes.

    Date Changed by Updated Field Previous Value => Replaced by
    2021-10-24 siko1056 SummaryOctave 6 very slow with respect to Octave 4 => dlmwrite performance regression (via network) between Octave version 4 and 6
    2021-10-21 mmuetzel StatusNone => Need Info

    Back to the top


    Powered by Savane 3.7