Author Topic: OSX /tmp garbage collection again  (Read 3556 times)

Offline pfile

  • PTeam Member
  • PixInsight Jedi Grand Master
  • ********
  • Posts: 4729
OSX /tmp garbage collection again
« on: 2013 August 27 16:05:32 »
Juan, i thought that you were going to touch all the PI swp files in /tmp periodically to avoid OSX's /tmp garbage collection from destroying all the swp files?

i got a new macbook and true to form i've left PI 1.8RC7 running for days on one of the desktops. thankfully i had saved my project before i let it go idle, but due to OCD issues i just tried to save the project again and found that all the swp files were indeed gone. i had forgotten to hack the cron script to increase the amount of time files can be idle before they are deleted...

rob

Offline Juan Conejero

  • PTeam Member
  • PixInsight Jedi Grand Master
  • ********
  • Posts: 7111
    • http://pixinsight.com/
Re: OSX /tmp garbage collection again
« Reply #1 on: 2013 August 28 02:59:19 »
Hi Rob,

Unfortunately, this is still not implemented in RC7. It is not so easy to do properly without any impact on performance. This feature will be included in the final 1.8.0 release.
Juan Conejero
PixInsight Development Team
http://pixinsight.com/

Offline edd

  • Newcomer
  • Posts: 32
Re: OSX /tmp garbage collection again
« Reply #2 on: 2013 August 28 03:18:15 »
I believe you can tell OS X to change its behaviour fairly easily. If you look at /etc/defaults/periodic.conf you'll see the default settings, and you can modify these by editing (making if necessary) /etc/periodic.conf.local
The relevant stuff is controlled by these variables
Code: [Select]
daily_clean_tmps_days="3"                               # If not accessed for
daily_clean_tmps_ignore=".X*-lock .X11-unix .ICE-unix .font-unix .XIM-unix"
daily_clean_tmps_ignore="$daily_clean_tmps_ignore quota.user quota.group"
You could override daily_clean_tmps_days or add PixInsight's swap file extension to daily_clean_tmps_ignore in the style of the second line.

Offline Juan Conejero

  • PTeam Member
  • PixInsight Jedi Grand Master
  • ********
  • Posts: 7111
    • http://pixinsight.com/
Re: OSX /tmp garbage collection again
« Reply #3 on: 2013 August 28 03:24:33 »
Nice finding!

In your example, something like this should work:

daily_clean_tmps_ignore=".X*-lock .X11-unix .ICE-unix .font-unix .XIM-unix ~PI64~*"
Juan Conejero
PixInsight Development Team
http://pixinsight.com/

Offline pfile

  • PTeam Member
  • PixInsight Jedi Grand Master
  • ********
  • Posts: 4729
Re: OSX /tmp garbage collection again
« Reply #4 on: 2013 August 28 08:20:35 »
yeah i had done those hacks previously but as i explained i got a new machine and forgot to do it...

it's not a problem for 'advanced' users to get around this issue but for average users they are going to be seriously surprised when the rug gets pulled out from under PI.

i know you like orthogonality but there are better places to store the temp files in OSX where they will not be deleted.