SSH is intermittently slow (BBB running Ubuntu 13.04 shell)

To preface this, I’m new to Linux - I picked up a BBB largely to learn more about Linux, networking, web servers, etc. Anyways, here’s my setup: BBB flashed with Ubuntu 13.04 shell. I’m using this wifi dongle, which Ubuntu supports natively which was nice.

So it’s connected to my wifi at home, meaning I can SSH in from any device on the same network. Sometimes, it connects quickly and feels seemless; othertimes it’s super slow, with like a 5-10 second delay on each keystroke. I’ve noticed that it can be very quick, then after rebooting the BBB, it will be slow. I’ve tried different things like connecting the wifi dongle directly vs using a usb hub, leaving the external case on or off, and I can’t seem to find a pattern.

I’m not sure if this is normal behavior or not. Should I just chalk this up to random network inconsistency? I’m guessing that if the BBB has a poor wifi signal, that will result in slower SSH right? Maybe there’s a linux command I can use to check the BBB’s connection speed over wifi. Any thoughts/help would be greatly appreciated - thanks.

This could be because of the power management of wifi.
Try to disable the power management feature on the wifi adapter.

sudo iwconfig wlan0 power off

(replace wlan0 with the name of your adapter)

This might heat up your wifi adopter.

To verify if this works out, ping any host before and after
disabling power management.

Are you using USB hub with external power or directly connecting
the wifi adapter to the BBB board ?

iwlist scan
iwconfig wlan0
iwconfig wlan0 | grep -i --color quality
watch -n 1 cat /proc/net/wireless

cat /proc/net/wireless

Some times, when the signal is poor from my note ssh is very slow as you said.
It start (first +-3 minutes) wifi start as max, with pass time the sign get low. It is normal.



This could be because of the power management of wifi.
Try to disable the power management feature on the wifi adapter.

sudo iwconfig wlan0 power off

(replace wlan0 with the name of your adapter)

This might heat up your wifi adopter.

To verify if this works out, ping any host before and after
disabling power management.

Are you using USB hub with external power or directly connecting
the wifi adapter to the BBB board ?

Same problem here, tried

sudo iwconfig wlan0 power off

but i get

SET failed on device wlan0 ; Operation not permitted.

??

You were right about it being a power issue. I turned off power management on my wireless and my signal quality remains high and my SSH connection is fast. Thanks!

Just a note, this did not work on the BBB:

sudo iwconfig wlan0 power off

I get “SET failed on device wlan0 ; Operation not permitted.” So, a found a solution over at askubuntu, which was to create an empty wireless hook under /etc/pm/sleep.d by using this command.

sudo touch /etc/pm/sleep.d/wireless

Do that, then reboot, and wireless should remain high. I’m not sure if I need to worry about heat issues though. At the end of the day, this will be running a web server, so ideally I would want to write a script that keeps the power management on while no requests are coming in, and turns it off when they are.

Thanks again!