LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Newbie (https://www.linuxquestions.org/questions/linux-newbie-8/)
-   -   CentOS slow when network is enabled, otherwise fast (https://www.linuxquestions.org/questions/linux-newbie-8/centos-slow-when-network-is-enabled-otherwise-fast-755693/)

Xcalable 09-16-2009 01:58 PM

CentOS slow when network is enabled, otherwise fast
 
Hi

I've installed centOS and it is slow when the network is activated, terminal takes like 10-15 seconds to start, and other stuff like screen saver also takes long to open. But when I deactivate the network in centOS everything is fast, what could be the problem?

I'm running centOS in virtualbox.

Thanks

bhageshp 09-17-2009 06:55 AM

Check out what are the network related services which are active and trying to connect to a server/client. Also check the host system can communicate with the virtualbox client

prasanta 09-17-2009 08:57 AM

Quote:

I've installed centOS and it is slow when the network is activated, terminal takes like 10-15 seconds to start, and other stuff like screen
It seems like the machine is taking too much time in getting the IP from the LAN, in case you are using DHCP.

Regards,

--
Prasanta

Xcalable 09-17-2009 02:17 PM

I'm using a static ip, and the host can ping the vm, everything works, samba shares, internet etc. I have a router, it's just slow for some reason. I've read somewhere else that it could be the DNS that's taking too long, but my etc/hosts seems right, so I don't know...

prasanta 09-17-2009 02:33 PM

In case you are using dynamic dns, that might be a problem. This has nothing to do with /etc/resolv.conf. Try removing nsupdate in case you using dynamic dns.

Regards,

--
Prasanta

Xcalable 09-17-2009 03:00 PM

Do you mean like dyndns.com ?My router has that feature which I have configured and forwarding port 80 to centos, I have not configured centos to use dyndns, if that was what you meant.

lutusp 09-17-2009 04:54 PM

Quote:

Originally Posted by Xcalable (Post 3687413)
I'm using a static ip, and the host can ping the vm, everything works, samba shares, internet etc. I have a router, it's just slow for some reason. I've read somewhere else that it could be the DNS that's taking too long, but my etc/hosts seems right, so I don't know...

But slow DNS resolution or slow DHCP would not slow down your entire system. The cause must lie elsewhere. Try looking at the system message log:

# tail -f /var/log/messages

Now try activating the network. See what is going on.

Another trick, when a system slows down, is this:

$ top

"top" shows where the machine is spending its time, with the biggest time user at the top of the list. This should tell you why the system is slowing down.

Xcalable 09-19-2009 10:31 AM

I've done

# tail -f /var/log/messages

And activating the network gives the following output:

Sep 19 19:23:12 CentOS kernel: eth0: link up, 100Mbps, full-duplex
Sep 19 19:23:14 CentOS avahi-daemon[2062]: New relevant interface eth0.IPv6 for mDNS.
Sep 19 19:23:14 CentOS avahi-daemon[2062]: Joining mDNS multicast group on interface eth0.IPv6 with address fe80::a00:27ff:fe66:ef4b.
Sep 19 19:23:14 CentOS avahi-daemon[2062]: Registering new address record for fe80::a00:27ff:fe66:ef4b on eth0.
Sep 19 19:23:16 CentOS avahi-daemon[2062]: New relevant interface eth0.IPv4 for mDNS.
Sep 19 19:23:16 CentOS avahi-daemon[2062]: Joining mDNS multicast group on interface eth0.IPv4 with address 10.0.0.101.
Sep 19 19:23:16 CentOS avahi-daemon[2062]: Registering new address record for 10.0.0.101 on eth0.

I've also looked at # top and Xorg is using the most cpu %, but it peaks at 3%, so can't be that.

prasanta 09-19-2009 11:12 AM

Network does not seem be the issue. Disable network during boot up and later on give a static IP and then check the performance. Is some sort of NFS, NIS running ?

Regards,

--

Xcalable 09-20-2009 07:43 AM

I've disabled the network on boot up and everything is fast, enabled network and the slowness returns...

I don't have NFS/NIS running.

I've also went through all of the services disabling/enabling them one at a time, no difference. This is quite frustrating.

If this helps, it's CentOS 5.3, when I installed it I configured it for httpd, clustering and file sharing (disabled for now)

Thank you to all for trying to help, any more suggestions is welcome.

cg40oz 12-29-2009 12:55 PM

It may that your computer is having a issue resolving it's own hostname. Make sure your /etc/hosts has a entry for your computer.

127.0.0.1 localhost.localdomain localhost
::1 localhost6.localdomain6 localhost6
Your computers IP ComputerName.something.net computerName

tredegar 12-29-2009 01:17 PM

I'd try disabling IPV6 for a start.

Nobody seems to be using IPV6 yet, and IPV6 lookups (for essential things like localhost) need to time-out before IPV4 is tried. This wastes a lot of time, even if you are not using networking:

RedHat 5 & Centos 5

Edit /etc/sysconfig/network and set "NETWORKING_IPV6" to "no"

Add/Edit the following to /etc/modprobe.conf :

alias ipv6 off
alias net-pf-10 off

Edit: You'll need to restart networking, or reboot for the changes to take effect.


All times are GMT -5. The time now is 03:53 PM.