Dariush Debian Diary

About

Diariusz Dariusza

index | rss1.0

Categories

Archives

Valid XHTML 1.1 | Valid CSS
powered by blosxom.

2011-11-18

Converting KVM disk from qcow2 to lvm volume


# file *dsk
sth.dsk: QEMU QCOW Image (v2), 69793218560 bytes

lvcreate  -L69793218560b -n w732 dt

# time qemu-img convert sth.dsk -O raw /dev/dt/w732

real    23m9.403s
user    0m3.130s
sys     1m11.530s

And replace driver info from qcow2 to raw:
    <emulator>/usr/bin/kvm</emulator>
    <disk type='file' device='disk'>
      <driver name='qemu' type='raw'/>
      <source file='/dev/dt/w732'/>
      <target dev='vda' bus='virtio'/>

2011-11-10

OpenSSL misc

                  sign    verify    sign/s verify/s
rsa  512 bits 0.000241s 0.000019s   4145.7  51455.6
rsa 1024 bits 0.001090s 0.000052s    917.6  19256.4
rsa 2048 bits 0.006173s 0.000167s    162.0   5997.7
rsa 4096 bits 0.039819s 0.000579s     25.1   1727.3
                  sign    verify    sign/s verify/s
dsa  512 bits 0.000190s 0.000219s   5250.9   4573.5
dsa 1024 bits 0.000510s 0.000601s   1960.4   1662.9
dsa 2048 bits 0.001641s 0.001968s    609.3    508.1

2011-10-12

svnadmin obliterate

aka svnadmin dump|svndumpfilter exclude | svnadmin restore

2011-09-16

Improving update performance of munin with rrdcached: munin 1.4

  • apt-get install rrdcched
  • modify /etc/default/rrdcached
    #OPTS=""
    OPTS="-s munin -l unix:/var/run/rrdcached.sock -j /var/lib/rrdcached/journal/ -F -b /var/lib/munin/ -B"
    
  • chown -R munin.munin /var/lib/rrdcached
  • add
    export RRDCACHED_ADDRESS=/var/run/rrdcached.sock
    
    to /usr/bin/munin-cron

2011-09-06

Errors compiling redhat6 kernel with openvz (circa 2011-09):

fs/buffer.c: In function '__set_page_dirty':
fs/buffer.c:685: error: implicit declaration of function 'ub_io_account_dirty'
make[2]: *** [fs/buffer.o] Error 1
make[2]: *** Waiting for unfinished jobs....
fs/direct-io.c: In function 'submit_page_section':
fs/direct-io.c:701: error: implicit declaration of function 'virtinfo_notifier_call'
fs/direct-io.c:701: error: 'VITYPE_IO' undeclared (first use in this function)
fs/direct-io.c:701: error: (Each undeclared identifier is reported only once
fs/direct-io.c:701: error: for each function it appears in.)
fs/direct-io.c:701: error: 'VIRTINFO_IO_PREPARE' undeclared (first use in this function)
make[2]: *** [fs/direct-io.o] Error 1
make[1]: *** [fs] Error 2




In file included from arch/x86/mm/fault.c:14:
include/linux/hugetlb.h: In function 'hstate_inode':
include/linux/hugetlb.h:255: error: implicit declaration of function 'HUGETLBFS_SB'
include/linux/hugetlb.h:255: warning: assignment makes pointer from integer without a cast
include/linux/hugetlb.h:256: error: dereferencing pointer to incomplete type
make[3]: *** [arch/x86/mm/fault.o] Error 1
make[2]: *** [arch/x86/mm] Error 2
make[1]: *** [arch/x86] Error 2




In file included from kernel/sched.c:2394:
kernel/sched_autogroup.c: In function 'autogroup_move_group':
kernel/sched_autogroup.c:145: error: expected 'while' before 'while_each_thread'
In file included from kernel/sched.c:2396:
kernel/sched_debug.c: In function 'print_cfs_rq':
kernel/sched_debug.c:180: error: implicit declaration of function 'task_group_path'
kernel/sched_debug.c:180: warning: format '%s' expects type 'char *', but argument 4 has type 'int'
kernel/sched_debug.c:180: warning: format '%s' expects type 'char *', but argument 3 has type 'int'
kernel/sched_debug.c: In function 'print_rt_rq':
kernel/sched_debug.c:227: warning: format '%s' expects type 'char *', but argument 4 has type 'int'
kernel/sched_debug.c:227: warning: format '%s' expects type 'char *', but argument 3 has type 'int'
make[2]: *** [kernel/sched.o] Error 1
make[1]: *** [kernel] Error 2



