Skip to content

[dnm] set testpmd pod memory equals to hugepages #93

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 2 commits into
base: main
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 3 additions & 2 deletions testpmd-container-app/cnfapp/scripts/testpmd-wrapper
Original file line number Diff line number Diff line change
Expand Up @@ -58,7 +58,7 @@ CORES_STR=$LCORES
IFS=',' read -ra CORES_ARR <<< "$CORES_STR"
CORES_LEN=${#CORES_ARR[@]}
if [[ $CORES_LEN -gt $TESTPMD_CPU_COUNT ]]; then
echo "ERROR: Acutal cores (${CORES_LEN}) is greater than configured cores (${TESTPMD_CPU_COUNT})"
echo "ERROR: Actual cores (${CORES_LEN}) is greater than configured cores (${TESTPMD_CPU_COUNT})"
exit 1
fi

Expand All @@ -71,6 +71,7 @@ for item in "${ETH_PEER_LIST[@]}"; do
done

SOCKET_MEM=${socket_mem:=1024}
SOCKET_MEM_LIM=${socket_mem:=407904256}
MEMORY_CHANNELS=${memory_channels:=4}
FORWARDING_CORES=${forwarding_cores:=2}
RXQ=${rx_queues:=1}
Expand All @@ -81,7 +82,7 @@ STATS_PERIOD=${stats_period:=1}

RUN="/usr/local/bin/example-cnf/testpmd-run"
CMD="/usr/local/bin/example-cnf/testpmd"
CMD="${CMD} -l $LCORES --in-memory $PCI --socket-mem ${SOCKET_MEM} -n ${MEMORY_CHANNELS} --proc-type auto --file-prefix pg"
CMD="${CMD} -l $LCORES --in-memory $PCI --socket-mem ${SOCKET_MEM} -n ${MEMORY_CHANNELS} --proc-type auto --file-prefix pg --socket-limit ${SOCKET_MEM_LIM}"
CMD="${CMD} --"
CMD="${CMD} --disable-rss --nb-cores=${FORWARDING_CORES} --rxq=${RXQ} --txq=${TXQ} --rxd=${RXD} --txd=${TXD}"
CMD="${CMD} --auto-start ${ETH_PEER} --forward-mode=mac --stats-period ${STATS_PERIOD}"
Expand Down
2 changes: 1 addition & 1 deletion testpmd-lb-operator/roles/loadbalancer/defaults/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ image_testpmd: "quay.io/rh-nfv-int/testpmd-container-app-testpmd@sha256:eca74e7c
image_listener: "quay.io/rh-nfv-int/testpmd-container-app-listener@sha256:050c5f7117bd6135af48cf742600bd30ab8448fe12fcab44960c1508c10327b1" # v0.2.3

hugepage_1gb_count: 4Gi
memory: 1000Mi
memory: 4Gi
cpu: 6
forwarding_cores: 4

Expand Down
2 changes: 1 addition & 1 deletion testpmd-operator/roles/testpmd/defaults/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ image_testpmd: "quay.io/rh-nfv-int/testpmd-container-app-cnfapp@sha256:c0cbe35d7
size: 1

hugepage_1gb_count: 4Gi
memory: 1000Mi
memory: 4Gi
cpu: 6
forwarding_cores: 4

Expand Down