TritonDataCenter / smartos-live

For more information, please see http://smartos.org/ For any questions that aren't answered there, please join the SmartOS discussion list: https://smartos.topicbox.com/groups/smartos-discuss
1.56k stars 244 forks source link

Increase maxBuffer for imgadm zfs listing #1055

Closed drscream closed 1 year ago

drscream commented 1 year ago

The maxBuffer is not suitable for production environments with lot's of snapshots and delegate datasets. Especially when the structure contains lot's of sub-folders.

bahamat commented 1 year ago

Can you provide some metrics on behavior before and after? I'd also like to know under what conditions performance degrades.

drscream commented 1 year ago

Example zfs list output with wc -c on one of our production systems:

$ /usr/sbin/zfs list -t filesystem,volume,snapshot -pH -o name,origin,mountpoint,imgadm:ignore | wc -c
10808528

As 10808528 is larger than maxBuffer value 10485760 the imgadm list command fail with a strange output of listed snapshots, datasets. After I increased the value the output is working again.

The performance of imgadm is already really bad on that system:

$ time imgadm list
[...]

real    5m51.537s
user    0m5.972s
sys     1m55.309s
bahamat commented 1 year ago

How many datasets do you have?

drscream commented 1 year ago
$ zfs list | wc -l
1200

The server receive datasets into zones via znapzend as a backup solution.