# SFTP performance in chroot and out



## Ikinoki (Oct 22, 2013)

Dear FreeBSD guys,

I've stumbled upon the following problem. The SFTP by root is real fast and no lag whatsoever happens.
SFTP by the user in chroot? Well the login is fast but the first action takes 1-5 minutes (like `cd` or `ls`).

Copying files? Well the speed goes from 3MB/sec to 300KB/sec in few seconds (root SFTP is constant 3MB/sec). I've already checked different OpenSSH versions (system and ports), already turned on HPN etc., TCP buffers, still no moves in the right direction.

Can anyone help me?


----------



## Ikinoki (Oct 22, 2013)

So I found it's rctl the reason for this (pcpu limit to 10%), for some reason 10% is not enough, thinking how to overcome this problem.


----------



## Ikinoki (Oct 22, 2013)

And there is no fix, as rctl limits cannot be ignored for particular group.


----------



## Ikinoki (Oct 22, 2013)

Probably can be circumvented by using jails. Gonna Going to try it out now


----------

