Skip to content

Commit

Permalink
Merge pull request #4295 from vespa-engine/geirst/mmap-vs-directio-cl…
Browse files Browse the repository at this point in the history
…oud-test

Prepare for mmap vs directio test in Vespa Cloud
  • Loading branch information
geirst authored Dec 3, 2024
2 parents 0d10dd5 + b789dfd commit e0517ee
Show file tree
Hide file tree
Showing 2 changed files with 40 additions and 2 deletions.
4 changes: 2 additions & 2 deletions tests/performance/mmap_vs_directio/app/services.xml
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
<document-api/>
<search/>
<nodes deploy:environment="perf" deploy:region="aws-us-east-1c" count="1">
<resources vcpu="8.0" memory="16Gb" architecture="x86_64" storage-type="remote" disk="48Gb"/>
<resources vcpu="8.0" memory="16Gb" architecture="arm64" storage-type="remote" disk="48Gb"/>
</nodes>
</container>

Expand All @@ -18,7 +18,7 @@
</documents>
<nodes deploy:environment="perf" deploy:region="aws-us-east-1c" count="1">
<!-- Memory available by proton: 12993349812 -->
<resources vcpu="8.0" memory="16Gb" architecture="x86_64" storage-type="local" disk="200Gb"/>
<resources vcpu="8.0" memory="16Gb" architecture="x86_64" storage-type="local" disk="474Gb"/>
</nodes>
<config name='vespa.config.search.core.proton'>
<search>
Expand Down
38 changes: 38 additions & 0 deletions tests/performance/mmap_vs_directio/create_updates.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,38 @@
# Copyright Vespa.ai. All rights reserved.

import argparse
import json
import random
import string
import sys

parser = argparse.ArgumentParser(description='Creates a JSON update for the payload field for each document id from standard in')
parser.add_argument('--payload_bytes', type=int, default=600)
parser.add_argument('--clear', action='store_true')
args = parser.parse_args()

payload_bytes = args.payload_bytes
base64_length = int(payload_bytes * 8 / 6)
num_payloads = 1000
random.seed(1234)
clear = args.clear

payloads = [
''.join(random.choices(string.ascii_letters + string.digits, k=base64_length))
for _ in range(num_payloads)
]

i = 0
for line in sys.stdin:
docid = line.strip()
update = {
"update": docid,
"fields": {
"payload": {
"assign": None if clear else payloads[i % len(payloads)]
}
}
}
i += 1
print(json.dumps(update))

0 comments on commit e0517ee

Please sign in to comment.