You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@sling.apache.org by "Thomas Mueller (JIRA)" <ji...@apache.org> on 2015/01/05 08:56:34 UTC

[jira] [Commented] (SLING-4216) Limit the number of vanityPath MapEntry

    [ https://issues.apache.org/jira/browse/SLING-4216?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=14264308#comment-14264308 ] 

Thomas Mueller commented on SLING-4216:
---------------------------------------

Just for the case it turns out there are still (performance) problems. I assume there is none, but just in case. This (my) bloom filter implementation is slightly sub-optimal, as it sets only 2 bits per key (K=2). The false positive rate could be reduced by a few percent if this is fixed. Also, this bloom filter doesn't allow removing entries. This could result in a high false positive rate if many vanity paths are removed / changed, and the bloom filter is not re-built. If this turns out to be a problem, a different type of filter could be used instead, for example a counting bloom filter, or the alternative described in ["Cache-, Hash- and Space-Efficient Bloom Filters" (Felix Putze, Peter Sanders, Johannes Singler) / "4 Space-Efficient Bloom Filter Replacements"|http://algo2.iti.kit.edu/singler/publications/cacheefficientbloomfilters-wea2007.pdf]. If that's needed, I would write the implementation.

> Limit the number of vanityPath MapEntry 
> ----------------------------------------
>
>                 Key: SLING-4216
>                 URL: https://issues.apache.org/jira/browse/SLING-4216
>             Project: Sling
>          Issue Type: Improvement
>          Components: ResourceResolver
>            Reporter: Antonio Sanso
>            Assignee: Antonio Sanso
>         Attachments: SLING-4216-patch.txt, SLING-4216-patch.txt, SLING-4216-patch.txt
>
>
> At the moment there isn't any limit to the number of MapEntry that are cached in memory.
> If the number of vanityPaths/alias is extremely high this can cause OOM.
> It would be good to have a way to limit the amount of memory used by the MapEntry cache.



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)