postscreen cache size & db type?

Previous Topic Next Topic
 
classic Classic list List threaded Threaded
3 messages Options
Reply | Threaded
Open this post in threaded view
|

postscreen cache size & db type?

jasonsu
In my logs I see postscreen cache cleanups

        postfix/postscreen[18826]: cache btree:/var/lib/postfix/postscreen_cache full cleanup: retained=224 dropped=12 entries

It looks like it's happening because they're 'full' at the time.

Under "CACHE CONTROLS" & "RESOURCE CONTROLS" @ http://www.postfix.org/postscreen.8.html, I don't see a param to increase the cache size.

Does the cache need to b increased, so performance doesn't suffer?
What's the parameter to control that?

Also in the docs I see

        postscreen_cache_map (default: btree:$data_directory/postscreen_cache)

Is there any advantage/harm in using lmdb here, instead of btree?  I'm already using lmdb as default DB type for most other !pcre tables.

Jason

Reply | Threaded
Open this post in threaded view
|

Re: postscreen cache size & db type?

Noel Jones-2
On 4/6/2016 10:38 AM, [hidden email] wrote:
> In my logs I see postscreen cache cleanups
>
> postfix/postscreen[18826]: cache btree:/var/lib/postfix/postscreen_cache full cleanup: retained=224 dropped=12 entries
>
> It looks like it's happening because they're 'full' at the time.

They are removed because they are expired.

>
> Under "CACHE CONTROLS" & "RESOURCE CONTROLS" @ http://www.postfix.org/postscreen.8.html, I don't see a param to increase the cache size.
>

There is no limit on the cache size, and the default
postscreen_*_ttl values should be reasonable for the vast majority
of sites.

> Does the cache need to b increased, so performance doesn't suffer?
> What's the parameter to control that?

No.

>
> Also in the docs I see
>
> postscreen_cache_map (default: btree:$data_directory/postscreen_cache)
>
> Is there any advantage/harm in using lmdb here, instead of btree?  I'm already using lmdb as default DB type for most other !pcre tables.

Access latency is the important part.  Slow access to the cache will
limit the number of connections postfix can service.
btree is suggested because it's fast and supports the features needed.
I don't use lmdb, so I can't really answer if it's suitable for the
postscreen cache.



  -- Noel Jones
Reply | Threaded
Open this post in threaded view
|

Re: postscreen cache size & db type?

jasonsu
On Wed, Apr 6, 2016, at 09:12 AM, Noel Jones wrote:
> > postfix/postscreen[18826]: cache btree:/var/lib/postfix/postscreen_cache full cleanup: retained=224 dropped=12 entries
> >
> > It looks like it's happening because they're 'full' at the time.
> They are removed because they are expired.

Ok, so it's "full cleanup" of postscreen_cache, NOT a cleanup of "postscreen_cache fuill"

> There is no limit on the cache size, and the default
> postscreen_*_ttl values should be reasonable for the vast majority
> of sites.

Makes sense now.

> > Is there any advantage/harm in using lmdb here, instead of btree?  I'm already using lmdb as default DB type for most other !pcre tables.
>
> Access latency is the important part.  Slow access to the cache will
> limit the number of connections postfix can service.
> btree is suggested because it's fast and supports the features needed.
> I don't use lmdb, so I can't really answer if it's suitable for the
> postscreen cache.

IIUC, lmdb is based on / derived from btree.

The in-memory  (http://symas.com/mdb/inmem/) & on-disk benchmarks (http://symas.com/mdb/ondisk/)) suggest LMDB's performance, and latency (https://symas.com/getting-down-and-dirty-with-lmdb-qa-with-symas-corporations-howard-chu-about-symass-lightning-memory-mapped-database/) are significantly better than most.

Boils down to whether lmdb: can/should be used in this parameter instance. I'll wait to hear from others on it.

Thanks

Jason