Load Testing FTP with JMeter

I needed to test a ProFTP server to ensure that it could cope with 200 simultaneous users. The relevant lines in /etc/proftpd.conf to control this are:

MaxInstances                    30
MaxClientsPerHost               20 "Only %m connections per host allowed"
MaxClients                      20 "Only %m total simultaneous logins allowed"

I followed the excellent instructions here for creating a Test Plan for FTP. I wanted to use hundreds of unique users and it is painfully slow adding users one by one. So I scripted XML output from a user database and manually amended the the JMX file. Each user connection details is stored in XML as follows:

<FTPSampler guiclass="FtpTestSamplerGui" testclass="FTPSampler" testname="theusername" enabled="true">
<stringProp name="FTPSampler.server"></stringProp>
<stringProp name="FTPSampler.port"></stringProp>
<stringProp name="FTPSampler.filename">/httpdocs/index.html</stringProp>
<stringProp name="FTPSampler.localfilename"></stringProp>
<stringProp name="FTPSampler.inputdata"></stringProp>
<boolProp name="FTPSampler.binarymode">false</boolProp>
<boolProp name="FTPSampler.saveresponse">false</boolProp>
<boolProp name="FTPSampler.upload">false</boolProp>
<stringProp name="ConfigTestElement.username">theusername</stringProp>
<stringProp name="ConfigTestElement.password">thepassword</stringProp>
</FTPSampler>
<hashTree/>
JMeter FTP

When I pushed the number of users up (250) beyond the MaxInstances value (230) in proftpd.conf

Selection_093
I started to see failures in the results table:
FTP.jmx (-home-jonny-Dropbox-scripts-jmeter-FTP.jmx) - Apache JMeter (2.8.20130705)_092

As an alternative I had also created a script calling LFTP for a few hundred test users as follows:

lftp -u $HOSTING_USER,$HOSTING_PASS -e "ls httpdocs; quit" theserver.tld.uk

 

This provided a useful simple alternative to JMeter.

 

Leave a Reply

  • (will not be published)

XHTML: You can use these tags: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <s> <strike> <strong>