It's simple command for transfer a large number of small files over ssh.
You need to first go to directory, if you want to copy content of directory.
cd /var/www
tar cpf - ./ | ssh <user>@<dest_ip> "tar xpf - -C /var/www"
Preview speed copy with pv:
tar cpf - ./ | pv | ssh <user>@<dest_ip> "tar xpf - -C /var/www"
Method using rsync - https://gist.github.com/KartikTalwar/4393116