Categories
Linux

ftp vs. ftps performance data

In a previous entry Enabling ftps on vsftpd I showed how to turn on ftps in vsftpd. I have since did a little sample to see how this would affect cpu by turning on secure transfers. The results are odd, but I ran it twice and it is correct…

The ftp get script I used was a simple curl script that did 5 transfers and slept for 2 seconds then did another 5 transfers … etc .. for 10 loops, so a total of 50 transfers. I did this because i didnt want to flood the machine. This way the machine can take a break between transfers.

Here is the script:

#!/bin/bash

date
for i in $(seq 1 10)
do
        for i in $(seq 1 5)
        do
                curl -# -u ftptest:ftptest ftp://ftphost/10M.file > file
                #curl -# -u ftptest:ftptest ftp://ftphost/10M.file > file
                #curl –ftp-ssl-reqd –insecure -# -u ftptest:ftptest ftp://ftphost/1M.file > file
                #curl –ftp-ssl-reqd –insecure -# -u ftptest:ftptest ftp://ftphost/10M.file > file
        done
        sleep 2
done
date

And here are the results:

FTP 1M File – View image

FTPS 1M File – View image

FTP 10M File – View image

FTPS 10M File – View image

Categories
Linux

Enabling ftps on vsftpd

First you must generate a ssl certificate:

openssl req -new -x509 -nodes -out ftps.pem -keyout ftps.pem

Copy the ssl certificate to your vsftpd directory:

cp ftps.pem /etc/vsftpd

Add the following to vsftpd.conf:

ssl_enable=YES
rsa_cert_file=/etc/vsftpd/ftps.pem
force_local_data_ssl=NO

*Note ftps will only work with authenticated users, eg users with a valid account, not anonymous