Skip to content

Commit

Permalink
benchmarks: adjust pool size factor to avoid OoM
Browse files Browse the repository at this point in the history
Signed-off-by: Jan Michalski <jan.michalski@intel.com>
  • Loading branch information
janekmi committed Mar 27, 2024
1 parent a2d64d6 commit 872f480
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 5 deletions.
6 changes: 3 additions & 3 deletions src/benchmarks/obj_pmalloc.cpp
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
// SPDX-License-Identifier: BSD-3-Clause
/* Copyright 2015-2020, Intel Corporation */
/* Copyright 2015-2024, Intel Corporation */

/*
* obj_pmalloc.cpp -- pmalloc benchmarks definition
Expand Down Expand Up @@ -27,7 +27,7 @@
* The factor used for PMEM pool size calculation, accounts for metadata,
* fragmentation and etc.
*/
#define FACTOR 1.2f
#define FACTOR 1.9f

/* The minimum allocation size that pmalloc can perform */
#define ALLOC_MIN_SIZE 64
Expand Down Expand Up @@ -236,7 +236,7 @@ pmalloc_op(struct benchmark *bench, struct operation_info *info)

int ret = pmalloc(ob->pop, &ob->offs[i], ob->sizes[i], 0, 0);
if (ret) {
fprintf(stderr, "pmalloc ret: %d\n", ret);
perror("pmalloc");
return ret;
}

Expand Down
4 changes: 2 additions & 2 deletions src/benchmarks/pmemobj_tx.cpp
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
// SPDX-License-Identifier: BSD-3-Clause
/* Copyright 2015-2020, Intel Corporation */
/* Copyright 2015-2024, Intel Corporation */

/*
* pmemobj_tx.cpp -- pmemobj_tx_alloc(), pmemobj_tx_free(),
Expand All @@ -19,7 +19,7 @@
#include "poolset_util.hpp"

#define LAYOUT_NAME "benchmark"
#define FACTOR 1.2f
#define FACTOR 1.3f
#define ALLOC_OVERHEAD 64
/*
* operations number is limited to prevent stack overflow during
Expand Down

0 comments on commit 872f480

Please sign in to comment.