Nie jesteś zalogowany.
Jeśli nie posiadasz konta, zarejestruj je już teraz! Pozwoli Ci ono w pełni korzystać z naszego serwisu. Spamerom dziękujemy!

Ogłoszenie

Prosimy o pomoc dla małej Julki — przekaż 1% podatku na Fundacji Dzieciom zdazyć z Pomocą.
Więcej informacji na dug.net.pl/pomagamy/.

#1  2014-04-15 18:12:01

  lewyx84 - Użytkownik

lewyx84
Użytkownik
Zarejestrowany: 2013-10-29

Format dysku KVM a wydajność

Czołem,
tworząc maszynki wirtualne mamy zazwyczaj  do wyboru zarówno format dysku, jak i opcje cache.

Do testów uzyłem maszyny z dyskiem twardym 50 G, 4G ram, dysk w formacie RAW:

1) RAW -> cache=none:

Kod:

root@test:~ # diskinfo -c /dev/vtbd0
/dev/vtbd0
        512             # sectorsize
        53687091200     # mediasize in bytes (50G)
        104857600       # mediasize in sectors
        0               # stripesize
        0               # stripeoffset
        104025          # Cylinders according to firmware.
        16              # Heads according to firmware.
        63              # Sectors according to firmware.
                        # Disk ident.

I/O command overhead:
        time to read 10MB block      0.085699 sec       =    0.004 msec/sector
        time to read 20480 sectors  12.162316 sec       =    0.594 msec/sector
        calculated command overhead                     =    0.590 msec/sector




root@test:~ # diskinfo -t /dev/vtbd0
/dev/vtbd0
        512             # sectorsize
        53687091200     # mediasize in bytes (50G)
        104857600       # mediasize in sectors
        0               # stripesize
        0               # stripeoffset
        104025          # Cylinders according to firmware.
        16              # Heads according to firmware.
        63              # Sectors according to firmware.
                        # Disk ident.

Seek times:
        Full stroke:      250 iter in   0.090048 sec =    0.360 msec
        Half stroke:      250 iter in   0.103293 sec =    0.413 msec
        Quarter stroke:   500 iter in   0.970505 sec =    1.941 msec
        Short forward:    400 iter in   0.549123 sec =    1.373 msec
        Short backward:   400 iter in   1.195440 sec =    2.989 msec
        Seq outer:       2048 iter in   0.879379 sec =    0.429 msec
        Seq inner:       2048 iter in   0.876517 sec =    0.428 msec
Transfer rates:
        outside:       102400 kbytes in   0.794245 sec =   128927 kbytes/sec
        middle:        102400 kbytes in   0.502954 sec =   203597 kbytes/sec
        inside:        102400 kbytes in   0.262135 sec =   390638 kbytes/sec

2) RAW -> cache=writethrough:

Kod:

root@test:~ # diskinfo -c /dev/vtbd0
/dev/vtbd0
        512             # sectorsize
        53687091200     # mediasize in bytes (50G)
        104857600       # mediasize in sectors
        0               # stripesize
        0               # stripeoffset
        104025          # Cylinders according to firmware.
        16              # Heads according to firmware.
        63              # Sectors according to firmware.
                        # Disk ident.

I/O command overhead:
        time to read 10MB block      0.059608 sec       =    0.003 msec/sector
        time to read 20480 sectors   5.189635 sec       =    0.253 msec/sector
        calculated command overhead                     =    0.250 msec/sector

root@test:~ # diskinfo -t /dev/vtbd0
/dev/vtbd0
        512             # sectorsize
        53687091200     # mediasize in bytes (50G)
        104857600       # mediasize in sectors
        0               # stripesize
        0               # stripeoffset
        104025          # Cylinders according to firmware.
        16              # Heads according to firmware.
        63              # Sectors according to firmware.
                        # Disk ident.

Seek times:
        Full stroke:      250 iter in   0.117120 sec =    0.468 msec
        Half stroke:      250 iter in   0.038454 sec =    0.154 msec
        Quarter stroke:   500 iter in   0.270352 sec =    0.541 msec
        Short forward:    400 iter in   0.411616 sec =    1.029 msec
        Short backward:   400 iter in   0.737363 sec =    1.843 msec
        Seq outer:       2048 iter in   0.479056 sec =    0.234 msec
        Seq inner:       2048 iter in   0.460345 sec =    0.225 msec
