Linux Network issues with XBMC running on local MySQL DB
#1
Hello,

Recently I switched the XBMC database to a local running MySQL server directly on the HTPC where my XBMC installation is at.
I am running Ubuntu 12.10 with the latest stable XBMC "Gotham".
It's quite a coincidence that lately connecting with SSH (before asking password, en after submitting password) it's quite slow in connecting, while the overal established connection is without issues.

Also I have problems with my internet connection (only on the XBMC box).
Sometimes it downloads a subtitle, but lately I get time-outs in XBMC with downloading subs.
This is what I tried so far to find out about my network connection:

Trying to connect with Google.
Code:
ping google.com
After a few seconds I gave up, should have a result within a second.

I use this command for internet speed testing.
Code:
wget -O/dev/null speedtest.pixelwolf.ch
Also gave up after a lot of time waiting, normally shows a progress bar and actual speed around 7MB/s.

Even when the HDD LED is not blinking a lot, I monitored real-time what's being read and written to the HDD.
Code:
sudo iotop -o
(with option 'o': Only show processes or threads actually doing I/O)
Not much going on there. Most of the time an empty list.

Monitor real-time network connections
Code:
sudo iftop -f icmp
Not much going on with real connections.

Monitor process list
Code:
top
Only one is XBMC running high all the time with 70-80% CPU and 15.7 MEM.
For the other processes, 0-5% CPU.
Nothing strange here, XBMC always had an high CPU load on my system.

Does anyone have some suggestions for me to try?
The reason to choose for a MySQL database locally, is because I now have a PI running in another room which uses the same database, which is working well.
When I tested the results above, the PI was turned off, so this could not be ruining the local network. Also the only device on the network, is my laptop typing this topic, and my phone.

My specs:

MOBO: ASRock FM2A75 PRO4-M
CPU: AMD A4-5300, Dual Core, 3,4GHz, Radeon HD7480D
MEM: Corsair XMS3 4GB DDR3 PC3-12800 (DDR3-1600)
HDD: WD Green WD20EARX, 2TB
Reply
#2
Slow login on SSH often is because there's a problem with the resolver (for DNS names) and this might also be the cause of your problems.

First try to ping to 8.8.8.8 (Google DNS). If this works directly but you cannot ping to google.com (or any other domain), it's almost definitely a DNS problem.

In that case add the following to /etc/resolv.conf:

nameserver 8.8.8.8
nameserver 8.8.4.4

These are the Google resolvers and should work.
Reply
#3
Tried Google again:

Code:
ping google.com
ping: unknown host google.com

Pinging to 8.8.8.8 however, worked.
What does it do if I manually add that?
Because I just booted the PI, which just have a connection and works well.

Why is the default on Ubuntu from just one day to another, not sufficient anymore?
(When I ping to google.com on my laptop, I get this one: 74.125.136.94, not 8.8.8.8)

Sorry for the questions, I am eager to learn about the background information on what I do.
I already added the nameservers now as you said, and my XBMC box is now working just fast on internet. 10MB/s instead of the 7MB I was used to.
Reply
#4
The DNS resolvers you've added (8.8.8.8 and 8.8.4.4) translate domain names (google.com, xbmc.org, etc) to an IP address. This doesn't affect the speed of your internet, because it's only done on the initial connection.

I don't know why the resolving stopped working all of a sudden. It depends on which resolvers were configured. Could be that your router (if that's your resolver) did something weird or your ISP is fucking up (if you get their resolver IPs directly). You could look up the internet config on another PC in your network and see what resolvers they are using and manually configure those on your XBMC box.

Quote:(When I ping to google.com on my laptop, I get this one: 74.125.136.94, not 8.8.8.8)

the 74.etc IP is one of Google's webservers, it has nothing to do with their resolvers. The 8.8.8.8 IP is a resolver that Google is running (I mainly recommend to use that one, because the IP is easy to remember).
Reply
#5
The fact that SSH connections and mysql were slow as well when DNS wasn't working, means you haven't disabled lookups in either.

You may consider doing this as well as it is not needed in a local only install

See http://linux-tips.org/article/92/disabli...ups-in-ssh for the SSH DNS lookups

See http://developer.sugarcrm.com/2012/01/10...nse-times/ for the mysql DNS lookups
Reply

Logout Mark Read Team Forum Stats Members Help
Network issues with XBMC running on local MySQL DB0