ExtMail服务器社区's Archiver

hzqbbc 发表于 2007-1-30 08:57

[zt]hash: Vs ldap: maps (有关hash 和ldap的对比讨论)

  作为lookup table,hash和ldap都有各自的优点和缺点,以下是postfix官方邮件列表里近期讨论的一个话题:高流量的mail系统该用ldap还是hash呢?

[quote]
Mike Kenny | 29 Jan 08:25

hash: Vs ldap: maps
From: Mike Kenny <inzanix <at> gmail.com>
Subject: hash: Vs ldap: maps
Newsgroups: gmane.mail.postfix.user
Date: 2007-01-29 07:25:29 GMT


Reading &#39;The Book of Postfix&#39; (really superb book, thanks Ralf and Patrick, wish I&#39;d had it sooner) I came across a reference to the comparative speed of lookups "LDAP queries are slow compared to the indexed maps that Postfix uses". We are currently using an LDAP server for the purposes of authenticating users and locating mailboxes (distributes across multiple courier-imap servers). We haven&#39;t noticed any real performance issues on the mail side, but our LDAP servers appear to under strain, not just from the mail system. By removing the email usage of the LDAP I will be able to reduce that strain, while also benefiting from the performance improvements mentioned above.

My concern is that LDAPs are designed specifically for high volume query access, We have over 300,000 mailboxes in our LDAP and this is growing daily. Is a hash map capable of handling that volume? And, if yes, at what volume should I start to be concerned?

Thanks,

Mike


Sandy Drobic | 29 Jan 10:20

Re: hash: Vs ldap: maps
From: Sandy Drobic <postfix-users <at> japantest.homelinux.com>
Subject: Re: hash: Vs ldap: maps
Newsgroups: gmane.mail.postfix.user
Date: 2007-01-29 09:20:12 GMT

Mike Kenny wrote:
> Reading &#39;The Book of Postfix&#39; (really superb book, thanks Ralf and Patrick,
> wish I&#39;d had it sooner) I came across a reference to the comparative speed
> of lookups "LDAP queries are slow compared to the indexed maps that Postfix
> uses". We are currently using an LDAP server for the purposes of
> authenticating users and locating mailboxes (distributes across multiple
> courier-imap servers). We haven&#39;t noticed any real performance issues on
> the
> mail side, but our LDAP servers appear to under strain, not just from the
> mail system. By removing the email usage of the LDAP I will be able to
> reduce that strain, while also benefiting from the performance improvements
> mentioned above.
>
> My concern is that LDAPs are designed specifically for high volume query
> access, We have over 300,000 mailboxes in our LDAP and this is growing
> daily. Is a hash map capable of handling that volume? And, if yes, at what
> volume should I start to be concerned?

Hashed databases can handle millions of entries. If you have hugh
databases you might want to try cdb instead of hash.
[url]http://www.postfix.org/CDB_README.html[/url]

--

--
Sandy

List replies only please!
Please address PMs to: news-reply2 ( <at> ) japantest (.) homelinux (.) com


Mike Kenny | 29 Jan 11:23

Re: hash: Vs ldap: maps
From: Mike Kenny <inzanix <at> gmail.com>
Subject: Re: hash: Vs ldap: maps
Newsgroups: gmane.mail.postfix.user
Date: 2007-01-29 10:23:14 GMT


Thanks Sandy. This reassuring and the CDB pointer is interesting and may be useful

Mike



On 1/29/07, Sandy Drobic < postfix-users <at> japantest.homelinux.com> wrote:
Mike Kenny wrote:
> Reading &#39;The Book of Postfix&#39; (really superb book, thanks Ralf and Patrick,
> wish I&#39;d had it sooner) I came across a reference to the comparative speed
> of lookups "LDAP queries are slow compared to the indexed maps that Postfix
> uses". We are currently using an LDAP server for the purposes of
> authenticating users and locating mailboxes (distributes across multiple
> courier-imap servers). We haven&#39;t noticed any real performance issues on
> the
> mail side, but our LDAP servers appear to under strain, not just from the
> mail system. By removing the email usage of the LDAP I will be able to
> reduce that strain, while also benefiting from the performance improvements
> mentioned above.
>
> My concern is that LDAPs are designed specifically for high volume query
> access, We have over 300,000 mailboxes in our LDAP and this is growing
> daily. Is a hash map capable of handling that volume? And, if yes, at what
> volume should I start to be concerned?