In file included from kernel/sched.c:2394:
kernel/sched_autogroup.c: In function 'autogroup_move_group':
kernel/sched_autogroup.c:145: error: expected 'while' before 'while_each_thread'
make[2]: *** [kernel/sched.o] Error 1
make[1]: *** [kernel] Error 2
make[1]: Leaving directory `/home/eyck/l/vz/linux-2.6.32'



mm/page-writeback.c: In function 'balance_dirty_pages':
mm/page-writeback.c:495: error: implicit declaration of function 'get_io_ub'
mm/page-writeback.c:495: warning: initialization makes pointer from integer without a cast
mm/page-writeback.c:507: error: implicit declaration of function 'ub_dirty_limits'
mm/page-writeback.c:510: error: implicit declaration of function 'ub_dirty_pages'
mm/page-writeback.c: In function 'balance_dirty_pages_ratelimited_nr':
mm/page-writeback.c:669: error: invalid type argument of '->' (have 'int')
mm/page-writeback.c: In function 'write_cache_pages':
mm/page-writeback.c:966: error: implicit declaration of function 'virtinfo_notifier_call'
mm/page-writeback.c:966: error: 'VITYPE_IO' undeclared (first use in this function)
mm/page-writeback.c:966: error: (Each undeclared identifier is reported only once
mm/page-writeback.c:966: error: for each function it appears in.)
mm/page-writeback.c:966: error: 'VIRTINFO_IO_PREPARE' undeclared (first use in this function)
mm/page-writeback.c: In function '__set_page_dirty_nobuffers':
mm/page-writeback.c:1199: error: implicit declaration of function 'ub_io_account_dirty'
mm/page-writeback.c: In function 'test_set_page_writeback':
mm/page-writeback.c:1414: error: implicit declaration of function 'ub_io_account_clean'
make[2]: *** [mm/page-writeback.o] Error 1
make[1]: *** [mm] Error 2

2011-07-22

lighttpd 417 - Expectation Failed

417 - Expectation Failed Fix with 1.4.29 and:
server.reject-expect-100-with-417       =       "disable"

2011-05-04

Restoring iPhone 3G bricked by 'Erase all data and settings' command

Symptoms: Gray apple.
* Press Home and Power simultanously
* keep on holding then both until reboot, and then until iTunes logo appears
* when iTunes logo appears, you can restore using iTunes

2011-04-26

Xeon 5504 openssl speed

processor       : 3
vendor_id       : GenuineIntel
cpu family      : 6
model           : 26
model name      : Intel(R) Xeon(R) CPU           E5504  @ 2.00GHz
stepping        : 5
cpu MHz         : 2000.248
cache size      : 4096 KB
physical id     : 1
siblings        : 4
core id         : 3
cpu cores       : 4
apicid          : 22
initial apicid  : 22
fpu             : yes
fpu_exception   : yes
cpuid level     : 11
wp              : yes
flags           : fpu vme de pse tsc msr pae mce cx8 apic sep mtrr pge mca cmov pat pse36 clflush dts acpi mmx fxsr sse sse2 ss ht tm pbe syscall nx rdtscp lm constant_tsc arch_perfmon pebs bts rep_good nopl xtopology nonstop_tsc aperfmperf pni dtes64 monitor ds_cpl vmx est tm2 ssse3 cx16 xtpr pdcm dca sse4_1 sse4_2 popcnt lahf_lm dts tpr_shadow vnmi flexpriority ept vpid
bogomips        : 4000.06
clflush size    : 64
cache_alignment : 64
address sizes   : 40 bits physical, 48 bits virtual
power management:
                  sign    verify    sign/s verify/s
rsa  512 bits 0.000149s 0.000014s   6697.8  70744.8
rsa 1024 bits 0.000736s 0.000040s   1358.6  24757.7
rsa 2048 bits 0.004563s 0.000138s    219.1   7255.5
rsa 4096 bits 0.032323s 0.000514s     30.9   1945.3
                  sign    verify    sign/s verify/s
dsa  512 bits 0.000148s 0.000155s   6777.9   6453.2
dsa 1024 bits 0.000389s 0.000433s   2567.8   2308.9
dsa 2048 bits 0.001334s 0.001554s    749.5    643.7


2011-04-25

OpenSSL x2 240

                  sign    verify    sign/s verify/s
rsa  512 bits 0.000092s 0.000008s  10821.6 128076.1
rsa 1024 bits 0.000443s 0.000024s   2258.1  42234.8
rsa 2048 bits 0.002806s 0.000078s    356.4  12891.2
rsa 4096 bits 0.018835s 0.000288s     53.1   3474.3
                  sign    verify    sign/s verify/s
dsa  512 bits 0.000094s 0.000092s  10595.9  10893.5
dsa 1024 bits 0.000245s 0.000270s   4082.2   3699.3
dsa 2048 bits 0.000774s 0.000912s   1291.3   1096.0

                              sign    verify    sign/s verify/s
 160 bit ecdsa (secp160r1)   0.0001s   0.0003s  11888.9   3005.8
 192 bit ecdsa (nistp192)   0.0002s   0.0007s   6576.5   1432.0
 224 bit ecdsa (nistp224)   0.0002s   0.0009s   5542.7   1150.9
 256 bit ecdsa (nistp256)   0.0002s   0.0012s   4247.6    849.9
 384 bit ecdsa (nistp384)   0.0004s   0.0024s   2290.1    422.4
 521 bit ecdsa (nistp521)   0.0006s   0.0032s   1708.6    313.2
 163 bit ecdsa (nistk163)   0.0007s   0.0014s   1412.4    702.1
 233 bit ecdsa (nistk233)   0.0014s   0.0020s    735.9    508.8
 283 bit ecdsa (nistk283)   0.0021s   0.0043s    466.9    230.8
 409 bit ecdsa (nistk409)   0.0046s   0.0092s    216.3    108.4
 571 bit ecdsa (nistk571)   0.0098s   0.0201s    102.5     49.8
 163 bit ecdsa (nistb163)   0.0007s   0.0015s   1413.9    666.6
 233 bit ecdsa (nistb233)   0.0014s   0.0021s    732.0    484.5
 283 bit ecdsa (nistb283)   0.0022s   0.0048s    464.1    210.4
 409 bit ecdsa (nistb409)   0.0046s   0.0102s    215.8     97.7
 571 bit ecdsa (nistb571)   0.0098s   0.0225s    102.4     44.5
                              op      op/s
 160 bit ecdh (secp160r1)   0.0003s   3565.2
 192 bit ecdh (nistp192)   0.0006s   1645.1
 224 bit ecdh (nistp224)   0.0007s   1390.0
 256 bit ecdh (nistp256)   0.0009s   1062.3
 384 bit ecdh (nistp384)   0.0020s    512.1
 521 bit ecdh (nistp521)   0.0027s    364.9
 163 bit ecdh (nistk163)   0.0007s   1443.3
 233 bit ecdh (nistk233)   0.0010s   1048.0
 283 bit ecdh (nistk283)   0.0021s    471.0
 409 bit ecdh (nistk409)   0.0046s    217.4
 571 bit ecdh (nistk571)   0.0101s     99.5
 163 bit ecdh (nistb163)   0.0007s   1357.3
 233 bit ecdh (nistb233)   0.0010s    983.7
 283 bit ecdh (nistb283)   0.0023s    426.3
 409 bit ecdh (nistb409)   0.0051s    195.1
 571 bit ecdh (nistb571)   0.0112s     89.4

system type		: Atheros AR7161 rev 2 (0xaa)
processor		: 0
cpu model		: MIPS 24Kc V7.4
BogoMIPS		: 452.19
CPUClock		: 680
wait instruction	: yes
type             16 bytes     64 bytes    256 bytes   1024 bytes   2048 bytes   4096 bytes
md2                  0.00         0.00         0.00         0.00         0.00         0.00 
mdc2                 0.00         0.00         0.00         0.00         0.00         0.00 
md4               2690.62k     9568.67k    28872.58k    57073.79k    68634.89k    76556.45k
md5               1957.65k     6777.88k    19627.55k    37589.86k    44424.30k    48701.17k
hmac(md5)         3081.21k    10112.77k    25890.65k    42331.61k    47517.02k    50516.88k
sha1              1577.70k     4253.62k     8586.05k    11678.17k    12423.38k    12657.87k
rmd160               0.00         0.00         0.00         0.00         0.00         0.00 
rc4              31092.64k    33531.51k    34211.10k    34840.03k    34409.16k    34465.50k
des cbc           4829.40k     5023.18k     5074.11k     5092.67k     5130.45k     5157.62k
des ede3          1800.32k     1812.47k     1824.82k     1822.51k     1833.45k     1823.96k
idea cbc             0.00         0.00         0.00         0.00         0.00         0.00 
seed cbc             0.00         0.00         0.00         0.00         0.00         0.00 
rc2 cbc           5596.88k     5871.08k     5858.27k     5948.57k     5953.00k     5958.44k
rc5-32/12 cbc        0.00         0.00         0.00         0.00         0.00         0.00 
blowfish cbc      9935.93k    10805.89k    10945.39k    10917.97k    10928.94k    11143.90k
cast cbc          9802.56k    10720.70k    10900.05k    11021.49k    10965.42k    11053.39k
aes-128 cbc       7607.35k     8349.16k     8539.85k     8567.81k     8626.68k     8487.13k
aes-192 cbc       6679.84k     7226.38k     7371.17k     7376.22k     7434.86k     7382.39k
aes-256 cbc       5944.75k     6374.01k     6537.08k     6532.91k     6521.99k     6524.74k
aes-512 cbc       5281.51k     5674.97k     5842.31k     5813.78k     5850.73k     5907.75k
camellia-128 cbc        0.00         0.00         0.00         0.00         0.00         0.00 
camellia-192 cbc        0.00         0.00         0.00         0.00         0.00         0.00 
camellia-256 cbc        0.00         0.00         0.00         0.00         0.00         0.00 
sha256            1617.90k     3638.60k     6447.92k     7979.54k     8317.50k     8414.04k
sha512             586.00k     2337.34k     3490.02k     4812.45k     5161.23k     5304.11k
aes-128 ige       7518.71k     8671.41k     8899.87k     8983.02k     9024.99k     9036.11k
aes-192 ige       6645.77k     7408.33k     7582.17k     7705.08k     7664.33k     7700.20k
aes-256 ige       5956.64k     6558.96k     6706.59k     6753.47k     6727.75k     6741.68k
aes-512 ige       5364.39k     5832.42k     5942.46k     5999.68k     5985.25k     5996.93k
rsa  512 bits 0.004883s 0.000408s    204.8   2452.2
rsa 1024 bits 0.025232s 0.001236s     39.6    809.0
rsa 2048 bits 0.152121s 0.004204s      6.6    237.9
rsa 4096 bits 1.018333s 0.015202s      1.0     65.8
dsa  512 bits 0.004108s 0.004873s    243.4    205.2
dsa 1024 bits 0.012386s 0.014743s     80.7     67.8
dsa 2048 bits 0.041356s 0.050521s     24.2     19.8

2011-04-03

openssl i7 M620

                  sign    verify    sign/s verify/s
rsa  512 bits 0.000095s 0.000009s  10482.5 113667.2
rsa 1024 bits 0.000469s 0.000026s   2132.5  39183.7
rsa 2048 bits 0.002875s 0.000085s    347.8  11714.1
rsa 4096 bits 0.020347s 0.000319s     49.1   3137.0
                  sign    verify    sign/s verify/s
dsa  512 bits 0.000092s 0.000096s  10923.1  10417.9
dsa 1024 bits 0.000242s 0.000293s   4137.6   3417.3
dsa 2048 bits 0.000829s 0.000990s   1206.8   1010.3

2011-02-26

bzip2 versus xz --extreme

205M    app.log.2011-02-14.bz2
92M     app.log.2011-02-14.xz

119M    app.log.2011-02-13.bz2
54M     app.log.2011-02-13.xz

149M    app.log.2011-02-12.bz2
70M     app.log.2011-02-12.xz

209M    app.log.2011-02-11.bz2
96M     app.log.2011-02-11.xz

320M    app.log.2011-02-10.bz2
146M    app.log.2011-02-10.xz

openssl speed Opteron 6174

                  sign    verify    sign/s verify/s
rsa  512 bits 0.000135s 0.000012s   7405.8  83012.7
rsa 1024 bits 0.000593s 0.000037s   1685.5  26901.0
rsa 2048 bits 0.004291s 0.000114s    233.0   8754.4
rsa 4096 bits 0.028732s 0.000516s     34.8   1936.6
                  sign    verify    sign/s verify/s
dsa  512 bits 0.000154s 0.000169s   6486.2   5930.2
dsa 1024 bits 0.000370s 0.000398s   2702.3   2514.5
dsa 2048 bits 0.001123s 0.001201s    890.3    832.7

2011-01-20

PowerTOP Limbo - How Low Can You Go?

  1. Samsung NF310, no Xorg, 1366x768, RAMdisk, 2.6.36, display OFF = 3.6W
  2. Samsung NF310, no Xorg, 1366x768, RAMdisk, 2.6.36 = 5.0W
  3. Samsung NF310, no Xorg, RAMdisk, 2.6.36, display OFF, charging N900 via USB = 6.0W
  4. Compaq 6910P, no Xorg, no wifi = 12.2W

2011-01-17

Samsung NF310 on Debian/Linux

    Required tweaks:
  • Xorg autodetection with 2.6.37 ( with 2.6.35 only vesa @1024x768 works correctly ) ( 1366x768, +XVideo )
  • WiFi - brcm80211 driver, available from staging in 2.6.37 ( alternatives exist for older kernels )
  • backlight - requires samsung driver and restart ( available for example from deb http://ppa.launchpad.net/voria/ppa/ubuntu maverick main)
  • /proc/easy_slow_down_manager
    Out of the box:
  • suspend/resume
  • ethernet eth0
  • webcam (?) @ 640x480
Power usage: 7.8W - 11.8W