-
Notifications
You must be signed in to change notification settings - Fork 1.5k
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
Enable Multi DB #20305
Enable Multi DB #20305
Conversation
Double committed to Phoenixwing eddieruan-alibaba@9f9f4d8 and verified on vSONiC admin@PE3:~$ ps aux | grep redis |
/azpw ms_conflict |
@StormLiangMS, @liushilongbuaa Can you trigger the following command? Github Branch not ready |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This change is enabled in Phoenix wing and verified in Phoenix wing's daily sanity.
…ends on /etc/sonic/enable_multidb
Validated with phoenix wing vsonic image admin@PE3: |
@@ -1,5 +1,6 @@ | |||
{% if INSTANCES %} | |||
{% for redis_inst, redis_items in INSTANCES.items() %} | |||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Remove this unnecessary change?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
If there is no blank line here, all program:{{ redis_inst }} of critical_processes will be concentrated on one line, which will cause subsequent regular expression matching to fail.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
#Closed
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Does changing {%- endfor %}
to {% endfor %}
work? That will make the intention a bit clearer.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Changing {%- endfor %} to {% endfor %} works. I apply this change instead of adding blank line.
and revert chmod -f 0760 $sock_file
/azp run Azure.sonic-buildimage |
Azure Pipelines successfully started running 1 pipeline(s). |
/azp run Azure.sonic-buildimage |
Azure Pipelines successfully started running 1 pipeline(s). |
/azp run Azure.sonic-buildimage |
Azure Pipelines successfully started running 1 pipeline(s). |
@Pan-XT Could you add this build option ENABLE_MULTIDB in the multi DB HLD doc? |
@Pan-XT Could you also sonic-mgmt tests for multi DB. Though this option is not enabled by default, will be good to have these tests in sonic-mgmt. |
@kperumalbfn he replied it before. sonic-net/sonic-mgmt#15084. We need to build a new image with this compile flag is enabled, then reuse existing test cases. No need to create new one since we don't expect any differences except performance gain. |
I raise a PR sonic-net/SONiC#1855 |
Can you help to review this PR, I have already updated the description based on your suggestion |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks for the changes. Please update the HLD with the performance numbers.
}, | ||
"redis1": { | ||
"hostname" : "{{HOST_IP}}", | ||
"port" : 6378, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
pls note that env REDIS_PORT/BMP_DB_PORT need to be reserved, and port > 6400 is not used currently.
Enable Multi DB
Why I did it
Enable Multi DB for improving routing loading performance. The detail performancee data could be found in the following HLD
[HLD] MultiDB HLD
sonic-net/SONiC#1855
How I did it
modify [dockers/docker-database/Dockerfile.j2] and add [multi_database_config.json.j2]
modify [dockers/docker-database/docker-database-init.sh] to enable Multi DB if /etc/sonic/enable_multidb exists and ensure that the redis service has the necessary permissions to access /var/lib/$inst
modify [Makefile.work] [slave.mk] [files/build_templates/sonic_debian_extension.j2 ] for setting ENABLE_MULTIDB=y when building SONiC image.
some fix PR for multiple database process, otherwise redis instance cannot be launched correctly.
#20726 #20545 sonic-net/sonic-swss#3292
How I verified it
sonic-net/sonic-mgmt#15084