Re: [CentOS] operation on the client is slow when openldap serversare down

2010-06-10 Thread xufengnju


nscd turned out to be very helpful.

2010-06-11 



xufengnju 



发件人: Dan Burkland 
发送时间: 2010-06-10  21:49:38 
收件人: CentOS mailing list 
抄送: 
主题: Re: [CentOS] operation on the client is slow when openldap serversare down 
 

From: centos-boun...@centos.org [mailto:centos-boun...@centos.org] On Behalf Of 
XUFENG
Sent: Thursday, June 10, 2010 3:54 AM
To: centos@centos.org
Subject: [CentOS] operation on the client is slow when openldap servers are down

Hi List,

OS: centos5.3 x86_64
OpenLDAP is installed using yum.

I find that when all the ldap servers are down and offline, the operations on 
the client is slow.
When I try to do `ls` on the directories on the client as root, it waits there 
for some seconds.(root is not local account not via ldap)
But when I power on the openldap servers, it is much better.

The configuration on the client:

[r...@ ~]# cat /etc/ldap.conf 
base dc=,dc=com
timelimit 1
bind_timelimit 1
nss_initgroups_ignoreusers 
root,ldap,named,avahi,haldaemon,dbus,radvd,tomcat,radiusd,news,mailman,nscd,gdm
uri ldaps://auth1.xa..com:636 ldaps://auth2.xa..com:636
ssl on
tls_checkpeer yes
tls_cacertdir /etc/openldap/cacerts
tls_cacertfile /etc/openldap/cacerts/cacert.pem
pam_password md5
bind_policy soft

[r...@ ~]# cat /etc/openldap/ldap.conf 
URI ldaps://auth1.xa..com:636 ldaps://auth2.xa..com:636
BASE dc=,dc=com
TLS_CACERTDIR /etc/openldap/cacerts
TLS_CACERT /etc/openldap/cacerts/cacert.pem
TLS_REQCERT demand

[r...@ ~]# cat /etc/nsswitch.conf 
passwd: files ldap
shadow: files ldap
group:  files ldap
hosts:  files dns
bootparams: nisplus [NOTFOUND=return] files
ethers: files
netmasks:   files
networks:   files
protocols:  files
rpc:files
services:   files
netgroup:   files ldap
publickey:  nisplus
automount:  files ldap
aliases:files nisplus


Any suggestions?

I don't know for sure if this will help any but have you tried nscd to cache 
results? 
-Dan
___
CentOS mailing list
CentOS@centos.org
http://lists.centos.org/mailman/listinfo/centos
___
CentOS mailing list
CentOS@centos.org
http://lists.centos.org/mailman/listinfo/centos


Re: [CentOS] unison versus rsync

2010-01-13 Thread xufengnju

When you are ove a tunnel such as vpn connection, you can use it in daemon mode 
on one side and rsync to or from that side on the other side. Sounds like 
server/client application.

2010-01-14 



xufengnju 



发件人: Joseph L. Casale 
发送时间: 2010-01-14  09:12:16 
收件人: 'CentOS mailing list' 
抄送: 
主题: Re: [CentOS] unison versus rsync 
 
I didn't think unison was maintained any more - and I wouldn't expect 
anything to beat rsync with the -z option on a slow link.  I'd just use 
the -P option and restart it when/if it fails.  It wouldn't hurt to do 
subsets first since they will be quickly skipped when you repeat from 
the root.  If you have a huge number of files it might be worth finding 
a way to update rsync to a 3.x version which will not need to xfer the 
entire directory listing before starting.
Looks like rf has 3.0.7, thanks for that tip. Frankly, I abhor the thought
of even using rsync for this, it's over a vpn so there is absolutely no need
for encryption but I don't know another tool that can transfer diffs only?
Thanks guys,
jlc
___
CentOS mailing list
CentOS@centos.org
http://lists.centos.org/mailman/listinfo/centos
___
CentOS mailing list
CentOS@centos.org
http://lists.centos.org/mailman/listinfo/centos


[CentOS] rsync optimization

2010-01-11 Thread xufengnju
Hi,

We currently have upload servers in one data center(A), and users upload the 
images there. We have storage server in another data center(B). When users 
upload many images at the same time, we face sync difficulties.

On B, we use rsync in server mode, with authentication.
On A, we use  `rsync -azpogtRv --safe-links 1/ rsync://u...@serverb/img/ 
--password-file=/var/www/r.passwd `

Both ends run centos 5.3 X86_64.

Any suggestions to optimize rsync in this case?

Thank you in advance.

2010-01-11 



xufengnju 
___
CentOS mailing list
CentOS@centos.org
http://lists.centos.org/mailman/listinfo/centos


Re: [CentOS] rsync optimization

2010-01-11 Thread xufengnju

We are now doing on the work to reduce the amount of images that would be 
compared before rsync many of which maybe aready exist on the receiving end.
After we do a successful rsync, we log the images transfered, and we use 
another script to delete them on the send end. And that turns out to be helpful 
in this case.



2010-01-12 



xufengnju 



发件人: Kwan Lowe 
发送时间: 2010-01-11  21:14:58 
收件人: CentOS mailing list 
抄送: 
主题: Re: [CentOS] rsync optimization 
 
On Mon, Jan 11, 2010 at 4:36 AM, xufengnju xufeng...@sina.com wrote:
 Hi,

 We currently have upload servers in one data center(A), and users upload the
 images there. We have storage server in another data center(B). When users
 upload many images at the same time, we face sync difficulties.

 On B, we use rsync in server mode, with authentication.
 On A, we use  `rsync -azpogtRv --safe-links 1/
 rsync://u...@serverb/img/ --password-file=/var/www/r.passwd `

 Both ends run centos 5.3 X86_64.

 Any suggestions to optimize rsync in this case?
You can add the following options:
--ignore-times
--delay-updates
The first will speed up the comparison. The second can prevent some
errors related to synchronization on the receiving side.
BTW, have you considered using a DRBD volume with GFS?  This might
work better than rsync, depending on your configuration.
___
CentOS mailing list
CentOS@centos.org
http://lists.centos.org/mailman/listinfo/centos
___
CentOS mailing list
CentOS@centos.org
http://lists.centos.org/mailman/listinfo/centos