Hashed databases can handle millions of entries. If you have hugh
databases you might want to try cdb instead of hash.
[url]http://www.postfix.org/CDB_README.html[/url]

--
Sandy

List replies only please!
Please address PMs to: news-reply2 ( <at> ) japantest (.) homelinux (.) com



lst_hoe01 | 29 Jan 10:26


Re: hash: Vs ldap: maps
From: <lst_hoe01 <at> kwsoft.de>
Subject: Re: hash: Vs ldap: maps
Newsgroups: gmane.mail.postfix.user
Date: 2007-01-29 09:26:59 GMT

Zitat von Mike Kenny <inzanix <at> gmail.com>:

> Reading &#39;The Book of Postfix&#39; (really superb book, thanks Ralf and Patrick,
> wish I&#39;d had it sooner) I came across a reference to the comparative speed
> of lookups "LDAP queries are slow compared to the indexed maps that Postfix
> uses". We are currently using an LDAP server for the purposes of
> authenticating users and locating mailboxes (distributes across multiple
> courier-imap servers). We haven&#39;t noticed any real performance issues on the
> mail side, but our LDAP servers appear to under strain, not just from the
> mail system. By removing the email usage of the LDAP I will be able to
> reduce that strain, while also benefiting from the performance improvements
> mentioned above.
>
> My concern is that LDAPs are designed specifically for high volume query
> access, We have over 300,000 mailboxes in our LDAP and this is growing
> daily. Is a hash map capable of handling that volume? And, if yes, at what
> volume should I start to be concerned?

The pro and cons are along the following line :
Local disk based databases are faster because they need no network
round-trip and have no overhead from network protocol such as LDAP.
They scale with the number of machines easily because every machine
access it&#39;s own copy. The downside is that you have to establish some
procedure to savely update the hash/cdb/btree databases on the
front-end machines.

For using LDAP with noticeable volume of mail be sure to read and
understand following

man ldap_table
man proxymap

and double check if you have set indices on the needed attributs and
raised the default values for the backend berkeley DB.

Regards

Andreas


Victor Duchovni | 29 Jan 13:41

Re: hash: Vs ldap: maps
From: Victor Duchovni <Victor.Duchovni <at> MorganStanley.com>
Subject: Re: hash: Vs ldap: maps
Newsgroups: gmane.mail.postfix.user
Date: 2007-01-29 12:41:11 GMT

On Mon, Jan 29, 2007 at 09:25:29AM +0200, Mike Kenny wrote:

> We haven&#39;t noticed any real performance issues on the
> mail side, but our LDAP servers appear to under strain, not just from the
> mail system. By removing the email usage of the LDAP I will be able to
> reduce that strain, while also benefiting from the performance improvements
> mentioned above.

LDAP supports replication, the simplest solution is to *dedicate*
additional LDAP replica servers for use by the mail system.

> My concern is that LDAPs are designed specifically for high volume query
> access, We have over 300,000 mailboxes in our LDAP and this is growing
> daily. Is a hash map capable of handling that volume? And, if yes, at what
> volume should I start to be concerned?

The scaling barrier is not the table size, but rather the update
frequency.  Large indexed tables take a while to build, and if you need
low latency between LDAP records being added and the same appearing in
the indexed file incremental replication to an LDAP server is faster
than full dump/rebuild to an indexed file.
[/quote]

南界 发表于 2010-2-26 23:54

个人偏好ldap

页: [1]

Powered by Discuz! Archiver 7.0.0  © 2001-2009 Comsenz Inc.