Transfer rates:
        outside:       102400 kbytes in   0.252984 sec =   404769 kbytes/sec
        middle:        102400 kbytes in   0.295906 sec =   346056 kbytes/sec
        inside:        102400 kbytes in   0.194296 sec =   527031 kbytes/sec

Testowałem jeszcze writeback, ale wypada troszkę gorzej niż writethrough, więc nie wklejałem.
Czy ktoś z Was, robił może podobne testy, ale na QCOW2? Z tego co wiem, jest mniej wydajny, aniżeli RAW ale wg pewnego poradnika, QCOW2 z opcją

Kod:

-o preallocation=metadata

i wyłączonym cachem, bije na łeb RAW z opcją cache=writethrough

Pzdr

Lewy

Offline

 

#2  2014-04-15 18:40:21

  drelbrown - Użytkownik

drelbrown
Użytkownik
Zarejestrowany: 2013-01-07

Re: Format dysku KVM a wydajność

[offtop]
Skąd można pobrać narzędzie [tt][b]diskinfo[/b][/tt]? W repo tego nie widzę.
[/offtop]

Offline

 

#3  2014-04-15 18:45:44

  lewyx84 - Użytkownik

lewyx84
Użytkownik
Zarejestrowany: 2013-10-29

Re: Format dysku KVM a wydajność

Testowałem na FreeBSD, tam jest w systemie, nie wiem jak w Debianie

Offline

 

Stopka forum

Powered by PunBB
© Copyright 2002–2005 Rickard Andersson
To nie jest tylko forum, to nasza mała ojczyzna ;-)

[ Generated in 0.007 seconds, 11 queries executed ]

Informacje debugowania

Time (s) Query
0.00010 SET CHARSET latin2
0.00007 SET NAMES latin2
0.00061 SELECT u.*, g.*, o.logged FROM punbb_users AS u INNER JOIN punbb_groups AS g ON u.group_id=g.g_id LEFT JOIN punbb_online AS o ON o.ident='18.117.145.67' WHERE u.id=1
0.00153 REPLACE INTO punbb_online (user_id, ident, logged) VALUES(1, '18.117.145.67', 1733053751)
0.00024 SELECT * FROM punbb_online WHERE logged<1733053451
0.00049 SELECT topic_id FROM punbb_posts WHERE id=263423
0.00027 SELECT id FROM punbb_posts WHERE topic_id=25619 ORDER BY posted
0.00080 SELECT t.subject, t.closed, t.num_replies, t.sticky, f.id AS forum_id, f.forum_name, f.moderators, fp.post_replies, 0 FROM punbb_topics AS t INNER JOIN punbb_forums AS f ON f.id=t.forum_id LEFT JOIN punbb_forum_perms AS fp ON (fp.forum_id=f.id AND fp.group_id=3) WHERE (fp.read_forum IS NULL OR fp.read_forum=1) AND t.id=25619 AND t.moved_to IS NULL
0.00030 SELECT search_for, replace_with FROM punbb_censoring
0.00048 SELECT u.email, u.title, u.url, u.location, u.use_avatar, u.signature, u.email_setting, u.num_posts, u.registered, u.admin_note, p.id, p.poster AS username, p.poster_id, p.poster_ip, p.poster_email, p.message, p.hide_smilies, p.posted, p.edited, p.edited_by, g.g_id, g.g_user_title, o.user_id AS is_online FROM punbb_posts AS p INNER JOIN punbb_users AS u ON u.id=p.poster_id INNER JOIN punbb_groups AS g ON g.g_id=u.group_id LEFT JOIN punbb_online AS o ON (o.user_id=u.id AND o.user_id!=1 AND o.idle=0) WHERE p.topic_id=25619 ORDER BY p.id LIMIT 0,25
0.00104 UPDATE punbb_topics SET num_views=num_views+1 WHERE id=25619
Total query time: 0.00593 s