bugGNU Octave - Bugs: bug #46954, long initialization time of octave

 
 

bug #46954: long initialization time of octave

Submitter:  Peter <yangbaxter>
Submitted:  Sat 23 Jan 2016 11:26:31 AM UTC
   
 
Category:  None Severity:  3 - Normal
Priority:  5 - Normal Item Group:  Performance
Status:  Fixed Assigned to:  None
Originator Name:  Open/Closed:  * Closed
Release:  * 3.8.1 Operating System:  * GNU/Linux
Fixed Release:  None Planned Release:  None
* Mandatory Fields

Add a New Comment Rich Markup
   

Sat 23 Jan 2016 09:16:08 PM UTC, comment #3: 

Good to know it has been fixed.  Closing report.

Rik <rik5>
Group administrator
Sat 23 Jan 2016 04:54:09 PM UTC, comment #2: 

Dear Rik,


time octave Stop.m

real    0m6.053s
user    0m5.617s
sys     0m0.116s


time octave -f Stop.m


real    0m0.090s
user    0m0.072s
sys     0m0.016s

Thanks for the hint using "-f".

I found  ppa:octave/stable leading to v. 4.0.0.

Indeed, there the error is gone, now I get 0.22s real time,
that's perfect. Strace now gives a pretty short output,
the futexes seem to be replaced by rt_sigaction.

In summary, the problem is solved in 4.0.0.

Thanks for your help and I apologize for any inconvenience,
Peter


Peter <yangbaxter>
Sat 23 Jan 2016 03:58:35 PM UTC, comment #1: 

First, version 3.8.1 is ancient and no longer supported.  Unless you can replicate this on the current stable version (4.0.0) there's not much to be done.

Second, try a simpler test case.  Create a file called "stop.m" with the single command


exit


and then run


time octave stop.m


For reference, this took 0.6 seconds of wall time on my computer.

0.392u 0.316s 0:00.60 116.6%    0+0k 0+40io 0pf+0w


Also, try bypassing any initialization files you may have by running with the '-'f switch.


time octave -f stop.m
0.332u 0.268s 0:00.44 134.0%    0+0k 0+48io 0pf+0w


This saved about 25% in my case.

Rik <rik5>
Group administrator
Sat 23 Jan 2016 11:26:31 AM UTC, original submission:  

Dear All,

I suffering a long initialization time of octave,
it's only about 5s to 6s but it's annoying if you use
octave in batch scripts calling it hundreds of times.


$ time octave -V <<EOF
quit
EOF
GNU Octave, version 3.8.1
Copyright (C) 2014 John W. Eaton and others.
This is free software; see the source code for copying conditions.
There is ABSOLUTELY NO WARRANTY; not even for MERCHANTABILITY or
FITNESS FOR A PARTICULAR PURPOSE.  For details, type 'warranty'.

Octave was configured for "x86_64-pc-linux-gnu".

Additional information about Octave is available at http://www.octave.org.

Please contribute if you find this software useful.
For more information, visit http://www.octave.org/get-involved.html

Read http://www.octave.org/bugs.html to learn how to submit bug reports.
For information about changes from previous versions, type 'news'.

executing commands from /usr/share/octave/site/m/startup/octaverc ... done.
executing commands from /usr/share/octave/3.8.1/m/startup/octaverc ... done.



real    0m5.585s
user    0m5.261s
sys     0m0.083s


It tried to investigate this using strace and realized, that
octave is looking at lots of java related files:


 strace -f octave <<EOF 2>&1 | grep "/usr/share/java/" | wc
quit
EOF

   6151   49102  640816


However, the real delay is seems to come from time outs of futex requests:


strace -f octave -V <<EOF 2>&1 | grep "futex" | grep "ETIMEDOUT" | wc
 quit
EOF

    204    2462   16262


typically looking like


[pid  5950] futex(0x7f8304085b28, FUTEX_WAKE_PRIVATE, 1) = 0
[pid  5950] futex(0x7f8304085854, FUTEX_WAIT_PRIVATE, 1, NULL <unfinished ...>
[pid  5939] futex(0x7f8304085854, FUTEX_WAKE_OP_PRIVATE, 1, 1, 0x7f8304085850, {FUTEX_OP_SET, 0, FUTEX_OP_CMP_GT, 1} <unfinished ...>
[pid  5950] <... futex resumed> )       = 0
[pid  5939] <... futex resumed> )       = 1
[pid  5950] futex(0x7f8304085828, FUTEX_WAIT_PRIVATE, 2, NULL <unfinished ...>
[pid  5939] futex(0x7f8304085828, FUTEX_WAKE_PRIVATE, 1 <unfinished ...>


I didn't attached the complete strace output, as it's 2.4 MB long.

I'm runnin kubuntu:
lsb_release -a
LSB Version:    core-2.0-amd64:core-2.0-noarch:core-3.0-amd64:core-3.0-noarch:core-3.1-amd64:core-3.1-noarch:core-3.2-amd64:core-3.2-noarch:core-4.0-amd64:core-4.0-noarch:core-4.1-amd64:core-4.1-noarch:security-4.0-amd64:security-4.0-noarch:security-4.1-amd64:security-4.1-noarch
Distributor ID: Ubuntu
Description:    Ubuntu 14.04.3 LTS
Release:        14.04
Codename:       trusty


Any help would be highly appreciated,
best regards,
Peter

Peter <yangbaxter>

 

(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 rik5 (Posted a comment)
  • -email is unavailable- added by yangbaxter (Submitted the item)
  •  

    There are 0 votes so far. Votes easily highlight which items people would like to see resolved in priority, independently of the priority of the item set by tracker managers.

    Only group members can vote.

     

    Follow 2 latest changes.

    Date Changed by Updated Field Previous Value => Replaced by
    2016-01-23 rik5 StatusNone Fixed
        Open/ClosedOpen Closed

    Back to the top

    Powered by Savane 3.13-02a9.
    Corresponding source code