Ticket #1293 (new enhancement)

Opened 1 year ago

Last modified 3 months ago

sage is too big!

Reported by: zimmerma Assigned to: mabshoff
Priority: major Milestone: sage-wishlist
Component: distribution Keywords:
Cc:

Description

I was told that SAGE did use less memory than Maple or Mathematica. I did check on sage.math.washington.edu:

zimmerma@sage:~$ du -s /usr/local/maple10
388908  /usr/local/maple10

zimmerma@sage:~$ du -s /usr/local/mathematica-5.2
641016  /usr/local/mathematica-5.2

sage:/tmp/zimmerma/sage-2.8.14> make install DESTDIR=/tmp/zimmerma/sage-2.8.14-\
install
sage:/tmp/zimmerma/sage-2.8.14> du -s /tmp/zimmerma/sage-2.8.14-install
1237280 /tmp/zimmerma/sage-2.8.14-install

I can understand that the SAGE developers need all the source and binaries installed, but I wish a minimal version for the simple user that would use at most the same amount of memory than Maple or Mathematica, not 2 times or 3 times more!

Change History

11/27/2007 10:24:52 AM changed by mabshoff

Well, your numbers are slighly inflated because "make install" is still experimental and copies fata not needed:

mabshoff@sage:/tmp/Work-mabshoff/size$ du -sch sage-2.8.13-use_this_on_sage_dot_math-x86_64-Linux
802M    sage-2.8.13-use_this_on_sage_dot_math-x86_64-Linux

The current 2.8.13 binary expands to 802 MB which is still too large, but somewhat smaller than the 1.2GB you had.

But it would be a good thing to slim down the installed Sage if it is possible.

Cheers,

Michael

12/06/2007 08:31:15 AM changed by malb

Some numbers:

  • a fresh 2.8.13 is 804M (binary release, i.e. spkg is basically empty)
  • after striping all executable files + *.so we are down to 655M
  • if we - as an experiment only, this shouldn't be done in real lift because it breaks updates etc. - also remove *.a we are down to 536M
  • of this 149M are in devel and 344M are in local

12/17/2007 04:22:07 AM changed by zimmerma

Here are the brand new figures for sage-2.9 on a 64-bit computer (Opteron under Fedora7):

achille% du -s /usr/local/sage-2.9
1517144 /usr/local/sage-2.9

If the figures are comparable on sage.math (which I assume) this is 2.4 times larger than Mathematica and 3.9 times larger than Maple.

09/28/2008 08:47:39 AM changed by malb

Some new datapoints:

  • 3.1.3.alpha1 is 1.7GB after compilation (64-bit Linux),
  • it is safe to delete all spkgs in $SAGE_ROOT/spkgs/standard,
  • it is safe to strip executables,
  • it is safe to strip shared libraries with -g -R .comment -R .note,
  • one may delete all of $SAGE_ROOT/devel/sage/build except for the sage subdirectory.

The result is 1.1GB which is still massive. I'm building with -Os now to see how much of a difference that makes.

09/28/2008 08:52:40 AM changed by malb

I think this should also be safe in $SAGE_ROOT/devel/sage/sage/

for f in `find -name "*.pyx"`; do echo $f | sed "s/\.pyx/\.c/" | xargs rm; done
for f in `find -name "*.pyx"`; do echo $f | sed "s/\.pyx/\.cpp/" | xargs rm; done

to delete all autogenerated .c and .cpp files.

This seems to free ~ 80MB

09/28/2008 08:54:57 AM changed by malb

Actually, the result is smaller than 1.1GB as I forgot to strip the Sage extensions. The result including the add-on above is 978M but still fully functional, I believe.