From ce2bbadf2a14f71115568e83a437c66f9b903cd0 Mon Sep 17 00:00:00 2001 From: sage Date: Mon, 25 Sep 2006 03:21:24 +0000 Subject: [PATCH] g_conf has pg log padding and ebofs realloc crap git-svn-id: https://ceph.svn.sf.net/svnroot/ceph@880 29311d96-e01e-0410-9327-a35deaab8ce9 --- ceph/Makefile | 2 +- ceph/config.cc | 10 ++++++++-- ceph/config.h | 2 ++ ceph/ebofs/Ebofs.cc | 2 +- ceph/osd/PG.cc | 2 +- 5 files changed, 13 insertions(+), 5 deletions(-) diff --git a/ceph/Makefile b/ceph/Makefile index e130573e69260..5fd248864fdb8 100644 --- a/ceph/Makefile +++ b/ceph/Makefile @@ -9,7 +9,7 @@ # behave just fine... change ${CC} back to mpicxx if you get paranoid. CC = g++ -CFLAGS = -pg -g -Wall -I. -D_FILE_OFFSET_BITS=64 -DMPICH_IGNORE_CXX_SEEK -D_REENTRANT -D_THREAD_SAFE +CFLAGS = -O4 -Wall -I. -D_FILE_OFFSET_BITS=64 -DMPICH_IGNORE_CXX_SEEK -D_REENTRANT -D_THREAD_SAFE LIBS = -lpthread #for normal mpich2 machines diff --git a/ceph/config.cc b/ceph/config.cc index 7a6017ff0b9bf..0cddca4365cdb 100644 --- a/ceph/config.cc +++ b/ceph/config.cc @@ -195,6 +195,7 @@ md_config_t g_conf = { osd_heartbeat_interval: 10, osd_replay_window: 15, osd_max_pull: 2, + osd_pad_pg_log: false, // --- fakestore --- fakestore_fake_sync: 2, // 2 seconds @@ -214,6 +215,7 @@ md_config_t g_conf = { ebofs_bc_size: (350 *256), // 4k blocks, *256 for MB ebofs_bc_max_dirty: (200 *256), // before write() will block ebofs_max_prefetch: 1000, // 4k blocks + ebofs_realloc: true, ebofs_abp_zero: false, // zero newly allocated buffers (may shut up valgrind) ebofs_abp_max_alloc: 4096*16, // max size of new buffers (larger -> more memory fragmentation) @@ -237,8 +239,8 @@ md_config_t g_conf = { bdev_lock: true, bdev_iothreads: 1, // number of ios to queue with kernel bdev_idle_kick_after_ms: 0,//100, // ms ** FIXME ** this seems to break things, not sure why yet ** - bdev_el_fw_max_ms: 1000, // restart elevator at least once every 1000 ms - bdev_el_bw_max_ms: 300, // restart elevator at least once every 300 ms + bdev_el_fw_max_ms: 10000, // restart elevator at least once every 1000 ms + bdev_el_bw_max_ms: 3000, // restart elevator at least once every 300 ms bdev_el_bidir: true, // bidirectional elevator? bdev_iov_max: 512, // max # iov's to collect into a single readv()/writev() call bdev_debug_check_io_overlap: true, // [DEBUG] check for any pending io overlaps @@ -576,6 +578,8 @@ void parse_config_options(vector& args) g_conf.ebofs_abp_max_alloc = atoi(args[++i]); else if (strcmp(args[i], "--ebofs_max_prefetch") == 0) g_conf.ebofs_max_prefetch = atoi(args[++i]); + else if (strcmp(args[i], "--ebofs_realloc") == 0) + g_conf.ebofs_realloc = atoi(args[++i]); else if (strcmp(args[i], "--fakestore") == 0) { @@ -618,6 +622,8 @@ void parse_config_options(vector& args) g_conf.osd_maxthreads = atoi(args[++i]); else if (strcmp(args[i], "--osd_max_pull") == 0) g_conf.osd_max_pull = atoi(args[++i]); + else if (strcmp(args[i], "--osd_pad_pg_log") == 0) + g_conf.osd_pad_pg_log = atoi(args[++i]); else if (strcmp(args[i], "--bdev_lock") == 0) diff --git a/ceph/config.h b/ceph/config.h index 160c817e86090..92be5bb11b477 100644 --- a/ceph/config.h +++ b/ceph/config.h @@ -171,6 +171,7 @@ struct md_config_t { int osd_heartbeat_interval; int osd_replay_window; int osd_max_pull; + bool osd_pad_pg_log; int fakestore_fake_sync; bool fakestore_fsync; @@ -189,6 +190,7 @@ struct md_config_t { off_t ebofs_bc_size; off_t ebofs_bc_max_dirty; unsigned ebofs_max_prefetch; + bool ebofs_realloc; bool ebofs_abp_zero; size_t ebofs_abp_max_alloc; diff --git a/ceph/ebofs/Ebofs.cc b/ceph/ebofs/Ebofs.cc index c21999cc5f68a..38b6bcf838b11 100644 --- a/ceph/ebofs/Ebofs.cc +++ b/ceph/ebofs/Ebofs.cc @@ -1329,7 +1329,7 @@ void Ebofs::alloc_write(Onode *on, // reallocate uncommitted too? // ( --> yes. we can always make better allocation decisions later, with more information. ) - if (1) { + if (g_conf.ebofs_realloc) { list tx; ObjectCache *oc = on->get_oc(&bc); diff --git a/ceph/osd/PG.cc b/ceph/osd/PG.cc index 542624d1f68a9..6b17f07d7f346 100644 --- a/ceph/osd/PG.cc +++ b/ceph/osd/PG.cc @@ -1036,7 +1036,7 @@ void PG::append_log(ObjectStore::Transaction& t, PG::Log::Entry& logentry, // write entry on disk bufferlist bl; bl.append( (char*)&logentry, sizeof(logentry) ); - if (0) { // pad to 4k, until i fix ebofs reallocation crap. FIXME. + if (g_conf.osd_pad_pg_log) { // pad to 4k, until i fix ebofs reallocation crap. FIXME. bufferptr bp = new buffer(4096 - sizeof(logentry)); bl.push_back(bp); } -- 2.39.5