Maxima stats huge numbers of files at startup?



On Tue, Dec 15, 2009 at 9:15 AM, Raymond Toy <toy.raymond at gmail.com> wrote:
> William Stein wrote:
>> On Tue, Dec 15, 2009 at 4:41 AM, Raymond Toy <toy.raymond at gmail.com> wrote:
>>
>>
>> We're using ecl. ?You can get the exact same setup by just installing
>> sage-4.2.1.
>>
>>
> Thanks, but no, I don't really want to install sage-4.2.1.

I would be willing to give you an account on a (very nice) machine
with 128GB RAM with sage pre-installed in your home directory, if that
would be useful.  You could later use said machine for maxima
development and testing if you want.  The NSF gave us some money for
hardware for supporting projects in Sage.... such as Maxima.

>>> Then we can investigate why share-subdirs-list is not doing what it's
>>> supposed to do.
>>>
>>
>> Thanks!
>>
> Can you do the following experiments for me? ?After starting maxima
> (with or without your fix to remove all the stat'ing of files), enter
> the following:
>
> :lisp *maxima-sharedir*
>
> That should produce a sensible value.
>
> :lisp (directory (pathname (concatenate 'string *maxima-sharedir* "/")))
>
> This should produce a list of one item consisting of *maxima-sharedir*
> with a "/" appended. ?If that works, then just run
>
> :lisp (share-subdir-list)
>
> This should produce a list of directories starting ?from
> *maxima-sharedir*, not from root.
>

Here's the output from the above:

sage subshell$ strace maxima --directories  > out 2>&1; grep stat out|wc -l

3088
/home/wstein/build/sage
sage subshell$
/home/wstein/build/sage
sage subshell$ maxima
;;; Loading #P"/scratch/wstein/build/sage/local/lib/ecl/defsystem.fas"
;;; Loading #P"/scratch/wstein/build/sage/local/lib/ecl/cmp.fas"
;;; Loading #P"/scratch/wstein/build/sage/local/lib/ecl/sysfun.lsp"
Maxima 5.19.1 http://maxima.sourceforge.net
Using Lisp ECL 9.8.4
Distributed under the GNU Public License. See the file COPYING.
Dedicated to the memory of William Schelter.
The function bug_report() provides bug reporting information.
(%i1) :lisp *maxima-sharedir*

/home/wstein/build/sage/local/share/maxima/5.19.1/share
(%i1) :lisp (directory (pathname (concatenate 'string *maxima-sharedir* "/")))

(/scratch/wstein/build/sage/local/share/maxima/5.19.1/share/)
(%i1) :lisp (share-subdir-list)

Maxima encountered a Lisp error:

 The function SHARE-SUBDIR-LIST is undefined.

Automatically continuing.
To reenable the Lisp debugger set *debugger-hook* to nil.
(%i1)


>
>>
>>> I run maxima across NFS, and I haven't noticed any slowdown (except that
>>> it takes a while to load up the maxima binary across the network).
>>>
>>
>> To physically notice it depends on the speed of your NFS. E.g., on one
>> of my machines the difference in startup time is about 0.4 versus 0.3.
>> ? ?This is hard to notice. ? ?It's best to worry more about the output
>> of strace than the actual observed speed, because of disk caching.
>>
>>
> Stracing my maxima (CVS) build on linux with ecl, I see that maxima
> (from my linux box to a mac via NFS over wifi) stats just the expected
> files. ?To me, this means the default maxima build is doing what it's
> supposed to be doing. ?Perhaps sage is changing something else, somehow.
>
> Ray
>
>



-- 
William Stein
Associate Professor of Mathematics
University of Washington
http://wstein.org