VMware Ubuntu10.04 modifies the swap partition size

Source: Internet
Author: User
1. Run the free command to view the Swap partition size in the system. Show free-m: totalusedfreesharedbufferscacheMem: 100296438021410-/+ buffers/cache: 532470 Swap: 95132929. We can see that Swap is only 951 M and does not meet the Oracle-xe-client installation requirements.

1. Run the free command to view the Swap partition size in the system.

Free-m

Display:

Total used free shared buffers cache

Mem: 1002 964 38 0 21 410

-/+ Buffers/cache: 532 470

Swap: 951 32 929

We can see that Swap is only 951 M and does not meet the installation requirements of Oracle-xe-client.

1. 2. Create a Swap file.

Mkdir swap

Cd swap

Sudo dd if =/dev/zero of = swapfile bs = 1024 count = 100000

The following message is displayed. The count in the preceding command indicates the swap file size.

Recorded 100000 + 0 reads

Records 100000 + 0 writes

102400000 bytes (102 MB) Copied, 0.74704 seconds, 137 MB/second

. Convert the generated file into a Swap file

Sudo mkswap swapfile

Setting up swapspace version 1, size = 102395 kB

No label, UUID = 09fde987-5567-498a-a60b-477e302a988b

1. 4. Activate the Swap file.

Sudo swapon swapfile

View the free-m result again.

Total used free shared buffers cached

Mem: 1002 967 34 0 22 410

-/+ Buffers/cache: 534 467

Swap: 1053 32 1021

Added successfully.

Extension:

If you need to uninstall the swap file, you can enter the created swap file directory. Run the following command.

Sudo swapoff swapfile

If you need to keep this swap, you can write it into the/etc/fstab file.

Swapfilepath swap ults 0 0

NOTE: Refer to the last step swapfilepath swap defaults 0 0 above.
The specific operation is to open/etc/fstab in vi and append/xxx swap defaults 0 0 at the end.

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.