fix: set memory swap double of non-zero memory value #1492
Merged
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
set value of memory swap double of non-zero memory value if
not specify --memory-sawp.
2x memory swap value is advised but not must.
You should typically size your swap space to approximately 2x main
memory for systems with less than 2GB of RAM, or approximately 1x main
memory if you have more. If you do not have a lot of RAM, though, you
will generally want a lot more swap. It is not recommended that you
configure any less than 256M of swap on a system and you should keep in
mind future memory expansion when sizing the swap partition. The
kernel's VM paging algorithms are tuned to perform best when there is at
least 2x swap versus main memory. Configuring too little swap can lead
to inefficiencies in the VM page scanning code as well as create issues
later on if you add more memory to your machine. Finally, on larger
systems with multiple SCSI disks (or multiple IDE disks operating on
different controllers), we strongly recommend that you configure
swap on each drive. The swap partitions on the drives should be
approximately the same size. The kernel can handle arbitrary sizes but
internal data structures scale to 4 times the largest swap partition.
Keeping the swap partitions near the same size will allow the kernel to
optimally stripe swap space across the N disks. Do not worry about
overdoing it a little, swap space is the saving grace of UNIX and even
if you do not normally use much swap, it can give you more time to
recover from a runaway program before being forced to reboot.'
Signed-off-by: Ace-Tang aceapril@126.com
Ⅰ. Describe what this PR did
Ⅱ. Does this pull request fix one issue?
Ⅲ. Describe how you did it
Ⅳ. Describe how to verify it
Ⅴ. Special notes for reviews