# Communication with server is very slow

## creaker

Last update did my communication with server (on local network) very slow. Before it was quick, less than second to log via ssh or mount/unmount cifs shares. Now I have to wait about 15 seconds for those operations completion.

Once logged to server or mounting shares all the other operations are fast (cd, cp, mv, copy, browsing shares in Dolphin and so on).

These packages was updated during last emerge world:

```
app-text/libexttextcat-3.4.0

app-admin/eselect-opengl-1.2.7

dev-libs/libtasn1-2.14

dev-libs/icu-51.1

x11-libs/libdrm-2.4.45

media-libs/mesa-9.1.2-r1

media-libs/raptor-2.0.9

media-libs/libvisio-0.0.26

media-libs/libcdr-0.0.13

net-im/skype-4.2.0.11

sys-apps/gptfdisk-0.8.6

x11-drivers/nvidia-drivers-319.17

app-office/libreoffice-bin-3.6.4.3
```

Which package can cause this problem? I do not see any ssh or cifs related packages here.

----------

## John R. Graham

This is a symptom that I see from time to time when the primary DNS is down. You get a delay before the system queries the backup DNS. As a test you can swap the order of the lines in /etc/resolv.conf.

- John

----------

## creaker

Thanks for reply, John!

I had only one nameserver (ggogle dns). Adding opendns ip to resolv.conf (as first nameserver) does not solved the problem.

I was not hoping that it would help because I connecting to the server by ip, not by name. As well mounting also by ip.

And I had  this latency never before.

Looked to /var/log/auth.log at server:

```
May 29 20:39:23 debserver sshd[1890]: pam_unix(sshd:auth): authentication failure; logname= uid=0 euid=0 tty=ssh ruser= rhost=192.168.1.2  user=chord

May 29 20:39:25 debserver sshd[1890]: Accepted publickey for chord from 192.168.1.2 port 51298 ssh2

May 29 20:39:25 debserver sshd[1890]: pam_unix(sshd:session): session opened for user chord by (uid=0)
```

Looks like connected in 2 secs, but this log was updates with 12 seconds delay. Total is 14 seconds

----------

## gerdesj

OpenDNS is a double edged sword!  It is a great free service BUT ...

ODNS will always give an answer unless you subscribe to the service ... always.  And that's a problem.  They generate income from ads served up to a browser and invariably these ads come from typos in a browser.  They will always return an answer to a DNS query - either the correct answer or if an incorrect query is received they will return the IP of their web servers.

So I would suggest only using ODNS for web traffic and not for anything else unless you are a DNS expert - in which case their free service is brilliant or you have a standalone system in which case it is also excellent.

I can't help much else but to suggest:

DNS - either your own or your ISP's or say Google's but not ODNS unless you have mitigated the problems alluded to above and some of the snags can be very subtle.

Timesync - just do it already, it's free nowadays.

Get the infrastructure sorted first and then post back.

Cheers

Jon

----------

## creaker

I realized that this is not a Gentoo problem. I checked all the boxex I have - the problem persists, no matter what a box and what a OS used to connect to server. It just coincided with the time of last gentoo update and disoriented me. Something wrong at my server.

Sorry for this topic creation.

----------

## creaker

The first part of the problem fixed: it was really DNS problem (I was surprised). Adding "UseDNS no" option to sshd_config reduced ssh connect time to 2.5 secs.

But mounting samba shares still slow...

----------

