Skip to content

Commit

Permalink
DAOS-12974 test: nvme/pool_capacity.py - Use threads to create contai… (
Browse files Browse the repository at this point in the history
#14126)

The test creates 50 containers for each of the 10 pools 20 times
(10 x 50 x 20). Creating many containers serially takes significant
amount of time, so use threads to create the containers in parallel.

Tested the speed up of run_test_create_delete() (Just this method.
Not the entire test) with 3 x 50 x 3 and took 732 sec in serial, but
only 261 sec in parallel.

Also reduce iteration to 2 and reduce timeout.

Signed-off-by: Makito Kano <[email protected]>
  • Loading branch information
shimizukko authored Apr 23, 2024
1 parent 899cdd2 commit c122a9a
Show file tree
Hide file tree
Showing 2 changed files with 26 additions and 19 deletions.
22 changes: 15 additions & 7 deletions src/tests/ftest/nvme/pool_capacity.py
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
"""
(C) Copyright 2020-2023 Intel Corporation.
(C) Copyright 2020-2024 Intel Corporation.
SPDX-License-Identifier: BSD-2-Clause-Patent
"""
Expand Down Expand Up @@ -94,16 +94,24 @@ def run_test_create_delete(self, num_pool=2, num_cont=5, total_count=100):
self.log.info("Running test %s", loop_count)
offset = loop_count * num_pool
for val in range(offset, offset + num_pool):
self.pool.append(self.get_pool(namespace="/run/pool_qty_{}/*".format(num_pool),
properties="reclaim:disabled"))
self.pool.append(
self.get_pool(
namespace="/run/pool_qty_{}/*".format(num_pool),
properties="reclaim:disabled"))

display_string = "pool{} space at the Beginning".format(val)
self.pool[-1].display_pool_daos_space(display_string)
nvme_size_begin[val] = self.pool[-1].get_pool_free_space("NVME")
# To be fixed by DAOS-12974
threads = []
# Create containers with threads because we'll be creating many containers, which
# will take too long if we create them serially.
for _ in range(num_cont):
# self.get_container(self.pool[-1])
pass
kwargs = {"pool": self.pool[-1]}
threads.append(threading.Thread(target=self.get_container, kwargs=kwargs))
for thread in threads:
thread.start()
for thread in threads:
thread.join()

m_leak = 0

Expand Down Expand Up @@ -214,4 +222,4 @@ def test_nvme_pool_capacity(self):
time.sleep(5)
# Run Create/delete pool/container
self.log.info("Running Test Case 3: Pool/Cont Create/Destroy")
self.run_test_create_delete(10, 50, 20)
self.run_test_create_delete(10, 50, 2)
23 changes: 11 additions & 12 deletions src/tests/ftest/nvme/pool_capacity.yaml
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
hosts:
test_servers: 2
test_clients: 2
timeout: 5000
timeout: 1800
server_config:
name: daos_server
engines_per_host: 1
Expand All @@ -13,15 +13,14 @@ server_config:
pool:
mode: 146
name: daos_server
control_method: dmg
pool_qty_1:
size: "50%"
size: 50%
pool_qty_2:
size: "25%"
size: 25%
pool_qty_3:
size: "16%"
size: 16%
pool_qty_10:
size: "5%"
size: 5%
container:
type: POSIX
control_method: daos
Expand All @@ -34,15 +33,15 @@ ior:
dfs_destroy: false
iorflags:
ior_flags:
- "-w -r -R -k -G 1"
- -w -r -R -k -G 1
ior_api:
- DFS
obj_class:
- "SX"
- SX
ior_test_sequence:
# - [scmsize, nvmesize, transfersize, blocksize, PASS/FAIL(Expected) ]
# - [scmsize, nvmesize, transfer_size, block_size, PASS/FAIL(Expected) ]
# The values are set to be in the multiples of 10.
# Values are appx GB.
- ["NA", "NA", 1000000, 500000000, PASS] # [NA, NA, 1M, 512M, PASS]
- ["NA", "NA", 1000000, 3000000000, FAIL] # [NA, NA, 1M, 3G, FAIL]
- ["NA", "NA", 1000000000, 8000000000, PASS] # [NA, NA, 1G, 8G, PASS]
- [NA, NA, 1000000, 500000000, PASS] # [NA, NA, 1M, 512M, PASS]
- [NA, NA, 1000000, 3000000000, FAIL] # [NA, NA, 1M, 3G, FAIL]
- [NA, NA, 1000000000, 8000000000, PASS] # [NA, NA, 1G, 8G, PASS]

0 comments on commit c122a9a

Please sign in to comment.