Skip to content
Merged
Changes from 1 commit
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
1 change: 1 addition & 0 deletions files/build_templates/docker_image_ctl.j2
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@ start() {
else

docker run -d {{docker_image_run_opt}} \
--log-opt max-size=2M --log-opt max-file=5 \
Copy link
Contributor

Choose a reason for hiding this comment

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

2M?

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

Maximal 5 files, each file maximal 2 MB. So in long term, the disk occupation should be 8 MB ~ 10 MB for each container.

Copy link
Contributor

Choose a reason for hiding this comment

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

leave some comments on how the number is picked?

Copy link
Collaborator Author

@qiluo-msft qiluo-msft May 6, 2017

Choose a reason for hiding this comment

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

I just want to set the maximal log size for each container to 10 MB. Then overall it will be ~100 MB on a switch.

Then I choose 2M * 5, so there is at least 8M log in long running. If choosing 5M * 2, then the log size will fluctuate between 5M ~ 10M, which is not so good if you need more history.

-v /var/run/redis:/var/run/redis:rw \
-v /usr/share/sonic/device/$PLATFORM:/usr/share/sonic/platform:ro \
-v /usr/share/sonic/device/$PLATFORM/$HWSKU:/usr/share/sonic/hwsku:ro \
Expand Down