oracle 11g 安裝關於swap空間不足問題解決

來源:互聯網
上載者:User

linux添加虛擬記憶體解決swap空間不足問題

增加一個SWAP檔案:


1. 查看當前虛擬記憶體

[root@ora11gr2 ~]# free -m

             total       used       free     shared    buffers     cached
Mem:          2026        217       1809          0         11        126
-/+ buffers/cache:         78       1947
Swap:         2047          0       2047
[root@ora11gr2 ~]# 

[root@ora11gr2 ~]# 

[root@ora11gr2 mapper]# ll
total 0
crw------- 1 root root  10, 63 Mar 19 00:11 control
brw-rw---- 1 root disk 253,  0 Mar 19 00:11 VolGroup00-LogVol00
brw-rw---- 1 root disk 253,  1 Mar 19 00:11 VolGroup00-LogVol01
[root@ora11gr2 mapper]# 

[root@ora11gr2 mapper]# 


2. 將當前swap空間由2047mb增加到3047mb 新增一個1024mb 的swap 檔案

[root@ora11gr2 mapper]# dd if=/dev/zero of=/home/swap bs=1024 count=1024000
1024000+0 records in
1024000+0 records out

1048576000 bytes (1.0 GB) copied, 29.5369 seconds, 35.5 MB/s


3.執行以下命令增加並啟用虛擬記憶體

[root@ora11gr2 mapper]# mkswap /home/swap 

Setting up swapspace version 1, size = 1048571 kB
[root@ora11gr2 mapper]# swapon /home/swap 
[root@ora11gr2 mapper]# cd /home/
[root@ora11gr2 home]# ll
total 1025008
drwx------ 3 oracle oinstall       4096 Mar 18 23:49 oracle
-rw-r--r-- 1 root   root     1048576000 Mar 19 00:14 swap

[root@ora11gr2 home]# free -m
             total       used       free     shared    buffers     cached
Mem:          2026       1232        793          0         13       1127
-/+ buffers/cache:         92       1934
Swap:         3047          0       3047

相關文章

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.