diff options
author | Ilya Maximets <i.maximets@samsung.com> | 2019-01-29 11:11:50 +0300 |
---|---|---|
committer | Ian Stokes <ian.stokes@intel.com> | 2019-02-01 12:57:17 +0000 |
commit | 8411b6ccecdede73e89c4595025f6c72fb2cccc3 (patch) | |
tree | e957aa38252d471f4b7600767966dc14a559bef5 /vswitchd | |
parent | dbcb014d1f0de388c8869a2b8803a21ba81b02ee (diff) | |
download | openvswitch-8411b6ccecdede73e89c4595025f6c72fb2cccc3.tar.gz |
dpdk: Limit DPDK memory usage.
Since 18.05 release, DPDK moved to dynamic memory model in which
hugepages could be allocated on demand. At the same time '--socket-mem'
option was re-defined as a size of pre-allocated memory, i.e. memory
that should be allocated at startup and could not be freed.
So, DPDK with a new memory model could allocate more hugepage memory
than specified in '--socket-mem' or '-m' options.
This change adds new configurable 'other_config:dpdk-socket-limit'
which could be used to limit the ammount of memory DPDK could use.
It uses new DPDK option '--socket-limit'.
Ex.:
ovs-vsctl set Open_vSwitch . other_config:dpdk-socket-limit="1024,1024"
Also, in order to preserve old behaviour, if '--socket-limit' is not
specified, it will be defaulted to the amount of memory specified by
'--socket-mem' option, i.e. OVS will not be able to allocate more.
This is needed, for example, to disallow OVS to allocate more memory
than reserved for it by Nova in OpenStack installations.
Signed-off-by: Ilya Maximets <i.maximets@samsung.com>
Signed-off-by: Ian Stokes <ian.stokes@intel.com>
Diffstat (limited to 'vswitchd')
-rw-r--r-- | vswitchd/vswitch.xml | 22 |
1 files changed, 22 insertions, 0 deletions
diff --git a/vswitchd/vswitch.xml b/vswitchd/vswitch.xml index 88edb5d35..1db4e8694 100644 --- a/vswitchd/vswitch.xml +++ b/vswitchd/vswitch.xml @@ -333,6 +333,28 @@ </p> </column> + <column name="other_config" key="dpdk-socket-limit" + type='{"type": "string"}'> + <p> + Limits the maximum amount of memory that can be used from the + hugepage pool, on a per-socket basis. + </p> + <p> + The specifier is a comma-separated list of memory limits per socket. + <code>0</code> will disable the limit for a particular socket. + </p> + <p> + If not specified, OVS will configure limits equal to the amount of + preallocated memory specified by <ref column="other_config" + key="dpdk-socket-mem"/> or <code>--socket-mem</code> in + <ref column="other_config" key="dpdk-extra"/>. If none of the above + options specified or <code>--legacy-mem</code> provided in + <ref column="other_config" key="dpdk-extra"/>, limits will not be + applied. + Changing this value requires restarting the daemon. + </p> + </column> + <column name="other_config" key="dpdk-hugepage-dir" type='{"type": "string"}'> <p> |