From f1fe9e0c87f57acc2820d7e45624423d5e7a2f89 Mon Sep 17 00:00:00 2001 From: sageweil Date: Sat, 29 Sep 2007 20:42:24 +0000 Subject: [PATCH] mds performance tweaks git-svn-id: https://ceph.svn.sf.net/svnroot/ceph@1874 29311d96-e01e-0410-9327-a35deaab8ce9 --- branches/sage/mds/config.cc | 5 +---- branches/sage/mds/config.h | 1 - branches/sage/mds/mds/MDBalancer.cc | 4 ++-- branches/sage/mds/mds/MDCache.cc | 2 +- branches/sage/mds/mds/Server.cc | 2 +- branches/sage/mds/mds/journal.cc | 2 +- 6 files changed, 6 insertions(+), 10 deletions(-) diff --git a/branches/sage/mds/config.cc b/branches/sage/mds/config.cc index a51db55b3269c..6be6a95b6702f 100644 --- a/branches/sage/mds/config.cc +++ b/branches/sage/mds/config.cc @@ -204,9 +204,8 @@ md_config_t g_conf = { mds_log: true, mds_log_max_events: -1, //MDS_CACHE_SIZE / 3, mds_log_max_segments: 100, - mds_log_max_trimming: 2, + mds_log_max_trimming: 10, mds_log_pad_entry: 128,//256,//64, - mds_log_read_inc: 1<<24, mds_log_flush_on_shutdown: true, mds_log_eopen_size: 100, // # open inodes per log entry @@ -685,8 +684,6 @@ void parse_config_options(std::vector& args) g_conf.mds_log_max_events = atoi(args[++i]); else if (strcmp(args[i], "--mds_log_max_segments") == 0) g_conf.mds_log_max_segments = atoi(args[++i]); - else if (strcmp(args[i], "--mds_log_read_inc") == 0) - g_conf.mds_log_read_inc = atoi(args[++i]); else if (strcmp(args[i], "--mds_log_max_trimming") == 0) g_conf.mds_log_max_trimming = atoi(args[++i]); diff --git a/branches/sage/mds/config.h b/branches/sage/mds/config.h index 50a3099e693b0..a850b7462c202 100644 --- a/branches/sage/mds/config.h +++ b/branches/sage/mds/config.h @@ -199,7 +199,6 @@ struct md_config_t { int mds_log_max_segments; int mds_log_max_trimming; int mds_log_pad_entry; - int mds_log_read_inc; bool mds_log_flush_on_shutdown; int mds_log_eopen_size; diff --git a/branches/sage/mds/mds/MDBalancer.cc b/branches/sage/mds/mds/MDBalancer.cc index a3bfe5526245a..fdc2faba5def9 100644 --- a/branches/sage/mds/mds/MDBalancer.cc +++ b/branches/sage/mds/mds/MDBalancer.cc @@ -771,8 +771,8 @@ void MDBalancer::hit_inode(utime_t now, CInode *in, int type, int who) // hit inode in->pop.get(type).hit(now); - if (in->get_parent_dir()) - hit_dir(now, in->get_parent_dir(), type, who); + if (in->get_parent_dn()) + hit_dir(now, in->get_parent_dn()->get_dir(), type, who); } /* // hit me diff --git a/branches/sage/mds/mds/MDCache.cc b/branches/sage/mds/mds/MDCache.cc index 370c25740a176..a075fa7b3be3e 100644 --- a/branches/sage/mds/mds/MDCache.cc +++ b/branches/sage/mds/mds/MDCache.cc @@ -3752,7 +3752,7 @@ int MDCache::path_traverse(MDRequest *mdr, Message *req, // who // parent dir frozen_dir? if (cur->is_frozen_dir()) { dout(7) << "traverse: " << *cur->get_parent_dir() << " is frozen_dir, waiting" << dendl; - cur->get_parent_dir()->add_waiter(CDir::WAIT_UNFREEZE, _get_waiter(mdr, req)); + cur->get_parent_dn()->get_dir()->add_waiter(CDir::WAIT_UNFREEZE, _get_waiter(mdr, req)); return 1; } diff --git a/branches/sage/mds/mds/Server.cc b/branches/sage/mds/mds/Server.cc index aad364d9468b3..0e062e3ac3764 100644 --- a/branches/sage/mds/mds/Server.cc +++ b/branches/sage/mds/mds/Server.cc @@ -1282,7 +1282,7 @@ version_t Server::predirty_dn_diri(MDRequest *mdr, CDentry *dn, EMetaBlob *blob) inode_t *pi = diri->project_inode(); if (dirpv) pi->version = dirpv; pi->ctime = pi->mtime = mdr->now; - blob->add_dir_context(diri->get_parent_dir()); + blob->add_dir_context(diri->get_parent_dn()->get_dir()); blob->add_primary_dentry(diri->get_parent_dn(), true, 0, pi); } else { // journal the mtime change anyway. diff --git a/branches/sage/mds/mds/journal.cc b/branches/sage/mds/mds/journal.cc index 66ea623ea971a..a43a8c179d7bb 100644 --- a/branches/sage/mds/mds/journal.cc +++ b/branches/sage/mds/mds/journal.cc @@ -77,7 +77,7 @@ C_Gather *LogSegment::try_to_expire(MDS *mds) for (xlist::iterator p = dirty_dentries.begin(); !p.end(); ++p) commit.insert((*p)->get_dir()); for (xlist::iterator p = dirty_inodes.begin(); !p.end(); ++p) - commit.insert((*p)->get_parent_dir()); + commit.insert((*p)->get_parent_dn()->get_dir()); if (!commit.empty()) { if (!gather) gather = new C_Gather; -- 2.39.5