14 November 2011

mdadm raid0: ext3 vs ext4

I did a little test, between the ext3 and ext4 writing speed, on an mdadm device. I’m documenting only the best/worst results. In both cases, best speed was obtained with the “64” chunk size. The worst one was obtained with chunk size “8”.
The test was done with 2 Western Digital VelociRaptor disks, 10k RPM, 150GB each.
ext3 - 8k
# dd if=/dev/zero of=/mnt/md0/test bs=1024 count=1M
1048576+0 records in
1048576+0 records out
1073741824 bytes (1.1 GB) copied, 2.10997 s, 509 MB/s
# dd if=/dev/zero of=/mnt/md0/test bs=1024 count=10M
10485760+0 records in
10485760+0 records out
10737418240 bytes (11 GB) copied, 50.8113 s, 211 MB/s

ext4 - 8k
# dd if=/dev/zero of=/mnt/md0/test bs=1024 count=1M
1048576+0 records in
1048576+0 records out
1073741824 bytes (1.1 GB) copied, 1.58119 s, 679 MB/s
# dd if=/dev/zero of=/mnt/md0/test bs=1024 count=10M
10485760+0 records in
10485760+0 records out
10737418240 bytes (11 GB) copied, 45.2483 s, 237 MB/s

ext3 - 64k
# dd if=/dev/zero of=./test bs=1024 count=1M
1048576+0 records in
1048576+0 records out
1073741824 bytes (1.1 GB) copied, 2.00814 s, 535 MB/s
# dd if=/dev/zero of=./test bs=1024 count=10M
10485760+0 records in
10485760+0 records out
10737418240 bytes (11 GB) copied, 50.9694 s, 211 MB/s

ext4 - 64k
# dd if=/dev/zero of=/mnt/md0/test bs=1024 count=1M
1048576+0 records in
1048576+0 records out
1073741824 bytes (1.1 GB) copied, 1.56012 s, 688 MB/s
# dd if=/dev/zero of=/mnt/md0/test bs=1024 count=10M
10485760+0 records in
10485760+0 records out
10737418240 bytes (11 GB) copied, 44.9892 s, 239 MB/s
To create the array I used the following command:
# mdadm --create /dev/md0 --chunk=SIZE --level=raid0 --raid-devices=2 /dev/sdb /dev/sdc

10 November 2011

error: utf8_mime2text() has new signature, but U8T_CANONICAL is missing. This should not happen. Check config.log for additional information.

If you get the following error message when trying to compile php with imap module, you need to install the imap-2007f package first.

Error message:
error: utf8_mime2text() has new signature, but U8T_CANONICAL is missing. This should not happen. Check config.log for additional information.
Fix/solution:
 wget ftp://ftp.cac.washington.edu/imap/imap-2007f.tar.gz
tar zxvf imap-2007f.tar.gz
cd imap-2007f
make
Then add the path to imap-2007f directory to your --with-imap directive.

error: security/pam_appl.h: No such file or directory

Full error message

`cat CCTYPE` -c `cat CFLAGS` `cat OSCFLAGS` -c osdep.c
osdep.c:89:31: error: security/pam_appl.h: No such file or directory
osdep.c:106: warning: 'struct pam_response' declared inside parameter list
osdep.c:106: warning: its scope is only this definition or declaration, which is probably not what you want
osdep.c:106: warning: 'struct pam_message' declared inside parameter list
osdep.c: In function 'checkpw_conv':
osdep.c:110: error: invalid application of 'sizeof' to incomplete type 'struct pam_response'
osdep.c:111: error: dereferencing pointer to incomplete type
osdep.c:112: error: 'PAM_PROMPT_ECHO_ON' undeclared (first use in this function)
osdep.c:112: error: (Each undeclared identifier is reported only once
osdep.c:112: error: for each function it appears in.)
osdep.c:113: error: invalid use of undefined type 'struct pam_response'
osdep.c:113: error: dereferencing pointer to incomplete type
osdep.c:113: error: 'PAM_SUCCESS' undeclared (first use in this function)
osdep.c:114: error: invalid use of undefined type 'struct pam_response'
osdep.c:114: error: dereferencing pointer to incomplete type
osdep.c:116: error: 'PAM_PROMPT_ECHO_OFF' undeclared (first use in this function)
osdep.c:117: error: invalid use of undefined type 'struct pam_response'
osdep.c:117: error: dereferencing pointer to incomplete type
osdep.c:118: error: invalid use of undefined type 'struct pam_response'
osdep.c:118: error: dereferencing pointer to incomplete type
osdep.c:120: error: 'PAM_TEXT_INFO' undeclared (first use in this function)
osdep.c:121: error: 'PAM_ERROR_MSG' undeclared (first use in this function)
osdep.c:122: error: invalid use of undefined type 'struct pam_response'
osdep.c:122: error: dereferencing pointer to incomplete type
osdep.c:123: error: invalid use of undefined type 'struct pam_response'
osdep.c:123: error: dereferencing pointer to incomplete type
osdep.c:127: error: 'PAM_CONV_ERR' undeclared (first use in this function)
osdep.c: At top level:
osdep.c:138: error: expected ')' before '*' token
osdep.c: In function 'checkpw':
osdep.c:155: error: 'pam_handle_t' undeclared (first use in this function)
osdep.c:155: error: 'hdl' undeclared (first use in this function)
osdep.c:156: error: storage size of 'conv' isn't known
osdep.c:164: error: 'PAM_SUCCESS' undeclared (first use in this function)
osdep.c:165: error: 'PAM_RHOST' undeclared (first use in this function)
osdep.c:168: error: 'PAM_ESTABLISH_CRED' undeclared (first use in this function)
osdep.c:184: error: 'checkpw_cleanup' undeclared (first use in this function)
make[3]: *** [osdep.o] Error 1
make[3]: Leaving directory `/home/kit/imap-2007f/c-client'
make[2]: *** [lnp] Error 2
make[2]: Leaving directory `/home/kit/imap-2007f/c-client'
make[1]: *** [OSTYPE] Error 2
make[1]: Leaving directory `/home/kit/imap-2007f'
make: *** [ldb] Error 2
Fix:
You're missing the pam dev files. In Debian use this command: 
# apt-get install libpam0g-dev