New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

file cache should enforce a maximum inode count. #462

Closed
GoogleCodeExporter opened this Issue Apr 6, 2015 · 6 comments

Comments

Projects
None yet
1 participant
@GoogleCodeExporter

GoogleCodeExporter commented Apr 6, 2015

See 
https://groups.google.com/group/mod-pagespeed-discuss/browse_thread/thread/9f679
597615ab064

The current system can create large numbers of small files and cause system 
issues.

Original issue reported on code.google.com by jmara...@google.com on 12 Jul 2012 at 12:06

@GoogleCodeExporter

This comment has been minimized.

GoogleCodeExporter commented Apr 6, 2015

Also, it should perhaps cleanup empty directories as it goes along. From the 
original reporter, it seems like numbers close to 20% of inodes being empty 
dirs is possible, and it may be relatively cheap to clean them up if we're 
touching things nearby anyway. OTOH, there is some possibility of races with 
puts, though.

Original comment by morlov...@google.com on 13 Jul 2012 at 6:52

@GoogleCodeExporter

This comment has been minimized.

GoogleCodeExporter commented Apr 6, 2015

The race situation is a real risk.  But it might be mitigated if you only 
delete empty directories that are N minutes old.

I have to wonder why we have empty directories though.  I'm guessing it's 
because we cleaned files, causing a directory to become empty, but didn't 
notice that and clean the directory.  There would still be a risk, though, that 
another process might want to write there.

I guess that race would be benign enough if it didn't happen often: it just 
means that cache write would fail and we'd rewrite it again later if it was 
important.

Original comment by jmara...@google.com on 13 Jul 2012 at 6:55

@GoogleCodeExporter

This comment has been minimized.

GoogleCodeExporter commented Apr 6, 2015

Original comment by jmara...@google.com on 16 Jul 2012 at 4:35

  • Changed state: Accepted
@GoogleCodeExporter

This comment has been minimized.

GoogleCodeExporter commented Apr 6, 2015

Original comment by j...@google.com on 10 Sep 2012 at 6:03

  • Changed state: Fixed
  • Added labels: Milestone-v23, release-note
@GoogleCodeExporter

This comment has been minimized.

GoogleCodeExporter commented Apr 6, 2015

This feature was added in r1739 and can be configured through the 
ModPagespeedFileCacheInodeLimit option. This change also included some bug 
fixes that should improve the reliability of cache cleaning and clean empty 
directories.

Original comment by j...@google.com on 10 Sep 2012 at 6:07

@GoogleCodeExporter

This comment has been minimized.

GoogleCodeExporter commented Apr 6, 2015

Original comment by jmara...@google.com on 13 Oct 2012 at 10:55

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment