Showing posts with label zfs. Show all posts
Showing posts with label zfs. Show all posts
Thursday, July 27, 2017
Wednesday, January 7, 2015
ZFS arc size (ram kullanımı) sınırlandırılması
Platform
ZFSonlinux - OEL 6.5 x86_64Konfigurasyon
ZFS ayar değişiklikleri için düzenlemeler /etc/modprobe.d/zfs.conf dosyası üzerinde yapılmalıdır.vi /etc/modprobe.d/zfs.conf
options zfs zfs_arc_max=8589934592 |
Değişikliğin aktif olması için sistem yeniden başlatılmalıdır.
# reboot |
Mevcut ARC size kullanımının gözlemlenmesi
arcstat.py zfsonlinux kurulu sistemlerde bulunmaktadır.[root@localhost ~]# arcstat.py 1 5 time read miss miss% dmis dm% pmis pm% mmis mm% arcsz c10:46:52 0 0 0 0 0 0 0 0 0 0 100M10:46:53 0 0 0 0 0 0 0 0 0 0 100M10:46:54 0 0 0 0 0 0 0 0 0 0 100M10:46:55 0 0 0 0 0 0 0 0 0 0 100M10:46:56 0 0 0 0 0 0 0 0 0 0 100M |
Konfigurasyonda kullanılabilecek tüm parametreler
Kullanılabilecek parametreler aşağıda sıralanmıştır. Ayarlarla ilgili değişiklik yapılmadan önce http://docs.oracle.com/cd/E26502_01/html/E29022/chapterzfs-1.html#scrolltoc dökümanından faydalanılmalıdır.cd /sys/module/zfs/parameters[root@bursa parameters]# ls -1l2arc_feed_againl2arc_feed_min_msl2arc_feed_secsl2arc_headrooml2arc_headroom_boostl2arc_nocompressl2arc_noprefetchl2arc_norwl2arc_write_boostl2arc_write_maxmetaslab_debug_loadmetaslab_debug_unloadspa_asize_inflationspa_config_pathzfetch_array_rd_szzfetch_block_capzfetch_max_streamszfetch_min_sec_reapzfs_arc_grow_retryzfs_arc_maxzfs_arc_memory_throttle_disablezfs_arc_meta_limitzfs_arc_meta_prunezfs_arc_minzfs_arc_min_prefetch_lifespanzfs_arc_p_aggressive_disablezfs_arc_p_dampener_disablezfs_arc_shrink_shiftzfs_autoimport_disablezfs_dbuf_state_indexzfs_deadman_enabledzfs_deadman_synctime_mszfs_dedup_prefetchzfs_delay_min_dirty_percentzfs_delay_scalezfs_dirty_data_maxzfs_dirty_data_max_maxzfs_dirty_data_max_max_percentzfs_dirty_data_max_percentzfs_dirty_data_synczfs_disable_dup_evictionzfs_expire_snapshotzfs_flagszfs_free_min_time_mszfs_immediate_write_szzfs_mdcomp_disablezfs_nocacheflushzfs_nopwrite_enabledzfs_no_scrub_iozfs_no_scrub_prefetchzfs_pd_blks_maxzfs_prefetch_disablezfs_read_chunk_sizezfs_read_historyzfs_read_history_hitszfs_recoverzfs_resilver_delayzfs_resilver_min_time_mszfs_scan_idlezfs_scan_min_time_mszfs_scrub_delayzfs_send_corrupt_datazfs_sync_pass_deferred_freezfs_sync_pass_dont_compresszfs_sync_pass_rewritezfs_top_maxinflightzfs_txg_historyzfs_txg_timeoutzfs_vdev_aggregation_limitzfs_vdev_async_read_max_activezfs_vdev_async_read_min_activezfs_vdev_async_write_active_max_dirty_percentzfs_vdev_async_write_active_min_dirty_percentzfs_vdev_async_write_max_activezfs_vdev_async_write_min_activezfs_vdev_cache_bshiftzfs_vdev_cache_maxzfs_vdev_cache_sizezfs_vdev_max_activezfs_vdev_mirror_switch_uszfs_vdev_read_gap_limitzfs_vdev_schedulerzfs_vdev_scrub_max_activezfs_vdev_scrub_min_activezfs_vdev_sync_read_max_activezfs_vdev_sync_read_min_activezfs_vdev_sync_write_max_activezfs_vdev_sync_write_min_activezfs_vdev_write_gap_limitzfs_zevent_colszfs_zevent_consolezfs_zevent_len_maxzil_replay_disablezil_slog_limitzio_bulk_flagszio_delay_maxzio_injection_enabledzio_requeue_io_start_cut_in_linezvol_inhibit_devzvol_majorzvol_max_discard_blockszvol_threads |
Saturday, December 20, 2014
Adım adım ZFS operasyonları
zpool komutu ile yeni disk için pool oluşturma
Yeni takılan diski zfs ile kullanmak için pool oluşturulmalıdır.
işlem 1
zpool create tank1 /dev/da3
zfs komutu ile pool içinde mountpoint özelliğini ayarlayarak yeni filesystem oluşturma işlemi aşağıdaki şekilde gerçekleşti.
işlem 2
zfs create -o mountpoint=/opt/output tank1/opt_output
zfs filesystem properties
zfs tercih etmemin en önemli iki nedeni filesystem ekle/çıkar işlemlerini ve ek olarak yarattığınız farklı filesystem'lere ait farklı özellikleri kolayca yönetebilmek.
Örnek olarak mountpoint özelliği ile dosya sistemimizin hangi yola bağlanacağı bilgisini aşağıdaki şekilde değiştirebiliyoruz.
Varsayılan olarak mountpoint /tank1 olarak ayarlandı. Değiştirmek için:
okantest:~# test> zfs get mountpoint tank1
NAME PROPERTY VALUE SOURCE
tank1 mountpoint /tank1 default
işlem 3
okantest:~# test> zfs set mountpoint=/opt/tank1 tank1
filesystem e özel değiştirebileceğiniz özellik listesini
zfs get all tank1
komutu ile alabilirsiniz.
Sık olarak değiştirdiğim zfs dosya sistemi özellikler (zfs filesystem properties ) şunlar:
zfs compression test results
Strength&Type Time Size Comments
off/assorted 56.157s 660M
zle/assorted 58.859s 608M some gain, small cost
lzjb/assorted 56.919s 490M fair gain, small cost
on/assorted 58.168s 496M =lzjb
gzip-1/assorted 69.715s 376M Significant gains, increased cost
gzip-2/assorted 69.416s 383M
gzip-3/assorted 71.724s 361M
gzip-4/assorted 76.042s 367M
gzip-5/assorted 77.492s 367M
gzip/assorted 81.487s 359M
gzip-7/assorted 84.402s 365M
gzip-8/assorted 88.709s 357M Not much better than gzip-1, and progressively more expensive, timewise
gzip-9/assorted 93.229s 364M
off/avi 18.700s 344M
zle/avi 16.497s 324M Best time, best compression, not sure why
lzjb/avi 18.414s 331M “free”, with some space savings
on/avi 18.135s 325M =lzjb
gzip-1/avi 30.593s 336M
gzip-2/avi 30.714s 335M
gzip-3/avi 30.043s 335M
gzip-4/avi 32.278s 344M
gzip-5/avi 31.652s 338M
gzip/avi 32.148s 337M
gzip-7/avi 33.087s 337M
gzip-8/avi 32.642s 336M
gzip-9/avi 30.125s 341M
off/mp3 0.280s 7.29M You can't win if you don't play.
zle/mp3 0.140s 7.20M
lzjb/mp3 0.139s 7.20M
on/mp3 0.137s 7.20M
gzip-1/mp3 0.158s 7.20M
gzip-2/mp3 0.137s 7.20M
gzip-3/mp3 0.138s 7.20M
gzip-4/mp3 0.150s 7.20M
gzip-5/mp3 0.139s 7.20M
gzip/mp3 0.141s 7.20M
gzip-7/mp3 0.150s 7.20M
gzip-8/mp3 0.139s 7.20M
gzip-9/mp3 0.164s 7.20M
off/programs 13.422s 240M
zle/programs 11.731s 245M
lzjb/programs 08.398s 231M Second best on time, not bad on compression
on/programs 05.823s 173M Best time and compression… should equal lzjb
gzip-1/programs 12.386s 207M
gzip-2/programs 13.223s 214M
gzip-3/programs 14.091s 222M
gzip-4/programs 14.833s 219M
gzip-5/programs 15.788s 222M
gzip/programs 15.394s 223M
gzip-7/programs 15.915s 220M
gzip-8/programs 15.736s 222M
gzip-9/programs 16.119s 222M
off/text 0.257s 5.31M
zle/text 0.120s 4.81M
lzjb/text 0.114s 4.67M
on/text 0.118s 4.67M
gzip-1/text 0.137s 4.27M
gzip-2/text 0.114s 4.25M
gzip-3/text 0.114s 4.25M
gzip-4/text 0.125s 4.23M
gzip-5/text 0.114s 4.23M
gzip/text 0.125s 4.22M
gzip-7/text 0.115s 4.22M
gzip-8/text 0.118s 4.22M
gzip-9/text 0.124s 4.22M Best compression, no surprise
Yeni takılan diski zfs ile kullanmak için pool oluşturulmalıdır.
işlem 1
zpool create tank1 /dev/da3
zfs komutu ile pool içinde mountpoint özelliğini ayarlayarak yeni filesystem oluşturma işlemi aşağıdaki şekilde gerçekleşti.
işlem 2
zfs create -o mountpoint=/opt/output tank1/opt_output
zfs filesystem properties
zfs tercih etmemin en önemli iki nedeni filesystem ekle/çıkar işlemlerini ve ek olarak yarattığınız farklı filesystem'lere ait farklı özellikleri kolayca yönetebilmek.
Örnek olarak mountpoint özelliği ile dosya sistemimizin hangi yola bağlanacağı bilgisini aşağıdaki şekilde değiştirebiliyoruz.
Varsayılan olarak mountpoint /tank1 olarak ayarlandı. Değiştirmek için:
okantest:~# test> zfs get mountpoint tank1
NAME PROPERTY VALUE SOURCE
tank1 mountpoint /tank1 default
işlem 3
okantest:~# test> zfs set mountpoint=/opt/tank1 tank1
filesystem e özel değiştirebileceğiniz özellik listesini
zfs get all tank1
komutu ile alabilirsiniz.
Sık olarak değiştirdiğim zfs dosya sistemi özellikler (zfs filesystem properties ) şunlar:
- compression (on | gzip | gzip-[1-9] | zle | lzjb | off)
- mountpoint
- quota
- recordsize bu değer optimize edilmeli default: 128k
zfs compression test results
Strength&Type Time Size Comments
off/assorted 56.157s 660M
zle/assorted 58.859s 608M some gain, small cost
lzjb/assorted 56.919s 490M fair gain, small cost
on/assorted 58.168s 496M =lzjb
gzip-1/assorted 69.715s 376M Significant gains, increased cost
gzip-2/assorted 69.416s 383M
gzip-3/assorted 71.724s 361M
gzip-4/assorted 76.042s 367M
gzip-5/assorted 77.492s 367M
gzip/assorted 81.487s 359M
gzip-7/assorted 84.402s 365M
gzip-8/assorted 88.709s 357M Not much better than gzip-1, and progressively more expensive, timewise
gzip-9/assorted 93.229s 364M
off/avi 18.700s 344M
zle/avi 16.497s 324M Best time, best compression, not sure why
lzjb/avi 18.414s 331M “free”, with some space savings
on/avi 18.135s 325M =lzjb
gzip-1/avi 30.593s 336M
gzip-2/avi 30.714s 335M
gzip-3/avi 30.043s 335M
gzip-4/avi 32.278s 344M
gzip-5/avi 31.652s 338M
gzip/avi 32.148s 337M
gzip-7/avi 33.087s 337M
gzip-8/avi 32.642s 336M
gzip-9/avi 30.125s 341M
off/mp3 0.280s 7.29M You can't win if you don't play.
zle/mp3 0.140s 7.20M
lzjb/mp3 0.139s 7.20M
on/mp3 0.137s 7.20M
gzip-1/mp3 0.158s 7.20M
gzip-2/mp3 0.137s 7.20M
gzip-3/mp3 0.138s 7.20M
gzip-4/mp3 0.150s 7.20M
gzip-5/mp3 0.139s 7.20M
gzip/mp3 0.141s 7.20M
gzip-7/mp3 0.150s 7.20M
gzip-8/mp3 0.139s 7.20M
gzip-9/mp3 0.164s 7.20M
off/programs 13.422s 240M
zle/programs 11.731s 245M
lzjb/programs 08.398s 231M Second best on time, not bad on compression
on/programs 05.823s 173M Best time and compression… should equal lzjb
gzip-1/programs 12.386s 207M
gzip-2/programs 13.223s 214M
gzip-3/programs 14.091s 222M
gzip-4/programs 14.833s 219M
gzip-5/programs 15.788s 222M
gzip/programs 15.394s 223M
gzip-7/programs 15.915s 220M
gzip-8/programs 15.736s 222M
gzip-9/programs 16.119s 222M
off/text 0.257s 5.31M
zle/text 0.120s 4.81M
lzjb/text 0.114s 4.67M
on/text 0.118s 4.67M
gzip-1/text 0.137s 4.27M
gzip-2/text 0.114s 4.25M
gzip-3/text 0.114s 4.25M
gzip-4/text 0.125s 4.23M
gzip-5/text 0.114s 4.23M
gzip/text 0.125s 4.22M
gzip-7/text 0.115s 4.22M
gzip-8/text 0.118s 4.22M
gzip-9/text 0.124s 4.22M Best compression, no surprise
Subscribe to:
Posts (Atom)