Skip to content

Commit

Permalink
cephadm: do not use huge pages for nvmeof spdk
Browse files Browse the repository at this point in the history
depends on: ceph/ceph-nvmeof#898

Signed-off-by: Alexander Indenbaum <[email protected]>
  • Loading branch information
Alexander Indenbaum committed Oct 15, 2024
1 parent 8723f17 commit 6bcb98d
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 12 deletions.
10 changes: 1 addition & 9 deletions src/cephadm/cephadmlib/daemons/nvmeof.py
Original file line number Diff line number Diff line change
Expand Up @@ -73,8 +73,6 @@ def _get_container_mounts(
os.path.join(data_dir, 'ceph-nvmeof.conf')
] = '/src/ceph-nvmeof.conf:z'
mounts[os.path.join(data_dir, 'configfs')] = '/sys/kernel/config'
mounts['/dev/hugepages'] = '/dev/hugepages'
mounts['/dev/vfio/vfio'] = '/dev/vfio/vfio'
mounts[log_dir] = '/var/log/ceph:z'
if mtls_dir:
mounts[mtls_dir] = '/src/mtls:z'
Expand Down Expand Up @@ -198,12 +196,6 @@ def configfs_mount_umount(data_dir, mount=True):
)
return cmd.split()

@staticmethod
def get_sysctl_settings() -> List[str]:
return [
'vm.nr_hugepages = 4096',
]

def container(self, ctx: CephadmContext) -> CephContainer:
ctr = daemon_to_container(ctx, self)
return to_deployment_container(ctx, ctr)
Expand All @@ -222,4 +214,4 @@ def customize_container_args(
args.append(ctx.container_engine.unlimited_pids_option)
args.extend(['--ulimit', 'memlock=-1:-1'])
args.extend(['--ulimit', 'nofile=10240'])
args.extend(['--cap-add=SYS_ADMIN', '--cap-add=CAP_SYS_NICE'])
args.extend(['--cap-add=CAP_SYS_NICE'])
Original file line number Diff line number Diff line change
Expand Up @@ -55,6 +55,9 @@ timeout = {{ spec.spdk_timeout }}
bdevs_per_cluster = {{ spec.bdevs_per_cluster }}
log_level = {{ spec.spdk_log_level }}
conn_retries = {{ spec.conn_retries }}
{% if spec.spdk_mem_size %}
mem_size = {{ spec.spdk_mem_size }}
{% endif %}
transports = {{ spec.transports }}
{% if transport_tcp_options %}
transport_tcp_options = {{ transport_tcp_options }}
Expand Down
6 changes: 3 additions & 3 deletions src/python-common/ceph/deployment/service_spec.py
Original file line number Diff line number Diff line change
Expand Up @@ -1345,7 +1345,7 @@ def __init__(self,
client_key: Optional[str] = None,
client_cert: Optional[str] = None,
root_ca_cert: Optional[str] = None,
spdk_path: Optional[str] = None,
spdk_mem_size: Optional[int] = None,
tgt_path: Optional[str] = None,
spdk_timeout: Optional[float] = 60.0,
spdk_log_level: Optional[str] = 'WARNING',
Expand Down Expand Up @@ -1434,8 +1434,8 @@ def __init__(self,
self.client_cert = client_cert
#: ``root_ca_cert`` CA cert for server/client certs
self.root_ca_cert = root_ca_cert
#: ``spdk_path`` path to SPDK
self.spdk_path = spdk_path or '/usr/local/bin/nvmf_tgt'
#: ``spdk_mem_size`` memory size in MB for DPDK
self.spdk_mem_size = spdk_mem_size
#: ``tgt_path`` nvmeof target path
self.tgt_path = tgt_path or '/usr/local/bin/nvmf_tgt'
#: ``spdk_timeout`` SPDK connectivity timeout
Expand Down

0 comments on commit 6bcb98d

Please sign in to comment.