On 4.05.20 г. 11:03 ч., Chris Murphy wrote: > receive (rw,noatime,seclabel,compress-force=zstd:5,space_cache=v2,subvolid=5,subvol=/) > send (rw,noatime,seclabel,compress=zstd:1,nossd,notreelog,space_cache=v2,subvolid=5,subvol=/) > > Both are on dm-crypt. > > perf top -g -U consumes about 85% CPU according to top, and every time > I run it, the btrfs send performance *increases*. When I cancel this > perf top command, it returns to the slower performance. Curious. > Well this still doesn't show the stack traces, after all the + sign means you can expand that (with the 'e' key). But looking at this I don't see any particular lock contention - just compression-related functions. > Samples > Children Self Shared Object Symbol > + 40.56% 0.09% [kernel] [k] entry_SYSCALL_64_after_hwframe > + 40.30% 0.07% [kernel] [k] do_syscall_64 > + 27.88% 0.00% [kernel] [k] ret_from_fork > + 27.88% 0.00% [kernel] [k] kthread > + 27.20% 0.02% [kernel] [k] process_one_work > + 25.69% 0.01% [kernel] [k] worker_thread > + 22.05% 0.01% [kernel] [k] btrfs_work_helper > + 19.01% 0.01% [kernel] [k] __x64_sys_splice > + 18.98% 2.02% [kernel] [k] do_splice > + 14.70% 0.00% [kernel] [k] async_cow_start > + 14.70% 0.00% [kernel] [k] compress_file_range > + 14.40% 0.00% [kernel] [k] temp_notif.12+0x4 > + 13.20% 0.00% [kernel] [k] ZSTD_compressContinue_internal > + 13.14% 0.00% [kernel] [k] garp_protos+0x35 > + 12.99% 0.01% [kernel] [k] nft_request_module > + 12.95% 0.01% [kernel] [k] ZSTD_compressStream > + 11.95% 0.01% [kernel] [k] ksys_read > + 11.87% 0.02% [kernel] [k] vfs_read > + 11.76% 11.45% [kernel] [k] fuse_perform_write > + 11.26% 0.02% [kernel] [k] do_idle > + 10.80% 0.01% [kernel] [k] cpuidle_enter > + 10.79% 0.01% [kernel] [k] cpuidle_enter_state > + 10.54% 10.54% [kernel] [k] mwait_idle_with_hints.constprop.0 > + 10.33% 0.00% libc-2.31.so [.] splice > + 7.93% 7.59% [kernel] [k] mutex_unlock > + 7.38% 0.01% [kernel] [k] new_sync_read > + 7.36% 0.10% [kernel] [k] pipe_read > + 6.46% 0.07% [kernel] [k] __mutex_lock.constprop.0 > + 6.34% 6.23% [kernel] [k] mutex_spin_on_owner > + 6.20% 0.00% [kernel] [k] secondary_startup_64 > + 6.20% 0.00% [kernel] [k] cpu_startup_entry > + 6.05% 3.89% [kernel] [k] mutex_lock > + 5.78% 0.00% [kernel] [k] intel_idle > + 5.53% 0.00% [kernel] [k] iwl_mvm_mac_conf_tx > + 5.43% 0.00% [kernel] [k] run_one_async_start > + 5.43% 0.00% [kernel] [k] btrfs_submit_bio_start > + 5.31% 0.06% [kernel] [k] blake2b_update > + 5.11% 1.39% [kernel] [k] pipe_double_lock > + 4.28% 0.01% [kernel] [k] proc_reg_read > + 4.27% 0.09% [kernel] [k] seq_read > For a higher level overview, try: perf top --sort comm,dso >
