LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Newbie (http://www.linuxquestions.org/questions/linux-newbie-8/)
-   -   Strange Performance Issues (http://www.linuxquestions.org/questions/linux-newbie-8/strange-performance-issues-759418/)

BarryCent 10-03-2009 10:00 AM

Strange Performance Issues
 
Hi everyone,

I have been messing with Linux for around 2 years now, but I primarily use Mac OS X which I recently switched to from using Windows for many years. I have mainly used Ubuntu and Gentoo, and have a small amount of experience in using them. I have just finished building a server using an old Xbox system with a 1TB Seagate HDD and Xebian 'Basic' installed natively.

Whilst setting up this server, transferring files, installing applications, etc. I noticed that the transfer speed had suddenly dropped to between ~1MB/sec and ~1.5MB/sec. Prior to this, after boot up and not much running, I was getting ~10MB/sec constantly for a good while, which I was more than satisfied with for the Xbox's 100Mbps connection.

I found that the only way to get the speeds back up to 10MB/sec was to reboot the server. After this, the speed would again be ~10MB/sec for a while, then ultimately drop down to ~1.5MB/sec again. I tried restarting ProFTPd, Samba, and just about anything I could think of that I had installed that might be utilising the network connection.

At first, I thought, "Maybe I'm expecting the Xbox to do a little too much, and so i tried not using the applications that I had installed, i.e. Samba, Transmission-Daemon, Kaid, TownkyMedia and MT-DAPPd, all apart from ProFTPd, as this is the only way I can see what speed I'm getting, however this wasnt the problem. I have tried running ProFTPd from inetd and as a standalone Daemon, which unfortunately made no difference.

So, if anyone has any ideas as to what could be making this happen, it would be greatly appreciated if you could let me know.

Please help!

Barry

wfh 10-03-2009 01:52 PM

Try issuing this command:

watch netstat -na

...you can end this with <ctrl>+c.

Do you see any "unexplained" network activity?

BarryCent 10-03-2009 05:10 PM

No, there doesn't seem to be anything out of the ordinary accessing the network, or any servers that I dont know of....
I had a chat with someone in #xbox-linux on IRC and they suggested it being the HDD, as I have it connected through a SATA to IDE converter, but I have had the original IDE HDD connected this evening, and the speed problem is still apparent, so, it's not the HDD or the converter either.
Tried different cable, different port of router, different connections, etc.
I might give GentooX a go if I'm feeling up to it tomorrow, or I might just scrap the idea of having the Xbox as a server, and build a server to my needs.
In the mean time, though, I would still appreciate it if any one can help with this, as it would be ideal if I could get it working correctly, with the current setup.
Thanks for your time,
Barry

wfh 10-03-2009 08:40 PM

ethtool -S eth0

...will tell you about ethernet statistics. Check them several times over the time period you notice the slowdown.

It is also possible that something that you are running has a memory leak. Try running this over time:

watch cat /proc/meminfo

If you have a memory leak, you will see memory disappearing.

BarryCent 10-04-2009 05:52 AM

You know what, I think it was either the HDD or the adaptor.

I swapped in the original HDD last night, and did a fresh install of Xebian, apps, etc. Then this morning, I started a download, set a few directories to scan in TwonkyMedia, started Kaid, etc. and I am getting ~8MB/sec, which seems pretty reasonable, considering I have all the apps I want, and more importantly, all the apps I had installed on the 1TB HDD running.

Come to think of it now, I'm not sure last night (when I first tried the original XBox HDD back in) whether I was testing the speed (iperf) over the WiFi or hardwired lol. In fact, I'm pretty damn sure it's why I wasn't getting full speed with the stock HDD. I'll see how it goes today: I'll leave it doing all sorts of stuff, to make sure sure, then if it's still going at full whack tonight, then it must have either been the HDD, or the adaptor, but I can't see it being the HDD, more the IDE adaptor, as the Xbox can be quite fussy :-).

@wfh: I'll give that a go as well over the course of today, so it should give me a bit more of an idea of the ethernet speeds, etc, but hopefully I've sussed it :-). Thanks again mate!

Barry

wfh 10-04-2009 10:08 AM

Any landing you can walk away from.... : )

BarryCent 10-04-2009 11:31 AM

Hmm, server has been running all day, and I'm currently getting ~4.5MB/sec now, even after reboot, and no extra programs running. Another FTP server on the network can be accessed at full 10MB/sec, but the main server won't.... Could this be the speed of the HDD that's now the bottleneck? wfh, what do you think?

I might try a fresh install again, just to confirm, but I think it will jump back up again :-(, thus confirming the HDD is ok. What seems strange though is the fact that I'm getting just over double what I was getting before on the 1TB HDD after it had been running for a while, but less than the other FTP server on the network, which is also an Xbox (so it's IDE and same specs, etc. but the difference being, that has a 250GB IDE HDD).

In the meantime, wfh, I'd appreciate your thoughts on my results.

Oh and BTW, iperf results are constantly 93.0 Mbits/sec no matter what I have running (and after a reboot, with nothing running) which I presume means the connection is ok? Or would that be affected by the HDD speed too?

Thanks for your time, and listening to me ramble on :-), I somehow feel we're slowly getting somewhere!

Barry

wfh 10-04-2009 01:29 PM

Is your eth0 set to Full Duplex? Half Duplex?

Do you see anything interesting in your output from ethtool?

BarryCent 10-04-2009 01:46 PM

Hi, no, there was nothing special, and the memory seems to be at a pretty much constant level (basically full, due it only having 64MB).

Im not sure about the duplex, tbh, I'm not sure how you set that in Linux, but all I know is that the router is reporting 100mbps, and the iperf reported 93mbps, so I'm guessing it is at full duplex??

I appreciate your time very much :-)

Barry

wfh 10-04-2009 06:03 PM

Always glad to help, Barry!

Rooth 10-05-2009 06:21 PM

One way you can eliminate the hard drive (and all things associated with it) is to do your ftp test or whatever to a memory-mapped filesystem. In some unixes, /tmp is part of swap and is memory mapped. In others, you need to set up a ramdisk specifically.

Alternatively, you can ftp a file on top of /dev/null, or "get /dev/zero". These pseudo-devices serve the same purpose as a ramdisk, you just won't be able to do any integrity checking, which could mess with some services that depend on such.

For some very simplistic unix-to-unix examples:
Code:

cat myfile | time ssh xbox "cat > /dev/null"
would work great. But:
Code:

time scp myfile user@xbox:/dev/null
might not work as great.


All times are GMT -5. The time now is 07:32 AM.