You are not logged in.

#1 2009-10-26 01:30:56

bodyhead
Member
Registered: 2009-10-25
Posts: 6

sshd unpredictible because of hardware malfuntion [solved]

I use to run Ubuntu server and everything worked like I would expect but now that I'm running Arch, my sshd won't connect when doing intensive things.

Here's my example:
I had a ton of user files on my machine before updating to Arch.  On my old machine, I logged in via ssh and copied over 120ish gigs of files to a network share.  I did this via screen and copied with a verbose output so I could dial in while I'm on the move and check on my copying process.  The machine only had a 10/100 network port so this took a little less then a day and I was able to check it from several different locations all day long. 

I installed Arch.  Because of all the problems I had installing, I wiped out the entire hard drive.  This morning I sshed into the machine to copy all of the files back on the drive (also using screen and verbose output) but after initiating the copy, my ssh session died and I can no longer log back in via ssh.  I can bring up the local console on the machine.

The only other things I have installed besides the sshd is ushare and screen. 

Is there some way I can tell the machine to prioritize the sshd process? 

The only real difference in the setup is that I use to use a 2.5 gig swap file and now I use a 1 gig swap.  There is a gig of ram in the machine.

Last edited by bodyhead (2009-10-27 20:22:20)

Offline

#2 2009-10-26 01:57:31

keenerd
Package Maintainer (PM)
Registered: 2007-02-22
Posts: 647
Website

Re: sshd unpredictible because of hardware malfuntion [solved]

Use nice or renice on the sshd process.  The easiest would be to add a renice line to your rc.local.  See the man pages for more.

Enable traffic shaping so there is always some bandwidth available for ssh.  Example:
http://luxik.cdi.cz/~devik/qos/htb/manual/userg.htm

edit:  That is really old.  Here are two slightly newer projects:
http://tcng.sourceforge.net/
http://htb-tools.skydevel.ro/e107_plugi … content.11

Last edited by keenerd (2009-10-26 02:07:28)

Offline

#3 2009-10-26 01:59:58

bimbo
Member
Registered: 2005-08-12
Posts: 22

Re: sshd unpredictible because of hardware malfuntion [solved]

No need to prioritize sshd, you need to tell the server to stay alive even if client is idle. You do that by setting the "ServerAliveInterval" directive to something big (e.g. 3600) in /etc/ssh/ssh_config (global) or under ~/.ssh/config (local) in your client machine. The "ServerAliveCountMax" directive might be useful too. Check the man page for ssh_config for more information.

Last edited by bimbo (2009-10-26 02:01:57)

Offline

#4 2009-10-26 02:09:43

keenerd
Package Maintainer (PM)
Registered: 2007-02-22
Posts: 647
Website

Re: sshd unpredictible because of hardware malfuntion [solved]

bimbo wrote:

No need to prioritize sshd, you need to tell the server to stay alive even if client is idle.

If that were the case, he would have been able to log back in.  It sounds more like bandwidth starvation.  Hence traffic shaping.

Offline

#5 2009-10-26 02:48:29

bodyhead
Member
Registered: 2009-10-25
Posts: 6

Re: sshd unpredictible because of hardware malfuntion [solved]

keenerd,
I already have some external traffic shaping in effect.  I've got a qos (via tomato) on my network running with ssh prioritized to (highest).  Are you saying that I need to enable a qos on the arch box itself?  Is that what those two projects you linked to do?

I'm thinking that you are right on the bandwidth starvation because when I try to connect while this huge transfer is in process, I get the message
ssh: connect to host 192.168.2.20 port 22: Operation timed out

Are there any packages on pacman that would allow me to install something like what I'll need to make this work properly?

---------update: added question------------

What about this?  What if I was to install a gigabit Ethernet card into the machine?  Would that solve any of my bandwith issues?  What if I continued to use both cards on the same subnet but only pointed to one of them for access to the sshd via port forwarding in my router setup?  Wouldn't this solve a bandwidth starvation problem?

I would want different things to run through different interfaces.  Is there some way to achieve this?

I would have two cards in the machine.  One would be 10/100, the other would be 10/100/1000

----------update: the problem came back--------

This problem came back and I realized that I was experiencing the error found here: http://wiki.archlinux.org/index.php/Con … ling_issue

I followed the instructions and disabled window scaling and got everything running again.

I would want all internet activity to come across the 10/100 card.  This would include:
elinks browser
sshd
rtorrent for occasional linux image download

On the 10/100/1000 card, I would want all file transfers to my internal network and my ushare server.  (Is it possible to specify which eth device a share is mounted through?)

I think this would solve my bandwidth problems.  What do you guys think?

--------------update: on my issue----------------

I attempted to connect via SSH from the server itself to 127.0.0.1 and was able to connect with no issue so I'd say it's almost definitely a bandwidth issue.  Maybe something is wrong with my network card or drivers?

--------------quick fix----------------------------

I'm going to install another network card and bond them and see if that is a quick fix for my problem.

As found here:
http://wiki.archlinux.org/index.php/Con … rk#Bonding

On further research, I'm thinking this (on the motherboard) built in network card might have a some issues.  I'm going to try to put two different pci network cards in the machine and bond them together.

------------update----------------

I installed two new network cards (both 10/100 although maybe eventually I'll upgrade to 10/100/100), and bonded them together.  Now I get great speeds and am able to successfully ssh in while huge transfers are happening.   

Everything appears to be working great.  This issue is solved. 

(I think the bandwidth was a problem because of an actual hardware malfunction in my build in network card and only a handful of the packets were reaching their destinations successfully)

Thanks for the ideas guys.  Yall helped me get things up and running again.


-----------update problem came back-----------
I found that I'm the victim of the following error http://wiki.archlinux.org/index.php/Con … ling_issue

I disabled scaling and everything seems to work again.

Last edited by bodyhead (2009-10-28 21:59:16)

Offline

Board footer

Powered by FluxBB