Purpose of some of the files in .sage

48 views
Skip to first unread message

John H Palmieri

unread,
Aug 22, 2022, 6:47:46 PM8/22/22
to sage-devel
What is the purpose of

- $HOME/.sage/gap
- $HOME/.sage/pexpect_logs
- $HOME/.sage/cache

?

The first one currently takes 1.5GB on my machine, and it has a README.txt file that says "It is OK to delete all these cache files.  They will be recreated as needed." So why do we keep them at all?

The second one takes 195MB on my machine, with almost 20,000 small files. What are they for?

The third one contains lots of very small files.

For all of these: why do we keep the files by default? There is presumably some benefit to keeping them, but also some cost. How do the cost and the benefit compare?

Dima Pasechnik

unread,
Aug 22, 2022, 7:02:05 PM8/22/22
to sage-devel


On Mon, 22 Aug 2022, 23:47 John H Palmieri, <jhpalm...@gmail.com> wrote:
What is the purpose of

- $HOME/.sage/gap
- $HOME/.sage/pexpect_logs
- $HOME/.sage/cache

?

The first one currently takes 1.5GB on my machine, and it has a README.txt file that says "It is OK to delete all these cache files.  They will be recreated as needed." So why do we keep them at all?

these are gap and libgap workspaces. Their presence makes loading gap and libgap much faster.



The second one takes 195MB on my machine, with almost 20,000 small files. What are they for?

these are, well, pexpect logs. Good for debugging I guess.


The third one contains lots of very small files.

For all of these: why do we keep the files by default? There is presumably some benefit to keeping them, but also some cost. How do the cost and the benefit compare?

--
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 view this discussion on the web visit https://groups.google.com/d/msgid/sage-devel/65f8aead-c7c9-4b6b-8f6c-dab511870173n%40googlegroups.com.

John H Palmieri

unread,
Aug 22, 2022, 8:11:06 PM8/22/22
to sage-devel
On Monday, August 22, 2022 at 4:02:05 PM UTC-7 dim...@gmail.com wrote:


On Mon, 22 Aug 2022, 23:47 John H Palmieri, <jhpalm...@gmail.com> wrote:
What is the purpose of

- $HOME/.sage/gap
- $HOME/.sage/pexpect_logs
- $HOME/.sage/cache

?

The first one currently takes 1.5GB on my machine, and it has a README.txt file that says "It is OK to delete all these cache files.  They will be recreated as needed." So why do we keep them at all?

these are gap and libgap workspaces. Their presence makes loading gap and libgap much faster.

How many do we need to keep? Are they all used, or just the recent ones?
 


The second one takes 195MB on my machine, with almost 20,000 small files. What are they for?

these are, well, pexpect logs. Good for debugging I guess.

Right, so should they only be kept when someone issues a command to assist with debugging? I honestly don't see the value in keeping pexpect logs from two weeks ago, let alone two years ago. Should the ones created by doctesting be stored in SAGE_ROOT rather than DOTSAGE? Should we implement a cleaning procedure, and perhaps even have Sage every now and then say, "It's been a while since you've run './sage --clean-dotsage'; run it now?"

Dima Pasechnik

unread,
Aug 22, 2022, 8:30:53 PM8/22/22
to sage-devel


On Tue, 23 Aug 2022, 01:11 John H Palmieri, <jhpalm...@gmail.com> wrote:


On Monday, August 22, 2022 at 4:02:05 PM UTC-7 dim...@gmail.com wrote:


On Mon, 22 Aug 2022, 23:47 John H Palmieri, <jhpalm...@gmail.com> wrote:
What is the purpose of

- $HOME/.sage/gap
- $HOME/.sage/pexpect_logs
- $HOME/.sage/cache

?

The first one currently takes 1.5GB on my machine, and it has a README.txt file that says "It is OK to delete all these cache files.  They will be recreated as needed." So why do we keep them at all?

these are gap and libgap workspaces. Their presence makes loading gap and libgap much faster.

How many do we need to keep? Are they all used, or just the recent ones?
 
one for gap, one for libgap (IIRC, only the current ones are kept).




The second one takes 195MB on my machine, with almost 20,000 small files. What are they for?

these are, well, pexpect logs. Good for debugging I guess.

Right, so should they only be kept when someone issues a command to assist with debugging? I honestly don't see the value in keeping pexpect logs from two weeks ago, let alone two years ago. Should the ones created by doctesting be stored in SAGE_ROOT rather than DOTSAGE? Should we implement a cleaning procedure, and perhaps even have Sage every now and then say, "It's been a while since you've run './sage --clean-dotsage'; run it now?"


The third one contains lots of very small files.

For all of these: why do we keep the files by default? There is presumably some benefit to keeping them, but also some cost. How do the cost and the benefit compare?

--
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 view this discussion on the web visit https://groups.google.com/d/msgid/sage-devel/65f8aead-c7c9-4b6b-8f6c-dab511870173n%40googlegroups.com.

--
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.

John Cremona

unread,
Aug 23, 2022, 5:41:39 AM8/23/22
to SAGE devel
Whenever a pexpect interface is created, there's an optional parameter to say whether or not to make a log file. The default should always be not to do so. So we should look to see which ones may have the opposite default. It may be something left over from a debugging session which got committed by mistake.

John

John H Palmieri

unread,
Aug 23, 2022, 1:55:12 PM8/23/22
to sage-devel
Thank you, that helped. The files are created when doctesting src/sage/doctest/forker.py. I've opened https://trac.sagemath.org/ticket/34416.
Reply all
Reply to author
Forward
0 new messages