Skip to content
This repository has been archived by the owner on Apr 21, 2023. It is now read-only.

file cache should enforce a maximum inode count. #462

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

file cache should enforce a maximum inode count. #462

GoogleCodeExporter opened this issue Apr 6, 2015 · 6 comments

Comments

@GoogleCodeExporter
Copy link

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
Copy link
Author

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
Copy link
Author

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
Copy link
Author

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

  • Changed state: Accepted

@GoogleCodeExporter
Copy link
Author

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

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

@GoogleCodeExporter
Copy link
Author

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
Copy link
Author

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

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

No branches or pull requests

1 participant