Linode Forum
Linode Community Forums
 FAQFAQ    SearchSearch    MembersMembers      Register Register 
 LoginLogin [ Anonymous ] 
Post new topic  Reply to topic
Author Message
PostPosted: Mon Oct 12, 2009 1:23 am 
Offline
Senior Member

Joined: Mon Oct 12, 2009 1:20 am
Posts: 50
I'm on a Linode 360, and found a little benchmark script that benchmark's disk speed among other things:

Start: 2009-10-12 00:15:30
Create a 1GB file.
00:15:30 up 23:54, 1 user, load average: 0.18, 0.57, 0.62

1048576000 bytes (1.0 GB) copied, 217.374 seconds, 4.8 MB/s

00:19:08 up 23:58, 2 users, load average: 2.03, 1.36, 0.92
gzip of 1GB file
real 92.42
md5sum of gzip 1GB file
real 11.40
End: 2009-10-12 00:20:53


Only 4.8 MB/s? Why so low? This is a stock CentOS install that is not very active at all as I have not moved the sites over to it yet.

Any ideas what's going on?

[rjones@server2 ~]$ uname -a
Linux server2.xxxxxx.com 2.6.18.8-linode19 #1 SMP Mon Aug 17 22:19:18 UTC 2009 i686 i686 i386 GNU/Linux


Top
   
 Post subject:
PostPosted: Mon Oct 12, 2009 11:06 am 
Offline
Senior Member

Joined: Fri Dec 07, 2007 1:37 am
Posts: 385
Location: NC, USA
IIRC there may be as many as 40 linodes on a 360 host, all sharing the same disks. I don't think 4.8M/s is unreasonable if you consider the probability that many other linodes are accessing the disk at the same time.


Top
   
PostPosted: Mon Oct 12, 2009 11:12 am 
Offline
Senior Member

Joined: Fri Dec 07, 2007 1:37 am
Posts: 385
Location: NC, USA
arjones85 wrote:
1048576000 bytes (1.0 GB) copied, 217.374 seconds, 4.8 MB/s

How exactly were you creating the file?


Top
   
 Post subject:
PostPosted: Mon Oct 12, 2009 11:32 am 
Offline
Senior Member

Joined: Mon Oct 12, 2009 1:20 am
Posts: 50
Just used dd.

Here's the script in its entirety:


#! /bin/sh
# Author: chriss
# Date: 2008/09/13
# Simple benchmarks

TFILE=./ddtmp
TFILEGZ=${TFILE}.gz
SRCFILE=/dev/urandom
NULL=/dev/null
GREPBIN=`which grep`
WBIN=`which w`
HEADBIN=`which head`
MD5SUMBIN=`which md5sum`
TAILBIN=`which tail`
GZIPBIN=`which gzip`
DDBIN=`which dd`
DATEBIN=`which date`
TEEBIN=`which tee`

# Quick sanity checks
if [ ! "$GREPBIN" ]; then
echo "Utility grep not found. Exiting."
exit 1
fi

if [ ! "$WBIN" ]; then
echo "Utility w not found. Exiting."
exit 1
fi

if [ ! "$HEADBIN" ]; then
echo "Utility head not found. Exiting."
exit 1
fi

if [ ! "$MD5SUMBIN" ]; then
echo "Utility md5sum not found. Exiting."
exit 1
fi

if [ ! "$TAILBIN" ]; then
echo "Utility tail not found. Exiting."
exit 1
fi

if [ ! "$GZIPBIN" ]; then
echo "Utility gzip not found. Exiting."
exit 1
fi

if [ ! "$DDBIN" ]; then
echo "Utility dd not found. Exiting."
exit 1
fi

if [ ! "$DATEBIN" ]; then
echo "Utility date not found. Exiting."
exit 1
fi

if [ ! "$TEEBIN" ]; then
echo "Utility tee not found. Exiting."
exit 1
fi

