ÄÚ´æ½»»»¿Õ¼äµÄ¹¹½¨
ÎÒÃÇÖªµÀCPU¼ÆËãÓëÊý¾ÝµÄ´æ´¢¶¼»áʹÓõ½Äڴ棬ʹÓÃÄÚ´æ¿ÉÒÔ´ó´ó¼õÉÙ´Ó´ÅÅ̶ÁÈ¡µÄʱ¼ä£¬µ«Êǵ±ÎïÀíÄÚ´æ²»×ãʱ£¬¾ÍÐèÒªÔÝʱ½«Óò»µ½µÄ³ÌÐòºÍÊý¾ÝŲµ½ÄÚ´æ½»»»¿Õ¼ä(swap)
×÷·¨£º
1. ´´½¨·ÖÇø£¨fdisk ,Îļþ£©
2. ¸ñʽ»¯Îªswap
3. Æô¶¯
4. ²é¿´
´´½¨·ÖÇø
¾ÙÀý
[root@bogon ~]# fdisk /dev/sda
The number of cylinders for this disk is set to 2610.
There is nothing wrong with that, but this is larger than 1024,
and could in certain setups cause problems with:
1) software that runs at boot time (e.g., old versions of LILO)
2) booting and partitioning software from other OSs
(e.g., DOS FDISK, OS/2 FDISK)
Command (m for help): p
Disk /dev/sda: 21.4 GB, 21474836480 bytes
255 heads, 63 sectors/track, 2610 cylinders
Units = cylinders of 16065 * 512 = 8225280 bytes
Device Boot Start End Blocks Id System
/dev/sda1 * 1 13 104391 83 Linux
/dev/sda2 14 1288 10241437+ 83 Linux
/dev/sda3 1289 1925 5116702+ 83 Linux
/dev/sda4 1926 2610 5502262+ 5 Extended
/dev/sda5 1926 2052 1020096 82 Linux swap / Solaris
/dev/sda6 2053 2115 506016 83 Linux
Command (m for help): t
Partition number (1-6): 6
Hex code (type L to list codes): 82
Changed system type of partition 6 to 82 (Linux swap / Solaris)
Command (m for help): p
Disk /dev/sda: 21.4 GB, 21474836480 bytes
255 heads, 63 sectors/track, 2610 cylinders
Units = cylinders of 16065 * 512 = 8225280 bytes
Device Boot Start End Blocks Id System
/dev/sda1 * 1 13 104391 83 Linux
/dev/sda2 14 1288 10241437+ 83 Linux
/dev/sda3 1289 1925 5116702+ 83 Linux
/dev/sda4 1926 2610 5502262+ 5 Extended
/dev/sda5 1926 2052 1020096 82 Linux swap / Solaris
/dev/sda6 2053 2115 506016 82 Linux swap / Solaris
Command (m for help): w
The partition table has been altered!
Calling ioctl() to re-read partition table.
WARNING: Re-reading the partition table failed with error 16: É豸»ò×ÊԴæ.
The kernel still uses the old table.
The new table will be used at the next reboot.
Syncing disks.
part[root@bogon ~]# partprobe
ÕâÀïÐèÒªÔÚ½øÐÐÉèÖÃÏÂsystem ID
¸ñʽ»¯
Óï·¨£ºmkswapÉ豸Ãû³Æ
¾ÙÀý
[root@bogon ~]# mkswap /dev/sda6
Setting up swapspace version 1, size = 518156 kB
Æô¶¯|¹Ø±Õ
Óï·¨£ºswapon [-s]É豸Ãû³Æ
swapoffÉ豸Ãû³Æ
Ñ¡ÏîÓë²ÎÊý£º
-s:²é¿´ËùÓÐswapÎļþϵͳ
¾ÙÀý1£ºÆô¶¯swap
[root@bogon ~]# swapon /dev/sda6
¾ÙÀý2£º²é¿´ËùÓÐswap
[root@bogon ~]# swapon -s
Filename Type Size Used Priority
/dev/sda5 partition 1020088 0 -1
/dev/sda6 partition 506008 0 -2
²é¿´
Óï·¨£ºfree
¾ÙÀý
total used free shared buffers cached
Mem: 2074972 1380996 693976 0 106740 1000288
-/+ buffers/cache: 273968 1801004
Swap: 1526096 0 1526096
¿ÉÒÔ¿´µ½Swap¿Õ¼äÔö¼Ó1526096¡£
×÷Õߣºtiankefeng