User avatar
davity
Posts: 9
Joined: Sun Jun 24, 2012 11:28 pm

Experiencing slow response with Raspbian 2012-09-18

Sat Oct 06, 2012 5:57 pm

Hi

After some months without time to "play" with my raspy, yesterday I downloaded the last raspbian image from raspberrypi main site and installed it in substitution to my old debian 2012-4-19.
In a first moment I was very happy about the performance of the system and also the new configuration tool (overclock, locale set, etc), in general it runs faster than my old debian. But I noticed some lag at using the system, like some micro-hangs when writting at console. I have never experienced this with my old debian and it wasn't very serious.

The real problem started when I set up an openssh server and a mumble server (voip server). When I connect to raspi from my main computer it tooks more than 5 seconds to the system to ask me for my passphrase (I'm using a public key auth) after I gave it the user, wich is a considerable retardment considering that two computers are at the same LAN network. With my old debian it was almost instant, no noticeable lag at all. Again, I didn't consider it very serious, just some seconds lost. Then I try to make a connection with my mumble server. It took more than 15 seconds after I pressed the Connect button until it finally connected to the server. Even the creation of a new channel at the server took several seconds to show the new channel. Again, in my old Debian everything works like lightning.

I thought that it could be some weird problem with my network, so I connect my raspi to my monitor and installed a mumble client in local. But the problem still remains in a local environment: it tooks more than 15 seconds to connect to a local server.
Apart of that initial connection time, everything works fine, I can chat with 5 people in server without problem or noticeable lag.

I don't know what could be going on. I tried to overclock to 800MHz using the raspi-conf but everythinway. I have installed just the mumble server, openssh server and a noip server to use a domain (problems shows after and before install noip server). Top don't show any process taking 100% of the cpu or something.

Someone knows what can be going on? Some idea? I know that it's a very weird problem, but it was working well with my old Debian! I appreciate any help you can give me :)

Regards

David

EDIT: I have setup a proftp server and it took more than 6 seconds to connect to server, so the problem is not only with mumble or openssh.

broo0ose
Posts: 318
Joined: Wed Dec 14, 2011 3:59 pm
Location: Wirral, UK

Re: Experiencing slow response with Raspbian 2012-09-18

Sat Oct 06, 2012 7:37 pm

I'm not saying this is all of your problem but ssh sessions can be slow to start because the server does a DNS lookup of the client. This is an SSH thing, nothing to do with the Pi.

you can speed it up by adding the clients name and ip address to /etc/hosts

fivdi
Posts: 388
Joined: Sun Sep 23, 2012 8:09 pm
Contact: Website

Re: Experiencing slow response with Raspbian 2012-09-18

Sat Oct 06, 2012 7:56 pm

I've also noticed the "micro-hangs" when using a SSH console. You're typing away normally and the console freezes for a few seconds. Then everything turns back to normal. I've seen it a few times since updating to 2012-09-18-wheezy-raspbian in combination with turbo mode.

User avatar
davity
Posts: 9
Joined: Sun Jun 24, 2012 11:28 pm

Re: Experiencing slow response with Raspbian 2012-09-18

Sat Oct 06, 2012 8:26 pm

broo0ose wrote:I'm not saying this is all of your problem but ssh sessions can be slow to start because the server does a DNS lookup of the client. This is an SSH thing, nothing to do with the Pi.

you can speed it up by adding the clients name and ip address to /etc/hosts
I will try but, ftp makes a DNS lookup too? the problem is the same with both of them.
fivdi wrote:I've also noticed the "micro-hangs" when using a SSH console. You're typing away normally and the console freezes for a few seconds. Then everything turns back to normal. I've seen it a few times since updating to 2012-09-18-wheezy-raspbian in combination with turbo mode.
I notice that "micro-hangs" too under the same conditions (ssh and raspbian 2012-09-18. Also in local mode (with screen and keyboard connected to pi) I notice a tiny hangs in console and some key repetition very often, didn't notice it with debian 2012-4-19.

milhouse
Posts: 642
Joined: Mon Jan 16, 2012 12:59 pm

Re: Experiencing slow response with Raspbian 2012-09-18

Sat Oct 06, 2012 8:42 pm

fivdi wrote:I've also noticed the "micro-hangs" when using a SSH console. You're typing away normally and the console freezes for a few seconds. Then everything turns back to normal. I've seen it a few times since updating to 2012-09-18-wheezy-raspbian in combination with turbo mode.
Have you checked your syslog for mention of "kevent 2 may have been dropped" and out of memory (OOM) tracebacks? I had an OOM situation (running Logitech Media Server, Sickbeard and Transmission) that manifested itself as "freezes" of several seconds (between 5 and 10 seconds) while the Pi sorted itself out. I fixed it by increasing the minimum free memory in /etc/sysctl.conf from vm.min_free_kbytes=8192 (8MB) to vm.min_free_kbytes=16384 (16MB) and now the Pi runs absolutely fine - no OOM problems and no freezes.

Hangs of much shorter duration are likely to be something else, maybe dropped USB packets.

fivdi
Posts: 388
Joined: Sun Sep 23, 2012 8:09 pm
Contact: Website

Re: Experiencing slow response with Raspbian 2012-09-18

Sat Oct 06, 2012 9:20 pm

There's no mention of either of these in the syslog. I'll check it directly after it happens the next time. It doesn't happen very often.

@davity: does your syslog mention anything?

User avatar
davity
Posts: 9
Joined: Sun Jun 24, 2012 11:28 pm

Re: Experiencing slow response with Raspbian 2012-09-18

Sat Oct 06, 2012 9:29 pm

There's no mention to any kevent in my /var/log/syslog, just some error wich says

Code: Select all

raspberrypi kernel: [14836.466063] The scan_unevictable_pages sysctl/node-interface has been disabled for lack of a legitimate use case.  If you have one, please send an email to linux-mm@kvack.org.
But should be fortuite, because I can't repeat it.

I tried to open some ftp and ssh connection but any error appear at syslog.

EDIT: I tried to make the same change at sysctl but still several seconds to connect to anything and no error in syslog

User avatar
davity
Posts: 9
Joined: Sun Jun 24, 2012 11:28 pm

Re: Experiencing slow response with Raspbian 2012-09-18

Mon Oct 08, 2012 12:25 pm

After change the systcl memory I've observed smoother movement of mouse at desktop, very pleasant now, don't get stucked randomly.

On the other side, I've observed a considerable lag when a user login. System ask for user, and then several seconds to ask for password. After that, another several seconds to get the prompt.
I've also watched with wireshark a standar ftp connection with the pi, but no mass retransmisions noticed, so it should be some internal raspbian problem.

After try overclock to 1GHz, I notice a improve in general system performance (loading, web wrowsing, etc) but not at all the problems related before.

jnd
Posts: 18
Joined: Thu Aug 02, 2012 12:32 am

Re: Experiencing slow response with Raspbian 2012-09-18

Mon Oct 08, 2012 4:09 pm

I noticed the ssh prompt delay few weeks ago, I update regularly but the problem still remains. I have no idea why it is like that but on Arch in works instantly as it should on any system.

Testa
Posts: 3
Joined: Fri Nov 30, 2012 3:27 am

Re: Experiencing slow response with Raspbian 2012-09-18

Fri Nov 30, 2012 3:38 am

I had that problem to.
:idea: My solution:
$ sudo dphys-swapfile swapoff
$ sudo update-rc.d -f dphys-swapfile remove
$ echo 0 > /proc/sys/vm/swappiness

/etc/sysctl.conf
vm.swappiness = 0

:P

Riccardo90
Posts: 14
Joined: Sun Jun 17, 2012 5:55 pm
Location: IT

Re: Experiencing slow response with Raspbian 2012-09-18

Sun Dec 02, 2012 11:42 am

after some weeks of brainstorming i've found the solution for the slow mumble server... the problem was the most obvious: slow SD card!! i tried to put the mumble database in a temporary ram partition, now it works flawlessly. I'm writing a script that mounts tmpfs on boot and backup the database on shutdown, it still needs some minor improvement
... sorry for my crappy english

User avatar
davity
Posts: 9
Joined: Sun Jun 24, 2012 11:28 pm

Re: Experiencing slow response with Raspbian 2012-09-18

Sun Dec 02, 2012 8:34 pm

Testa wrote:I had that problem to.
:idea: My solution:
$ sudo dphys-swapfile swapoff
$ sudo update-rc.d -f dphys-swapfile remove
$ echo 0 > /proc/sys/vm/swappiness

/etc/sysctl.conf
vm.swappiness = 0

:P
I will try that.
After some research some time ago I ended up with Riccardo90 solution (asking in mumble IRC), so for the moment it run fine.

Riccardo90, I included a call to the mount script in the mumble-server file at /etc/init.d, so I assure that it will be mount in order everytime. It's a bit sloppy, but it works very well :)

Riccardo90
Posts: 14
Joined: Sun Jun 17, 2012 5:55 pm
Location: IT

Re: Experiencing slow response with Raspbian 2012-09-18

Sun Dec 02, 2012 11:33 pm

this is my script
http://pastebin.com/99d1QEt0

i'm using it on my raspi, if you want to try it just paste it in a file and chmod +x and read carefully the comments!


"sudo script.sh start" will mount and populate tmpfs
"sudo script.sh stop" will dump the database and unmount tmpfs
... sorry for my crappy english

Return to “Troubleshooting”