Projects Publications Resume Contact About Youtube |
|
User/Kernel | OS Version | CPU | Throughput (MB/s) |
user process | CentOS 5.1 | Intel Celeron 2.5GHz 32bit | 47 |
user process | RHEL 5 | Intel Celeron 2.5GHz 32bit | 47 |
user process | RHEL5LSPP3 TTC 1.3.4 | Intel Celeron 2.5GHz 32bit | 47 |
kernel module | CentOS 5.1 2.6.18-53.el5 | Intel Celeron 2.5GHz 32bit | 44 |
kernel module | CentOS 5.1 2.6.18-92.1.13.el5 | Intel Celeron 2.5GHz 32bit | 44 |
kernel module | RHEL5LSPP3 TTC 1.3.4 2.6.18-8.1.3.lspp.el5.tcs.12 |
Intel Celeron 2.5GHz 32bit | 44 |
User/Kernel | OS Version | CPU | Throughput (MB/s) |
user process | CentOS 5.1 2.6.26.5 | Intel Celeron 2.5GHz 32bit | 47 |
kernel module | CentOS 5.1 nearly stock 2.6.26.5 | Intel Celeron 2.5GHz 32bit | 44 | kernel module | CentOS 5.1 customized 2.6.26.5 | Intel Celeron 2.5GHz 32bit | 51 |
Nearly Stock 2.6.26.5 | Customized 2.6.26.5 |
< CONFIG_CC_OPTIMIZE_FOR_SIZE=y < CONFIG_KALLSYMS_ALL=y < CONFIG_KPROBES=y < CONFIG_KRETPROBES=y < # CONFIG_DEFAULT_DEADLINE is not set < CONFIG_DEFAULT_CFQ=y < CONFIG_DEFAULT_IOSCHED="cfq" < # CONFIG_PREEMPT_NONE is not set < CONFIG_PREEMPT_VOLUNTARY=y < CONFIG_ENABLE_WARN_DEPRECATED=y < CONFIG_MAGIC_SYSRQ=y < CONFIG_UNUSED_SYMBOLS=y < CONFIG_DEBUG_KERNEL=y < CONFIG_DETECT_SOFTLOCKUP=y < CONFIG_TIMER_STATS=y < CONFIG_DEBUG_STACKOVERFLOW=y < # many config_debug settings < # have been removed from this list |
> # changing the optimization had minimal effect > # CONFIG_CC_OPTIMIZE_FOR_SIZE is not set > # CONFIG_KPROBES is not set > # changing I/O scheduler had no effect > CONFIG_DEFAULT_DEADLINE=y > # CONFIG_DEFAULT_CFQ is not set > CONFIG_DEFAULT_IOSCHED="deadline" > # changing preemption had no effect > CONFIG_PREEMPT_NONE=y > # CONFIG_PREEMPT_VOLUNTARY is not set > # CONFIG_ENABLE_WARN_DEPRECATED is not set > # CONFIG_MAGIC_SYSRQ is not set > # CONFIG_UNUSED_SYMBOLS is not set > # removing all kernel debugging and hacking > # had a huge effect on performance > # CONFIG_DEBUG_KERNEL is not set |
User/Kernel | OS Version | CPU | Throughput (MB/s) |
user process | CentOS 5.1 2.6.26.5 | Intel Xeon 3GHz 64bit | 86 |
kernel module | CentOS 5.1 nearly stock 2.6.26.5 | Intel Xeon 3GHz 64bit | 68 | kernel module | CentOS 5.1 customized 2.6.26.5 | Intel Xeon 3GHz 64bit | 90 |
User Process | Kernel Module |
//set start time time(&starttime); //encrypt buffer 1 million times with the same key for(i=0; i < 1000000; i++){ //perform aes-256-CBC on 512 bytes at a time using the same iv for(aes_cbcoffset=0;aes_cbcoffset<bufsize/512;aes_cbcoffset++){ memcpy(aes_ivec,aes_ivec2,AES_BLOCK_SIZE); AES_cbc_encrypt(buf+aes_cbcoffset*512,buf+aes_cbcoffset*512, 512,&(aes_encryptionkeyschedule),aes_ivec,AES_ENCRYPT); } } //print first char of cyphertext version printf("buf: %c\n",buf[0]); //decrypt buffer 1 million times with the same key for(i=0; i < 1000000; i++){ //perform aes-256-CBC on 512 bytes at a time using the same iv for(aes_cbcoffset=0;aes_cbcoffset<bufsize/512;aes_cbcoffset++){ memcpy(aes_ivec,aes_ivec2,AES_BLOCK_SIZE); AES_cbc_encrypt(buf+aes_cbcoffset*512,buf+aes_cbcoffset*512, 512,&(aes_decryptionkeyschedule),aes_ivec,AES_DECRYPT); } } //print plaintext version, which matches the original printf("buf: %s\n",buf); //determine end time and calculate stats time(&endtime); printf("elapsed: %d\n",endtime-starttime); printf("MB/s: %d\n",(2*bufsize)/(endtime-starttime)); |
//set start time starttime = current_kernel_time(); //encrypt buffer 1 million times with the same key for(i=0; i < 1000000; i++){ //perform aes-256-CBC on 512 bytes at a time using the same iv for(aes_cbcoffset=0;aes_cbcoffset<bufsize/512;aes_cbcoffset++){ memcpy(aes_ivec,aes_ivec2,AES_BLOCK_SIZE); AES_cbc_encrypt(buf+aes_cbcoffset*512,buf+aes_cbcoffset*512, 512,&(aes_encryptionkeyschedule),aes_ivec,AES_ENCRYPT); } if(i%1000==0) schedule();//don't hog the cpu } //print first char of cyphertext version printk("buf: %c\n",buf[0]); //decrypt buffer 1 million times with the same key for(i=0; i < 1000000; i++){ //perform aes-256-CBC on 512 bytes at a time using the same iv for(aes_cbcoffset=0;aes_cbcoffset<bufsize/512;aes_cbcoffset++){ memcpy(aes_ivec,aes_ivec2,AES_BLOCK_SIZE); AES_cbc_encrypt(buf+aes_cbcoffset*512,buf+aes_cbcoffset*512, 512,&(aes_decryptionkeyschedule),aes_ivec,AES_DECRYPT); } if(i%1000==0) schedule();//don't hog the cpu } //print plaintext version, which matches the original printk("buf: %s\n",buf); //determine end time and calculate stats endtime = current_kernel_time(); printk("elapsed: %d\n",endtime.tv_sec-starttime.tv_sec); printk("MB/s: %d\n",(2*bufsize)/(endtime.tv_sec-starttime.tv_sec)); |