Opened 13 years ago

Closed 8 years ago

#2695 closed enhancement (wontfix)

ensure that we have sufficient amounts of RAM to build Sage

Reported by: mabshoff Owned by: mabshoff
Priority: major Milestone: sage-duplicate/invalid/wontfix
Component: build Keywords:
Cc: Merged in:
Authors: Reviewers: Jeroen Demeyer
Report Upstream: N/A Work issues:
Branch: Commit:
Dependencies: Stopgaps:

Status badges

Description

[06:27] <mabshoff> wstein: toothpaste's problem is RAM, not [only] disk space.
[06:27] <wstein> RAM. Wow.
[06:27] <mabshoff> gcc isn't very efficient.
[06:27] <wstein> his problem might be lack of a toothbrush.
[06:27] <mabshoff> And it fails in eclib, so linbox_wrap will be worst.
[06:28] <wstein> Wow, I see.
[06:28] <wstein> Dang C++ templates.
[06:28] <mabshoff> RTFL :)
[06:28] <wstein> what does rtfl stand for?
[06:28] <wstein> read the frickin' L?
[06:28] <mabshoff> read the fine log ;) [edited :)]
[06:28] <wstein> ahh.
[06:28] <wstein> good point.
[06:28] <mabshoff> That was a new failure.
[06:29] <wstein> Maybe we should check for at least 1GB ram right at the beginning
[06:29] <mabshoff> I guess the hosted VMs in his case have a rather small, hardcoded limit.
[06:29] <wstein> of the build, and if the user has less, give an error?
[06:29] <mabshoff> probably, but 700 MB seems enough.
[06:29] <wstein> OK, we could check for that.
[06:29] <wstein> And test that it works using ulimit.
[06:29] <wstein> That's the sort of thing autohell never does...
[06:32] <mabshoff> I am not sure if ulimit tests if you have that much memory available.
[06:33] <mabshoff> It just limits the max allocatable amount.
[06:33] <wstein> We could just write a small C program that malloc's 700MB.
[06:33] <wstein> if it fails, then sage doesn't build further.
[06:33] <mabshoff> Yeah. 
[06:34] <wstein> If this actually sounds like a good idea to you, paste this log in a trac ticket.
[06:34] <mabshoff> :)
[06:34] <wstein> If it doesn't, just ignore it.  I leave it up to your taste to decide.
[06:34] <mabshoff> printf("You cheapskate, buy your computer more RAM!");
[06:34] <mabshoff> :)
[06:35] <wstein> :-)

Change History (15)

comment:1 Changed 13 years ago by mabshoff

  • Status changed from new to assigned

comment:2 Changed 13 years ago by dfdeshom

FYI, I have 700MB of Ram and I'm able to build Sage fine (as of 2.10.2, I think). So... aim lower :)

comment:3 follow-up: Changed 13 years ago by jbmohler

I have 512 mb in my laptop and 2.10.x built/upgraded perfectly fine and I'm currently 'sage -upgrade'ing to 2.11 and I got past linbox_wrap. Only 100kb of swap is currently showing as used.

comment:4 in reply to: ↑ 3 Changed 13 years ago by mabshoff

Replying to jbmohler:

I have 512 mb in my laptop and 2.10.x built/upgraded perfectly fine and I'm currently 'sage -upgrade'ing to 2.11 and I got past linbox_wrap. Only 100kb of swap is currently showing as used.

Hi Joel,

the amount of RAM required for linbox_wrap does depend on the gcc released. I have seen 700 MB, but even 350MB is an unreasonable amount of memory to compile that bit of code. To resolve this ticket we should check the amount of memory available and emit a warning if we consider the amount too low. It might be 0.5GB for now.

Cheers,

Michael

comment:5 Changed 13 years ago by AlexGhitza

  • Type changed from defect to enhancement

comment:6 follow-ups: Changed 8 years ago by leif

  • Report Upstream set to N/A

FWIW, with enough (and fast :) ) swap space, Sage 5.x (still) builds on 32-bit machines with 512 MB RAM (and Gnome or some other GUI running).


Another issue is that meanwhile a few [long] doctests are really poor, in eating up nearly 2x 2 GB (Sage + gp). Others just allocate that much, without actually using it (such that they'll fail with ulimit -v for no real reason).

768 MB (including a GUI) used to be sufficient to (build Sage and) run all long doctests without any swapping a while ago.

comment:7 in reply to: ↑ 6 ; follow-up: Changed 8 years ago by jdemeyer

Replying to leif:

768 MB (including a GUI) used to be sufficient to (build Sage and) run all long doctests without any swapping a while ago.

for large values of "a while" I guess...

comment:8 in reply to: ↑ 7 ; follow-up: Changed 8 years ago by leif

Replying to jdemeyer:

Replying to leif:

768 MB (including a GUI) used to be sufficient to (build Sage and) run all long doctests without any swapping a while ago.

for large values of "a while" I guess...

Nope; I actually wanted to add "not that long ago"... Mid or late 2011 IIRC (last time I recall having tested that; i.e., probably even past that time).

comment:9 Changed 8 years ago by leif

P.S.: W.r.t. the doctests, the "winners" in memory consumption used to be those in schemes/elliptic_curves/, with definitely less than 400 MB (300-350 I think).

comment:10 in reply to: ↑ 8 ; follow-up: Changed 8 years ago by jdemeyer

Replying to leif:

Nope; I actually wanted to add "not that long ago"... Mid or late 2011 IIRC (last time I recall having tested that; i.e., probably even past that time).

I don't believe you, the Heegner tests exist longer than that and always required around 2GB of memory.

comment:11 in reply to: ↑ 10 Changed 8 years ago by leif

Replying to jdemeyer:

Replying to leif:

Nope; I actually wanted to add "not that long ago"... Mid or late 2011 IIRC (last time I recall having tested that; i.e., probably even past that time).

I don't believe you, the Heegner tests exist longer than that and always required around 2GB of memory.

I'm especially sure about the tests in schemes/elliptic_curves/, since these used to be the record holders, as mentioned. :-)

This is just one example of a couple of doctests where PARI tries to allocate a huge amount of memory, but actually uses only a fraction of it. (You might have to set up enough swap space to run these tests, but you'll usually not experience swapping even with just 512 MB RAM, say.)

comment:12 in reply to: ↑ 6 Changed 8 years ago by leif

... like I already mentioned above:

[...] Others just allocate that much, without actually using it (such that they'll fail with ulimit -v for no real reason).

768 MB (including a GUI) used to be sufficient to (build Sage and) run all long doctests without any swapping a while ago. [...]

Last edited 8 years ago by leif (previous) (diff)

comment:13 Changed 8 years ago by jdemeyer

  • Milestone changed from sage-5.10 to sage-duplicate/invalid/wontfix
  • Reviewers set to Jeroen Demeyer
  • Status changed from new to needs_review

Similar to #1517, I don't think it's up to Sage to decide how much RAM is enough.

comment:14 Changed 8 years ago by jdemeyer

  • Status changed from needs_review to positive_review

comment:15 Changed 8 years ago by jdemeyer

  • Resolution set to wontfix
  • Status changed from positive_review to closed
Note: See TracTickets for help on using tickets.