Adjust swap under CentOS

Source: Internet
Author: User

[[email protected]/]# mkdir swap

[[Email protected]/]# CD swap

[[email protected] swap]# dd If=/dev/zero of=swap1 bs=1024 count=524288

Recorded 524288+0 read-in

Recorded the writing of 524288+0.

536870912 bytes (537 MB) Replicated, 2.15306 sec, 249 mb/sec

[Email protected] swap]# Mkswap SWAP1

Setting swap space version 1, size = 524284 KiB

No label, UUID=CA910746-6D60-4CE7-9643-4C1FEEC599A4

[Email protected] swap]# Swapon SWAP1

Swapon:/swap/swap1: Unsafe Permissions 0644, 0600 is recommended.

[Email protected] swap]# Vim/etc/fstab

Add a line:

/swap/swap1 None swap SW 0 0

[Email protected] swap]# swapon-s

File name type size used permission

/dev/dm-0 Partition 2129916 38980-1

/swap/swap1 file 524284 0-2

Finish the call.

Participating Address: http://2sitebbs.com/thread-804-1-1.html

Adjust swap under CentOS

Related Article

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.