[Botan-devel] Small file ciphering speed

Mr Diggilin mr.diggilin at gmail.com
Fri Sep 26 04:30:30 EDT 2008


(some bad assumptions regarding your letter follow, see paragraph
before /cpu/procinfo)

I made a couple of mistakes and was a little unclear in my last email.
When I said "1mpbs", what I meant was 1 megabyte, not megabit. Same
goes for the 3mpbs given for eax encryption. Also, I wasn't clear on the
distinction between the different things I was doing. The less than 1
megabyte per second was my (apparently incorrect) calculation as to the
speed I got running your row_encryptor. The 3 megabytes per second was
for the 200 megabyte file.

I compiled the attachment you gave this time without issue, and got a
total runtime (with the unix "time") of 2.5 seconds. Spitting out the
time at intervals, I get the following:
.339 ms Creation of rows loop
.932 ms Encryption loop
.963 ms Decryption loop

The data creation being changed to be the current "i" value, I
calculated the total data to be 2,044,480 bytes (10 * 1 byte, 90 * 2
bytes, 900 * 3 bytes, 9000 * 4 bytes, 5000 * 5 bytes, multiplied by 32).
If I got that right, that would be 15.6 megabits or almost 2 megabytes.
Considering that the encryption and decryption are both almost 1 second,
that's about 2 megabytes per second, or about 16 megabits per second.
Since the input data is different than last time (I believe it's more),
I would be interested to know what the difference is between my 2.5
second runtime and the slower test machine you used on the previous
row_encryptor. 

I also ran your large file (210 MB) test case and got:
real    0m39.214s
user    0m36.578s
sys     0m2.160s

What that means to me is about 5.35 megabytes per second or 42.8
megabits.
220,200,960 bytes / 39.214 seconds = 5,615,365.94 bytes per second.
5,615,365.94 bytes is ~5.35 megabytes, or 42.8 megabits.

At this point in writing this email, it struck me that despite your
writing Mb/s, you meant MB/s, which means that my computer is indeed as
slow as I thought. Nonetheless, I'm short on time, and the math is
right, so I'll leave it. If I find the time later today, I'll compile
botan from source and try again.

/proc/cpuinfo on my 32 bit Core Duo gives me:

processor	: 0
vendor_id	: GenuineIntel
cpu family	: 6
model		: 14
model name	: Genuine Intel(R) CPU           T2600  @ 2.16GHz
stepping	: 8
cpu MHz		: 1000.000
cache size	: 2048 KB
physical id	: 0
siblings	: 2
core id		: 0
cpu cores	: 2
fdiv_bug	: no
hlt_bug		: no
f00f_bug	: no
coma_bug	: no
fpu		: yes
fpu_exception	: yes
cpuid level	: 10
wp		: yes
flags		: fpu vme de pse tsc msr pae mce cx8 apic sep mtrr pge mca cmov
pat clflush dts acpi mmx fxsr sse sse2 ss ht tm pbe nx constant_tsc
arch_perfmon bts pni monitor vmx est tm2 xtpr
bogomips	: 4336.57
clflush size	: 64

processor	: 1
vendor_id	: GenuineIntel
cpu family	: 6
model		: 14
model name	: Genuine Intel(R) CPU           T2600  @ 2.16GHz
stepping	: 8
cpu MHz		: 1000.000
cache size	: 2048 KB
physical id	: 0
siblings	: 2
core id		: 1
cpu cores	: 2
fdiv_bug	: no
hlt_bug		: no
f00f_bug	: no
coma_bug	: no
fpu		: yes
fpu_exception	: yes
cpuid level	: 10
wp		: yes
flags		: fpu vme de pse tsc msr pae mce cx8 apic sep mtrr pge mca cmov
pat clflush dts acpi mmx fxsr sse sse2 ss ht tm pbe nx constant_tsc
arch_perfmon bts pni monitor vmx est tm2 xtpr
bogomips	: 4330.13
clflush size	: 64




More information about the botan-devel mailing list