Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

mds: misc load balancer fixes #19220

Merged
merged 18 commits into from Apr 11, 2018
Merged

mds: misc load balancer fixes #19220

merged 18 commits into from Apr 11, 2018

Conversation

ukernel
Copy link
Contributor

@ukernel ukernel commented Nov 29, 2017

No description provided.

@ktdreyer
Copy link
Member

Would you please file a tracker.ceph.com ticket to ensure this is backported to luminous?

@batrick
Copy link
Member

batrick commented Mar 31, 2018

@ukernel ukernel force-pushed the wip-mds-balancer branch 5 times, most recently from 527d746 to 6d3d5a5 Compare April 4, 2018 02:18
@batrick
Copy link
Member

batrick commented Apr 6, 2018

Signed-off-by: "Yan, Zheng" <zyan@redhat.com>
Fixes: http://tracker.ceph.com/issues/21745
Signed-off-by: "Yan, Zheng" <zyan@redhat.com>
Signed-off-by: "Yan, Zheng" <zyan@redhat.com>
Signed-off-by: "Yan, Zheng" <zyan@redhat.com>
Changing load counters while printing load results confusing output.

Signed-off-by: "Yan, Zheng" <zyan@redhat.com>
MDCache::trim() already does the same job

Signed-off-by: "Yan, Zheng" <zyan@redhat.com>
There were codes that pass mdr->get_mds_stamp() to {hit_inode,hit_dir}.
The stamp can be older than 'last_decay' in decay counters,  which can
cause DecayCounter::decay() to malfunction.

Signed-off-by: "Yan, Zheng" <zyan@redhat.com>
no logic changes

Signed-off-by: "Yan, Zheng" <zyan@redhat.com>
Migrator will refuse to export them. Besides, stray directory can
never be subtree root.

Signed-off-by: "Yan, Zheng" <zyan@redhat.com>
It doesn't make sense to call MDBalancer::find_exports() for a dirfrag
that is already being exported.

Signed-off-by: "Yan, Zheng" <zyan@redhat.com>
1. change import_pop_map to multimap because subtrees may have the same
   popularity.
2. avoid calculating subtrees' popularity multiple times

Signed-off-by: "Yan, Zheng" <zyan@redhat.com>
When choosing dirfrags for exporting, consider subtrees imported
from other MDS first. It's because that exporting dirfrags chosen
by MDBalancer::find_export() will create new subtrees.

Signed-off-by: "Yan, Zheng" <zyan@redhat.com>
stop at subtree bounds; make freezing/frozen check more efficient.

Signed-off-by: "Yan, Zheng" <zyan@redhat.com>
Signed-off-by: "Yan, Zheng" <zyan@redhat.com>
using map::insert to access map items looks strang

Signed-off-by: "Yan, Zheng" <zyan@redhat.com>
No need to get this information from MHeartbeat

Signed-off-by: "Yan, Zheng" <zyan@redhat.com>
MDBalancer::find_exports() can be more efficient with LRU list.

Signed-off-by: "Yan, Zheng" <zyan@redhat.com>
Signed-off-by: "Yan, Zheng" <zyan@redhat.com>
@batrick
Copy link
Member

batrick commented Apr 10, 2018

retest this please

@batrick
Copy link
Member

batrick commented Apr 10, 2018

@batrick batrick merged commit fc0d340 into ceph:master Apr 11, 2018
batrick added a commit that referenced this pull request Apr 11, 2018
* refs/pull/19220/head:
	mds: limit run time of load balancer
	mds: add list to track recently used sub-directories
	mds: calculate other mds' last_epoch_under locally
	mds: cleanup mds_load map access/update
	mds: check export pin when choosing dirfrags for exporting
	mds: optimize MDBalancer::find_exports()
	mds: avoid creating unnecessary subtrees during load balance
	mds: mds: optimize MDBalancer::try_rebalance()
	mds: don't try exporting subdir if dirfrag is already being exported
	mds: don't try exporting dirfrags under mds's own mdsdir
	mds: cleanup MDBalancer::try_rebalance()
	mds: always pass current time to MDBalancer::{hit_inode,hit_dir}
	mds: remove unused MDBalancer::export_empties()
	mds: don't decay load counters when printing load
	mds: adjust pop_nested when importing subtree
	mds: adjust subtree popularity when import fails
	mds: adjust subtree popularity after rename
	mds: fix request rate calculation

Reviewed-by: Patrick Donnelly <pdonnell@redhat.com>
@ukernel ukernel deleted the wip-mds-balancer branch April 20, 2018 07:47
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug-fix cephfs Ceph File System
Projects
None yet
3 participants