Understanding the pseudo-exchange, first of all we have to understand the concept of the exchange zone and the exchange mechanism of HP-UX!
In the swap zone, when the system's physical memory is insufficient, the OS is used to temporarily store some data in the physical memory to free up more physical memory space!
HP-UX swap mechanism: each time the system starts a process, it will reserve a certain am
The use of Digitalocean for a long time, a few days ago in the compilation of PHP when the process was killed situation, after my spit and communicate with others found that the reason for the memory exhaustion. In fact, because the MySQL process at that time consumed a lot of memory, and then feel the need to manually add swap (swap partition), so as not to compile any later when the process is K.On Linux
Linux swap partition control (swap partition lvm Management)Note: linux swap partitions are managed by lvm. The following method can be used for control. 1. View swap lv [root @ testdb ~] # Vgdisplay-v Finding all volume groups Finding volume group "VolGroup" --- Volume group --- VG Name VolGroup System ID Format lvm2
A summary of memory exhaustion:1) before the process receives an oom, the kernel refreshes the file system's cache to free up space.2) Move the Swap area page to disk.3) When memory becomes small, virtualization enables each process to make a simple context switch through the swap area.4) Out-of-memory (OOM) is raised to kill those processes when the process consumes the memory to swap.Therefore, we still n
To add a swap partition in Ubuntu:One advantage of adding this partition: The 32-bit system can recognize the memory size (without this partition, only 3 GB can be identified, and 4 GB can be recognized by this partition) 1. Check the status of the current swap partition: CAT/proc/meminfoSwaptotal: 0 KBSwapfree: 0 KBIf the two items above are both 0, there is no swap
1. Run the free command to view the Swap partition size in the system. Free-mtotalusedfreesharedbuffers
1. Run the free command to view the Swap partition size in the system.Free-m
Total used free shared buffers cachedMem: 2012 1960 51 0 748 950-/+ Buffers/cache: 260 1751Swap: 255 0 255
We can see that Swap is only 255 M. Next we will expand it to 2G.
2. Create
Article title: swap files without swap partitioning. Linux is a technology channel of the IT lab in China. Includes basic categories such as desktop applications, Linux system management, kernel research, embedded systems, and open source.
When installing linux, the system generally requires dividing a partition as a swap partition. However, the computer memory
Number (2,4, default4):4 theHex code (type L to list all codes):the ID of the *Changed type of partition'Linux'To'Linux Swap/solaris' $ Panax NotoginsengCommand (M forHelp ): P - theDISK/DEV/XVDB:32.2GB,32212254720bytes62914560Sectors +Units = sectors of1* += +bytes ASector size (logical/physical): +Bytes/ +bytes theI/O size (minimum/optimal): +Bytes/ +bytes + Disk label Type:dos -Disk identifier:0x25a2caf5 $ $ Device Boot Start End Blocks Id Syst
If SWaP space is used up, an error occurs. Therefore, we need to make a correct partition of the SWaP space when installing the system, and know how to increase the SWaP space when the Swap space is reduced. Here, we will briefly introduce how to increase the Swap space thro
Allocate swap partitions and swap partitions
1. The free command is used to view the usage of swap partitions.[Root @ localhost ~] # Free# View memory and swap partition usage◆ Cached: stores the read data in the memory.Read data directly from the memory without reading the hard disk, accelerating data reading.Cheng◆
Copy Code code as follows:
#!/bin/bash
Echo-e ' Date +%y%m%d%h%m '
Echo-e "Pid\t\tswap\t\tproc_name"
# Take out all directories in the/proc directory (the process name is the number is the process, others, such as sys,net, etc. store other information)
For PID in ' Ls-l/proc | grep ^d | awk ' {print $} ' | grep-v [^0-9] '
Todo
# There is only one way to let a process release swap: To restart the process. Or wait for it to be released au
Imagine a scenario where our Linux system runs out of swap space, in which case we want to expand the swap space using the swap partition, but in some cases there is no free partition available on the disk, so we can't expand it.
Therefore, in this case, we can use the swap file to increase the
Install Oracle to change swap space size 1. Check the current partition: www.2cto.com [root @ localhost] # free-m 2. Increase the swap partition file and size, if you want to increase the swap partition size by 2 GB, the command is written as follows, where count is equal to the expected block size. [Root @ localhost] # dd if =/dev/zero of =/home/
Amin Linux Learning notes swap partition First, the role:Swap partitions are swap partitions that swap with swap When the system is out of physical memory and have a significant impact on the performance of the Web Server by adjusting the swap partition size to improve serv
System recent special card, open "resource" in "System Monitor" to find "swap not avalibe". The original system per swap partition.My laptop is limited in storage space. First I download the disk partitioning tool gpartedsudo apt-get install gpartedThen use the manager to open the gparted and make the free space new to the Linux swap type. The space is given to
The swap partition is a Linux swap partition. The swap partition actually exists on the disk, but the Linux system can use it as memory, and swapping partitions can exchange data with real memory when the physical real memory is low. To put it simply is to take a space out of the disk as a storage area for memory. Although the disk is used as memory, the speed is
Swap is the ability to cope with the lack of physical memory, using the hard disk to temporarily place the information in memory.For the general host, the physical memory is almost enough, so it will not be used swap, but for the server, when encountering a large number of network requests may be used.When the swap is used, the host's hard drive lights will blink
Add swap swap partition
Swap-swap is a function similar to the virtual memory of Windows system, the use of a portion of the hard disk space virtual into memory, so as to solve the situation of insufficient memory capacity, because swap is a hard disk resource virtu
Rhel6.4 extended swap partition, rhel6.4 extended swap
Status: Red hat 6.4 swap partition is insufficient
Solution: Expand swap
========================================================== ======================================
Solution:
1. Create a swap file in a directo
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.