diff --git a/benchmarks/perf-tool/okpt/test/steps/steps.py b/benchmarks/perf-tool/okpt/test/steps/steps.py index 9e70123c3d..7230bc1f4f 100644 --- a/benchmarks/perf-tool/okpt/test/steps/steps.py +++ b/benchmarks/perf-tool/okpt/test/steps/steps.py @@ -287,14 +287,14 @@ def _action(self): def action(doc_id): return {'index': {'_index': self.index_name, '_id': doc_id}} - index_responses = [] + # Maintain minimal state outside of this loop. For large data sets, too + # much state may cause out of memory failure for i in range(0, self.doc_count, self.bulk_size): partition = self.dataset.read(self.bulk_size) if partition is None: break body = bulk_transform(partition, self.field_name, action, i) - result = bulk_index(self.opensearch, self.index_name, body) - index_responses.append(result) + bulk_index(self.opensearch, self.index_name, body) self.dataset.reset()