Philosophy : To compare the performance under heavy load on the MTA[Mail Transferring Agent]s.
Test method : Comparing by trying to send 1000 mails at instant by using a script and monitoring the load during the time.
Testing Steps:
1 ) Prepare a script to send out mails at large number,say 1000.
Script[loadtester.sh] :
#!/bin/bash
# script to send simple email
# email subject
SUBJECT="SET-EMAIL-SUBJECT"
# Email To ?
EMAIL="test@scalix.poornam.com"
# Email text/message
EMAILMESSAGE="/tmp/emailmessage.txt"
echo "This is an email message test"> $EMAILMESSAGE
echo "This is email text" >>$EMAILMESSAGE
# send an email using /bin/mail,in this case 1000
for((i=0;i<1000 i="" span="">
do
/bin/mail -s "$SUBJECT" "$EMAIL" < $EMAILMESSAGE;
done
Next Step : chmod a+x loadtester
Explanation : This script will send 1000 mails using the MTA in the system.
2) We need to monitor load in the system while sending messages.
Script [loadmonitor.sh] :
#!/bin/bash
while true
do
date >> /tmp/load.txt;
/usr/bin/w >> /tmp/load.txt&
pid=$!
sleep 20
kill -SIGKILL $pid
done
Next Step: chmod a+x loadmonitor
cp -p loadmonitor /usrr/local/bin/
Explanation: Monitor the load in the system using 'w' command and append the result to 'load.txt' for reference.
3) Configure cron to run every seconds so that delay configured at load monitoring script execute load checking at interval of 20 seconds.
Adding cron entry: crontab -e
Append the line below to the file shown in the default editor in the system
* * * * * /usr/local/bin/loadmonitor
You can change the MTAs and run script to find out the load using different agents. Don't forget to attach the Antivirus/Spamassasin/Mailman and other dependent softwares which also affect the performance of MTAs.
1000>
Test method : Comparing by trying to send 1000 mails at instant by using a script and monitoring the load during the time.
Testing Steps:
1 ) Prepare a script to send out mails at large number,say 1000.
Script[loadtester.sh] :
#!/bin/bash
# script to send simple email
# email subject
SUBJECT="SET-EMAIL-SUBJECT"
# Email To ?
EMAIL="test@scalix.poornam.com"
# Email text/message
EMAILMESSAGE="/tmp/emailmessage.txt"
echo "This is an email message test"> $EMAILMESSAGE
echo "This is email text" >>$EMAILMESSAGE
# send an email using /bin/mail,in this case 1000
for((i=0;i<1000 i="" span="">
do
/bin/mail -s "$SUBJECT" "$EMAIL" < $EMAILMESSAGE;
done
Next Step : chmod a+x loadtester
Explanation : This script will send 1000 mails using the MTA in the system.
2) We need to monitor load in the system while sending messages.
Script [loadmonitor.sh] :
#!/bin/bash
while true
do
date >> /tmp/load.txt;
/usr/bin/w >> /tmp/load.txt&
pid=$!
sleep 20
kill -SIGKILL $pid
done
Next Step: chmod a+x loadmonitor
cp -p loadmonitor /usrr/local/bin/
Explanation: Monitor the load in the system using 'w' command and append the result to 'load.txt' for reference.
3) Configure cron to run every seconds so that delay configured at load monitoring script execute load checking at interval of 20 seconds.
Adding cron entry: crontab -e
Append the line below to the file shown in the default editor in the system
* * * * * /usr/local/bin/loadmonitor
You can change the MTAs and run script to find out the load using different agents. Don't forget to attach the Antivirus/Spamassasin/Mailman and other dependent softwares which also affect the performance of MTAs.
1000>