# Do a simple benchmark
LOGFILE="./${0}.`$DATEBIN +%Y%m%d%H%M%S`.log"
echo "Start: `$DATEBIN "+%Y-%m-%d %H:%M:%S"`" | $TEEBIN -a $LOGFILE
echo "Create a 1GB file." | $TEEBIN -a $LOGFILE
$WBIN | $HEADBIN -1 | $TEEBIN -a $LOGFILE
$DDBIN if=$SRCFILE of=$TFILE bs=1024 count=1024000 2>&1 | $TAILBIN -1 | $TEEBIN -a $LOGFILE
$WBIN | $HEADBIN -1 | $TEEBIN -a $LOGFILE
echo "gzip of 1GB file" | $TEEBIN -a $LOGFILE
{ time -p $GZIPBIN $TFILE 1>$NULL 2>&1 ; } 2>&1 | $GREPBIN real | $TEEBIN -a $LOGFILE
echo "md5sum of gzip 1GB file" | $TEEBIN -a $LOGFILE
{ time -p $MD5SUMBIN $TFILEGZ 1>$NULL 2>&1 ; } 2>&1 | $GREPBIN real | $TEEBIN -a $LOGFILE

rm $TFILEGZ

echo "End: `$DATEBIN "+%Y-%m-%d %H:%M:%S"`" | $TEEBIN -a $LOGFILE


Top
   
 Post subject:
PostPosted: Mon Oct 12, 2009 2:13 pm 
Offline
Senior Member
User avatar

Joined: Fri Oct 24, 2003 3:51 pm
Posts: 965
Location: Netherlands
I tried your script on two Linodes, a 360 and a 540.

360
Code:
Start: 2009-10-12 19:36:35
Create a 1GB file.
 19:36:35 up 98 days, 23:55,  3 users,  load average: 0.00, 0.05, 0.09
1048576000 bytes (1.0 GB) copied, 219.067 s, 4.8 MB/s
 19:40:14 up 98 days, 23:59,  3 users,  load average: 1.54, 0.69, 0.33

540
Code:
Start: 2009-10-12 18:00:24
Create a 1GB file.
 18:00:24 up 5 min,  2 users,  load average: 0.00, 0.00, 0.00
1048576000 bytes (1.0 GB) copied, 145.728 s, 7.2 MB/s
 18:02:50 up 7 min,  2 users,  load average: 1.47, 0.64, 0.24

Looks as if Stever may be right - in this rather limited test, the rate of disk I/O was definitely better with less 'nodes on the host. Does anyone with a bigger Linode have time to do the test?

_________________
/ Peter


Top
   
 Post subject:
PostPosted: Mon Oct 12, 2009 3:29 pm 
Offline
Senior Member

Joined: Fri Dec 07, 2007 1:37 am
Posts: 385
Location: NC, USA
arjones85 wrote:
SRCFILE=/dev/urandom
(...)
$DDBIN if=$SRCFILE of=$TFILE bs=1024 count=1024000 2>&1 |

I think you will find that /dev/urandom is the speed limiting factor in this test. Quite a few CPU cycles go into reading from that device.


Top
   
 Post subject:
PostPosted: Tue Oct 13, 2009 11:18 am 
Offline
Senior Member
User avatar

Joined: Tue May 26, 2009 3:29 pm
Posts: 1691
Location: Montreal, QC
Indeed, /dev/zero is probably what you want to use for disk benchmarks.


Top
   
 Post subject:
PostPosted: Tue Oct 13, 2009 11:41 am 
Offline
Senior Member
User avatar

Joined: Fri Oct 24, 2003 3:51 pm
Posts: 965
Location: Netherlands
Stever - you're correct - I just checked the script for 'naughties' before I ran it, didn't give much thought to what it was using as it's input.

Guzpaz - yep - using /dev/zero pumps the disk I/O rate up to 30.6 MB/s on a 360.

_________________
/ Peter


Top
   
 Post subject:
PostPosted: Tue Oct 13, 2009 4:00 pm 
Offline
Senior Member

Joined: Thu Oct 08, 2009 5:07 pm
Posts: 99
This command may be of interest to benchmark your disk speed:

hdparm -tT /dev/xvda


Top
   
Display posts from previous:  Sort by  
Post new topic  Reply to topic


Who is online

Users browsing this forum: No registered users and 0 guests


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum

Search for:
Jump to:  
RSS

Powered by phpBB® Forum Software © phpBB Group