Skip to content
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

Define table size per scaling test #644

Merged
merged 3 commits into from
Nov 20, 2024
Merged

Conversation

jimmyzhai
Copy link
Collaborator

@jimmyzhai jimmyzhai commented Nov 12, 2024

This pull request adds a new header file defines.h for constants definitions. It defines different table sizes for outbound routing and ca_to_pa mapping according to hero-implementation-details.

The hardcoded table sizes of outbound routing and ca_to_pa mapping, whose size 4M and 8M respectively (from #592) take up too much memory by default. This memory pressure could make low-RAM KVM DPU crash and be unusable with sonic mgmt test.

The below shows the dash pipeline memory usage of the container simple_switch with different scale number of routing and mapping.

1. 4M/8M 
junhuazhai@junhuazhai-dev-vm:~/workspace/DASH/dash-pipeline$ docker stats --no-stream simple_switch-junhuazhai
CONTAINER ID   NAME                       CPU %     MEM USAGE / LIMIT     MEM %     NET I/O   BLOCK I/O   PIDS
00016dc28662   simple_switch-junhuazhai   0.08%     1.799GiB / 62.78GiB   2.87%     0B / 0B   0B / 0B     20

2. 4K/8K
junhuazhai@junhuazhai-dev-vm:~/workspace/DASH/dash-pipeline$ docker stats --no-stream simple_switch-junhuazhai
CONTAINER ID   NAME                       CPU %     MEM USAGE / LIMIT     MEM %     NET I/O   BLOCK I/O   PIDS
bcb858280193   simple_switch-junhuazhai   0.08%     46.63MiB / 62.78GiB   0.07%     0B / 0B   0B / 0B     20

@jimmyzhai jimmyzhai requested a review from r12f November 12, 2024 11:21
#ifndef _DASH_DEFINES_H_
#define _DASH_DEFINES_H_

#ifdef TABLE_FULL_SCALE
Copy link
Collaborator

@r12f r12f Nov 12, 2024

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

will be better to use TABLE_BABY_HERO_SCALE

Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

TABLE_BABY_HERO_SCALE i believe it is in the range of 80K to 320K can we at least have the default limits increased to that
image

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Use TABLE_HERO_SCALE/TABLE_BABY_HERO_SCALE for hero/baby-hero respectively.

@r12f
Copy link
Collaborator

r12f commented Nov 12, 2024

thanks a lot Junhua for making this change!

@jimmyzhai jimmyzhai changed the title Reduce outbound routing to 4k and mapping to 8k by default Define table size per scaling test Nov 14, 2024
Copy link
Collaborator

@r12f r12f left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM, thanks for getting the numbers and macro align with the spec!

@r12f
Copy link
Collaborator

r12f commented Nov 14, 2024

@mgheorghe , would you like to take another look?

@r12f r12f merged commit aa2cde5 into sonic-net:main Nov 20, 2024
11 checks passed
@jimmyzhai jimmyzhai deleted the outbound_routing branch November 21, 2024 02:14
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants