[dm-devel] [Question] multipathd add/remove paths takes a long time

Wu Guanghao wuguanghao3 at huawei.com
Tue Jul 19 12:13:39 UTC 2022


The system has 1K multipath devices, each device has 16 paths.
Execute multipathd add/multipathd remove or uev_add_path/
uev_remove_path to add/remove paths, which takes over 20s.
What's more, the second checkloop may be execed immediately
after finishing first checkloop. It's too long.

We found that time was mostly spent waiting for locks.

checkerloop(){
	...
	lock(&vecs->lock);
	vector_foreach_slot (vecs->pathvec, pp, i) {
		rc = check_path(...); // Too many paths, it takes a long time
		...
	}
	lock_cleanup_pop(vecs->lock);
	...
}

Can the range of vecs->lock locks be adjusted to reduce the time consuming
when adding/removing paths?



More information about the dm-devel mailing list