13 #ifndef HERMES_BUFFER_ORGANIZER_H_
14 #define HERMES_BUFFER_ORGANIZER_H_
16 #include "thread_pool.h"
21 using BoMoveList = std::vector<std::pair<BufferID, std::vector<BufferID>>>;
91 BlobID blob_id,
const std::string &filename,
95 const std::string &filename,
u64 offset);
99 const std::string &internal_blob_name);
101 const std::string &filename,
u64 offset,
bool async =
false);
106 const std::string &vbkt_name);
109 const std::string &vbkt_name);
112 const std::string &vbkt_name);
115 const std::string &vbkt_name);
121 const std::string &internal_blob_name,
123 f32 explicit_importance_score);
126 BucketID bucket_id,
const std::string &blob_name,
f32 epsilon,
127 f32 importance_score = -1);
135 const std::vector<BufferID> &buffer_ids);
138 const std::vector<BufferInfo> &buffer_info);
143 const std::string &internal_blob_name,
147 BucketID bucket_id,
const std::string &internal_name,
Definition: thread_pool.h:26
Definition: adapter_utils.cc:35
BoPriority
Definition: buffer_organizer.h:33
void LocalDecrementFlushCount(SharedMemoryContext *context, const std::string &vbkt_name)
Definition: buffer_organizer.cc:793
float f32
Definition: hermes_types.h:48
std::vector< std::pair< BufferID, std::vector< BufferID > >> BoMoveList
Definition: buffer_organizer.h:21
bool LocalEnqueueFlushingTask(SharedMemoryContext *context, RpcContext *rpc, BlobID blob_id, const std::string &filename, u64 offset)
Definition: buffer_organizer.cc:728
void BoMove(SharedMemoryContext *context, RpcContext *rpc, const BoMoveList &moves, BlobID blob_id, BucketID bucket_id, const std::string &internal_blob_name)
Definition: buffer_organizer.cc:195
void FlushBlob(SharedMemoryContext *context, RpcContext *rpc, BlobID blob_id, const std::string &filename, u64 offset, bool async)
Definition: buffer_organizer.cc:667
void AwaitAsyncFlushingTasks(SharedMemoryContext *context, RpcContext *rpc, VBucketID id)
Definition: buffer_organizer.cc:824
void EnqueueBoMove(RpcContext *rpc, const BoMoveList &moves, BlobID blob_id, BucketID bucket_id, const std::string &internal_name, BoPriority priority)
Definition: buffer_organizer.cc:172
void LocalEnforceCapacityThresholds(SharedMemoryContext *context, RpcContext *rpc, ViolationInfo info)
Definition: buffer_organizer.cc:452
void LocalIncrementFlushCount(SharedMemoryContext *context, const std::string &vbkt_name)
Definition: buffer_organizer.cc:788
bool EnqueueFlushingTask(RpcContext *rpc, BlobID blob_id, const std::string &filename, u64 offset)
Definition: buffer_organizer.cc:720
u16 DeviceID
Definition: hermes_types.h:51
void OrganizeDevice(SharedMemoryContext *context, RpcContext *rpc, DeviceID devices_id)
void IncrementFlushCount(SharedMemoryContext *context, RpcContext *rpc, const std::string &vbkt_name)
Definition: buffer_organizer.cc:798
bool operator==(const BufferInfo &lhs, const BufferInfo &rhs)
Definition: buffer_organizer.cc:27
void EnforceCapacityThresholds(SharedMemoryContext *context, RpcContext *rpc, ViolationInfo info)
Definition: buffer_organizer.cc:442
void LocalEnqueueBoMove(SharedMemoryContext *context, RpcContext *rpc, const BoMoveList &moves, BlobID blob_id, BucketID bucket_id, const std::string &internal_blob_name, BoPriority priority)
Definition: buffer_organizer.cc:179
void LocalShutdownBufferOrganizer(SharedMemoryContext *context)
Definition: buffer_organizer.cc:661
BufferInfo GetBufferInfo(SharedMemoryContext *context, RpcContext *rpc, BufferID buffer_id)
Definition: buffer_organizer.cc:59
void DecrementFlushCount(SharedMemoryContext *context, RpcContext *rpc, const std::string &vbkt_name)
Definition: buffer_organizer.cc:811
uint64_t u64
Definition: hermes_types.h:43
f32 ComputeBlobAccessScore(SharedMemoryContext *context, const std::vector< BufferInfo > &buffer_info)
Definition: buffer_organizer.cc:107
void OrganizeBlob(SharedMemoryContext *context, RpcContext *rpc, BucketID bucket_id, const std::string &blob_name, f32 epsilon, f32 importance_score)
Definition: buffer_organizer.cc:426
void LocalOrganizeBlob(SharedMemoryContext *context, RpcContext *rpc, const std::string &internal_blob_name, BucketID bucket_id, f32 epsilon, f32 explicit_importance_score)
Definition: buffer_organizer.cc:316
BoOperation
Definition: buffer_organizer.h:24
Definition: buffer_organizer.h:63
BoOperation op
Definition: buffer_organizer.h:64
BoArgs args
Definition: buffer_organizer.h:65
Definition: buffer_organizer.h:71
size_t size
Definition: buffer_organizer.h:74
BufferID id
Definition: buffer_organizer.h:72
f32 bandwidth_mbps
Definition: buffer_organizer.h:73
Definition: buffer_organizer.h:83
BufferOrganizer(int num_threads)
Definition: buffer_organizer.cc:24
ThreadPool pool
Definition: buffer_organizer.h:84
Definition: buffer_pool.h:273
Definition: metadata_management.h:72
Definition: hermes_types.h:405
Definition: buffer_organizer.h:43
BufferID src
Definition: buffer_organizer.h:46
struct hermes::BoArgs::@1 copy_args
struct hermes::BoArgs::@2 delete_args
struct hermes::BoArgs::@0 move_args
TargetID dest
Definition: buffer_organizer.h:47
Definition: hermes_types.h:358
Definition: buffer_pool.h:93
Definition: hermes_types.h:198
Definition: hermes_types.h:388