sage's increasingly long startup time?

184 views
Skip to first unread message

William Stein

unread,
Oct 27, 2016, 3:09:14 PM10/27/16
to sage-devel
Does anybody else find this depressing?

⨯ time sage-7.4 -c pass
2.18user 0.99system 0:34.29elapsed 9%CPU (0avgtext+0avgdata 170712maxresident)k
285672inputs+8outputs (628major+49021minor)pagefaults 0swaps

35 seconds?

Yes, I know, doing it again is fast, since it can stat 100K files
using the cache quickly.

But seriously?

-- William


--
William (http://wstein.org)

Eric Gourgoulhon

unread,
Oct 27, 2016, 3:22:23 PM10/27/16
to sage-devel
Hi,

Which computer are you using? On my 5-years old laptop (Core i5-2410M + 4 GB memory), it takes "only" 22 seconds. Running a second takes 1.4 second.

Best regards,

Eric.


John Cremona

unread,
Oct 27, 2016, 3:22:56 PM10/27/16
to SAGE devel
On 27 October 2016 at 20:08, William Stein <wst...@gmail.com> wrote:
> Does anybody else find this depressing?
>
> ⨯ time sage-7.4 -c pass
> 2.18user 0.99system 0:34.29elapsed 9%CPU (0avgtext+0avgdata 170712maxresident)k
> 285672inputs+8outputs (628major+49021minor)pagefaults 0swaps
>
> 35 seconds?
>
> Yes, I know, doing it again is fast, since it can stat 100K files
> using the cache quickly.
>
> But seriously?

That is odd. I just tried "time sage -c pass" on a machine I rebooted
today which had not yet run Sage since then, and which is 6 years old,
and I got

real 0m2.124s
user 0m1.960s
sys 0m1.028s

On another also recently rebooted, I have been washing some dirty cows) I get

real 0m2.458s
user 0m7.408s
sys 0m0.426s

John

>
> -- William
>
>
> --
> William (http://wstein.org)
>
> --
> You received this message because you are subscribed to the Google Groups "sage-devel" group.
> To unsubscribe from this group and stop receiving emails from it, send an email to sage-devel+...@googlegroups.com.
> To post to this group, send email to sage-...@googlegroups.com.
> Visit this group at https://groups.google.com/group/sage-devel.
> For more options, visit https://groups.google.com/d/optout.

Eric Gourgoulhon

unread,
Oct 27, 2016, 3:23:38 PM10/27/16
to sage-devel


Le jeudi 27 octobre 2016 21:22:23 UTC+2, Eric Gourgoulhon a écrit :
Hi,

Which computer are you using? On my 5-years old laptop (Core i5-2410M + 4 GB memory), it takes "only" 22 seconds. Running a second time takes 1.4 second.

Best regards,

Eric.


William Stein

unread,
Oct 27, 2016, 3:32:46 PM10/27/16
to sage-devel
This is more what concerns me:

~$ strace sage-7.4 -c pass 2>a
~$ wc -l a
35137
~$ grep stat a |wc -l
8712
~$ grep open a |wc -l
10289
~$ grep read a |wc -l
5645

etc.

I was wrong -- its "only" 8712 stats.

Anyway, I probably just need to tweak os caching parameters or the
disk, since of course with everything in cache the startup time is
less than 2s as others report.

William
> --
> You received this message because you are subscribed to the Google Groups
> "sage-devel" group.
> To unsubscribe from this group and stop receiving emails from it, send an
> email to sage-devel+...@googlegroups.com.
> To post to this group, send email to sage-...@googlegroups.com.
> Visit this group at https://groups.google.com/group/sage-devel.
> For more options, visit https://groups.google.com/d/optout.



--
William (http://wstein.org)

Jeroen Demeyer

unread,
Oct 27, 2016, 3:53:41 PM10/27/16
to sage-...@googlegroups.com
Well, Python isn't exactly efficient when it comes to system calls...

Erik Bray

unread,
Nov 7, 2016, 5:19:51 AM11/7/16
to sage-devel
On Thu, Oct 27, 2016 at 9:53 PM, Jeroen Demeyer <jdem...@cage.ugent.be> wrote:
> Well, Python isn't exactly efficient when it comes to system calls...

Python 3 is much better. I look forward to Sage switching :)

Frédéric Chapoton

unread,
Nov 7, 2016, 3:11:55 PM11/7/16
to sage-devel
If nobody else than me cares about *working* on the transition to py3, this is probably not going to happen anytime soon.

Frederic

Erik Bray

unread,
Nov 8, 2016, 6:32:07 AM11/8/16
to sage-devel
On Mon, Nov 7, 2016 at 9:11 PM, Frédéric Chapoton <fchap...@gmail.com> wrote:
> If nobody else than me cares about *working* on the transition to py3, this
> is probably not going to happen anytime soon.

I very much care and I think it's critical for Sage's long-term
viability. It's not part of my personal directive right now under
ODK, but it probably should be--I also have a lot of experience with
Python 3 porting of non-trivial code. I think once the Windows stuff
is further along it's something I can help with more (and actually the
Windows work is quite far along--the biggest blocker now is just
getting the Windows buildbot running).

> Le lundi 7 novembre 2016 11:19:51 UTC+1, Erik Bray a écrit :
>>
>> On Thu, Oct 27, 2016 at 9:53 PM, Jeroen Demeyer <jdem...@cage.ugent.be>
>> wrote:
>> > Well, Python isn't exactly efficient when it comes to system calls...
>>
>> Python 3 is much better. I look forward to Sage switching :)
>
Reply all
Reply to author
Forward
0 new messages