summaryrefslogtreecommitdiff
path: root/lib
diff options
context:
space:
mode:
authorJosh Blum2013-04-13 16:10:10 -0700
committerJosh Blum2013-04-13 16:10:10 -0700
commit21026256a3f9cbfd5c35a1a60984bc448e831eba (patch)
tree120689f782ca300134c8d51b4c1a5bc73d162311 /lib
parentdd167fdc4271cfa6eb27fee97ab68f456d3e1eec (diff)
downloadsandhi-21026256a3f9cbfd5c35a1a60984bc448e831eba.tar.gz
sandhi-21026256a3f9cbfd5c35a1a60984bc448e831eba.tar.bz2
sandhi-21026256a3f9cbfd5c35a1a60984bc448e831eba.zip
gras: minor tweaks while benchmarking
Diffstat (limited to 'lib')
-rw-r--r--lib/block_actor.cpp1
-rw-r--r--lib/block_allocator.cpp6
-rw-r--r--lib/gras_impl/debug.hpp2
3 files changed, 5 insertions, 4 deletions
diff --git a/lib/block_actor.cpp b/lib/block_actor.cpp
index 10c863e..2ab5049 100644
--- a/lib/block_actor.cpp
+++ b/lib/block_actor.cpp
@@ -38,6 +38,7 @@ ThreadPool::ThreadPool(const ThreadPoolConfig &config)
config.processor_mask
);
+ //if (config.yield_strategy == "BLOCKING") params.mYieldStrategy = Theron::YIELD_STRATEGY_BLOCKING;
if (config.yield_strategy == "POLITE") params.mYieldStrategy = Theron::YIELD_STRATEGY_POLITE;
if (config.yield_strategy == "STRONG") params.mYieldStrategy = Theron::YIELD_STRATEGY_STRONG;
if (config.yield_strategy == "AGGRESSIVE") params.mYieldStrategy = Theron::YIELD_STRATEGY_AGGRESSIVE;
diff --git a/lib/block_allocator.cpp b/lib/block_allocator.cpp
index 3161653..205f99d 100644
--- a/lib/block_allocator.cpp
+++ b/lib/block_allocator.cpp
@@ -7,9 +7,9 @@
using namespace gras;
-const size_t AT_LEAST_BYTES = 1 << 14;
-const size_t AHH_TOO_MANY_BYTES = 1 << 20; //TODO
-const size_t THIS_MANY_BUFFERS = 16;
+const size_t AT_LEAST_BYTES = 16*(1024); //16 kiB per buffer
+const size_t AHH_TOO_MANY_BYTES = 32*(1024*1024); //32 MiB enough for me
+const size_t THIS_MANY_BUFFERS = 8;
void BlockActor::buffer_returner(const size_t index, SBuffer &buffer)
{
diff --git a/lib/gras_impl/debug.hpp b/lib/gras_impl/debug.hpp
index c01e7d4..7934a1e 100644
--- a/lib/gras_impl/debug.hpp
+++ b/lib/gras_impl/debug.hpp
@@ -24,7 +24,7 @@ extern void *operator new(std::size_t n) throw (std::bad_alloc);
//----------------------------------------------------------------------
//-- define to enable these debugs:
//----------------------------------------------------------------------
-#define ASSERTING
+//#define ASSERTING
//#define MESSAGE_TRACING
//#define ITEM_CONSPROD