Linux divides its physical RAM (random access memory) into chucks of memory called pages. Swapping is the process whereby a page of memory is copied to the preconfigured space on the hard disk, called swap space, to free up that page of memory. The combined sizes of the physical memory(RAM) and the ...

learn more… | top users | synonyms

1
vote
1answer
1k views

How much RAM do I need to run a forum using Nginx, Gunicorn, Django?

I started an ec2 instance (micro) to test the amount of memory I have available to run a website but I was expecting having a bit more. So my question would be: How much RAM do I need to run a site ...
1
vote
2answers
133 views

How can I determine the method of this DDoS attack? [duplicate]

My server went down earlier - looks like a DDoS. A spike in traffic to around 13mbit, the swap goes from idle to maxed in about 5 minutes, and server stops responding. I would like to protect ...
0
votes
1answer
155 views

how do OS deal with dirty page if there is no swap space [closed]

As in text books OS will move dirty pages to swap space based on LRU algorithm and make space for new process in RAM. But how do OS do this if there is no swap.
4
votes
1answer
118 views

Is it sensible to use SLC swap as a RAM substitute on a VM host?

I have a few oldish servers running virtual machines but they are limited to 16GB RAM and that limits the number of VMs I can run and the options for RDS. I've added a RAID1 array of two Intel 311s: ...
0
votes
1answer
2k views

Very high Magento/Apache memory usage even without visitors (are we fooled by our hosting company?)

I am no server guy and we have issues with our speed so I come here asking for advise. We have a VPS with 2 cores and 2gb of RAM at a Magento specialized hosting company. Over the course of the last ...
1
vote
1answer
195 views

Swap space maxing out - JVM dying

I have a server running 3 WordPress instances, MySql, Apache and the play framework 2.0 on 64m initial & max heap. If I increase the max heap of the JVM that play is running in even by 16m I see ...
0
votes
1answer
116 views

how can I tell if there is a cpu trashing on my linux machine

I want to write a script that will kill my processes when my machine is doing "too much" swapping of process memory from disk to memory. What is the best way to determine that? I saw top has %wa and ...
4
votes
2answers
2k views

How is htop “Swp” calculated?

When I run htop (on OS X 10.6.8), I see something like this : 1 [||||||| 20.0%] Tasks: 70 total, 0 running 2 [||| 7.2%] Load average: 1.11 0....
4
votes
1answer
4k views

Using tmpfs + a very large swap partition for /tmp instead of a regular filesystem?

I have Linux server and I have a spare 500GB disk partition. I wanted to format it and use it for /tmp. The server occasionally runs some large data processing tasks so it can happen that /tmp will ...
4
votes
3answers
2k views

Should I use swap in KVM guest?

Now I'm trying to create KVM templates with CentOS and I'm not sure should I create swap partition on guest OS or not. In future it will be lot's of small VPS with 256-1024Mb RAM and if swap partition ...
4
votes
2answers
2k views

How to read `top`. Process list says processes have swap but overview says no swap is being used

I am using top to monitor my server. The swap row reads Swap: 1044220k total, 0k used, 1044220k free, 148544k cached I have hit O p to sort by swap. PID USER PR NI VIRT RES ...
3
votes
2answers
6k views

Linux cached memory: Over 85% of cached memory and using swap

I read about Linux and cachd memory at linuxatemyram but there is something that doesn't make sense to me, if the server have even a low load, instead of freeing some cached memory it starts using ...
3
votes
3answers
842 views

Disadvantages of a large swap partition

I'm aware that there is a huge performance decrease when using swap memory, but if you have wasted hard drive space is there any disadvantages to having (hopefully not using) a large swap partition?
3
votes
2answers
2k views

Why is my KVM, RHEL6.2 server swapping?

I have a RHEL6.2 server that I'm using to run KVM virtual machines. The server itself has 16 GB of RAM. I want to see the biggest VM I can run on it and not let the qemu-kvm process swap. The VM ...
0
votes
1answer
1k views

My server is running out of memory, despite having all swap free

I am using Debian 6 (Squeeze). The server has 4gb of memory in it, and 8gb of swap. I'm starting to get memory alloc errors at high application load times, but from top command: Mem: 4055944k total,...
4
votes
1answer
108 views

How to lock a process in RAM (make it unswapable)

Is there a way to instruct the kernel (Linux kernel) to never swap a certain process that has already been started?
0
votes
1answer
162 views

CentOS - Convert swap memory to regular?

Take a look at this screenshot that I took after doing free -m: http://gyazo.com/aa54d264956e56acb99024e2374de0c0.png?1340387738 I notice that I have a ton of swap memory not being used, could I ...
1
vote
2answers
610 views

Maximum swap file size

I'm doing some file processing that seems to require an enormous swap file: even 20Gb isn't enough. What's the theoretical maximum? Running swapon on a 1Tb file resulted in: swapon: /mnt/big/swap....
-4
votes
1answer
96 views

How to control the memory usage of a swap partiotion? [closed]

Thats pretty much the quesiton: how can I control the memory usage of each swap partiotion, say /etc/sa5?
6
votes
2answers
4k views

How do I enable swap file on my server?

I've followed this but when I run:- #swapon /swapfile1 I get::- swapon: /swapfile1: swapon failed: Operation not permitted The system is extremely slow with 1GB of RAM trying to run ...
0
votes
4answers
166 views

On a virtual Linux system where storage is on network what's the point of the swap file? [closed]

The Linux servers are running on some VMWare ESX systems (guessing, I'm just user). These systems don't have the disks directly attached: they perform everything on a virtual disk that is actually a ...
0
votes
3answers
1k views

With Xen, when is Swap used?

I have a 512MB Xen VPS with 1024MB Swap. When I SSH into it and type "free -m", it shows I have around 50MB free memory. I had recently downgraded from a 1024MB plan because I didn't need the memory....
0
votes
1answer
920 views

LVM cannot detect my swap or '/' volume group but why is the swap still present

i have a server (hp x86 blade running OEL/RHEL5) that has a faulty lvm filter configured in lvm.conf filter = ["a|^/dev/emcpower.*|", "r/.*/"] we also use cciss devices so there should have been an ...
1
vote
3answers
898 views

I/O rate and CPU Eating up Server making terribly slow site

My server (Ubuntu 10.04 Lucid LAMP Stack) on linode (1024MB ram, 40 GB storage, 400 GB Transfer) is loading terribly slow. My site (WordPress) is relatively small (1.5 Gigs of mysql) and gets around ...
3
votes
1answer
317 views

Force process pages to get unswapped

I started 4 processes doing heavy computations. The machine has 4 full cores, and each process is single-threaded, so they don't compete for CPU. However I realized that they require more memory than ...
9
votes
2answers
6k views

Ubuntu Linux: Process swap memory and memory usage

My Ubuntu eats more memory than the task manager is showing: sudo ps -e --format rss | awk 'BEGIN{c=0} {c+=$1} END{print c/1024}' 2750.29 free -m total used free ...
5
votes
1answer
372 views

Mysterious swap usage on EC2

We're in the middle of a project to move our infrastructure from a co-lo situation into Amazon EC2 and we've noticed some weird memory characteristics of the processes in our setup. Without going into ...
1
vote
1answer
2k views

Centos server not using SWAP properly and getting OOM

Recently I've been having some serious memory issues with my server. Just the other day, my server became completely unresponsive, and oom-killer started killing services at random (httpd, php, etc). ...
5
votes
5answers
2k views

What happens if you run out of RAM and swap?

Running MySQL on a box with 32 gigs of RAM. Swap is 99% full, and there is about 200 MB of RAM free. MySQL is the culprit of course. What happens when both RAM and swap are completely filled? Thanks!
4
votes
1answer
546 views

Apache is not using SWAP and it's reporting page allocation failure

Check the logs: httpd: page allocation failure. order:4, mode:0xd0 Call Trace: [<ffffffff8000f696>] __alloc_pages+0x2ef/0x308 [<ffffffff80017a40>] cache_grow+0x139/0x3c7 [<...
1
vote
2answers
372 views

swap partition alignment: is there any benefit?

On some of my Linux servers, the swap partition is misaligned. I understand how partition alignment affects performance on mounted file systems with 4k block sizes, but I am unsure if the same ...
1
vote
2answers
1k views

How to make Swap work? CENTOS 5.7

I've got a Centos 5.7 running Magento with nginx. I also got there 10GB of Swap. But the os never use it. How can i make it work?
1
vote
2answers
146 views

Swap on Ubuntu and CentOS

I have two questions, which is both related to a swap partition or file. Is it possible to install either Ubuntu or CentOS without a swap configured, without tinkering? Live CDs like Ubuntu, is ...
2
votes
1answer
916 views

Server refuses to use swap partition

We are running a server with 23 cores (cpuinfo shows 22 as the highest process number) and 66 Gig RAM. The development team here is running some apps, which hogs memory. I have observered that: 1. ...
1
vote
2answers
152 views

Kill or revive a process based on system memory usage

Consider a system with limited memory, like a smallish VPS. Suppose there are a handful of processes that need to stay alive, and one process "P" that would be nice to have around, but is not ...
6
votes
1answer
10k views

How to free swap without rebooting (to avoid hourly alert emails)?

I get alert emails whenever swap usage is at 100%. In my case, swap usage doesn't reduce later on (even though memory is free) so I get an alert email every hour. How can I reduce swap usage without ...
15
votes
8answers
14k views

Should I completely turn off swap for linux webserver?

Recently my friend told me that it is a good idea to turn off swap on linux webservers with enough memory. My server has 12 GB and currently uses 4GB (not counting cache and buffers) under peak load. ...
9
votes
3answers
21k views

How to increase swap size?

Recently, I put more ram into my server and now I have got a total of 24GB of RAM. Originally, I setup the OS to have a 2GB swap size. /dev/sdc1 1 281 2257101 82 Linux ...
2
votes
3answers
1k views

top reports swap at 100%, free memory available

On RedHat 5 servers, we see top reporting swap has 0k free. vmstat shows the same amount of swap used, but no paging. We kill our only app, and top still reports 100% of swap used. If we reboot, ...
0
votes
3answers
361 views

Socket and Swap Space

I have a system that is running out of memory and has a lot of open connections. but my swap space is not being used up that much. Can socket/socket file descriptors use swap space? This is for a ...
2
votes
1answer
459 views

Windows Server: Prevent process swapping/paging

Is there a possibility to prevent swapping for a single process? This process is an in-memory-database and should not be moved to virtual ram. all other processes should still be swap-able. I ...
2
votes
2answers
456 views

Should swap space be in a logical volume, or directly on disk?

What are the benefits of putting swap into a logical volume over using direct disk access? For example, with a fresh, default install of RHEL5 or 6, a volume group is created on the default disk ...
2
votes
1answer
282 views

Ubuntu Swap on EC2 with an EBS root

Running Ubuntu 11.04(natty) on an EC2 micro instance. Setup 1gb swap file at /mnt/swap. Works fine until I reboot and then the swap is not active. I can activate it manually using swapon -a, but my ...
5
votes
1answer
13k views

why is kswapd using high CPU on an idle system?

I have an idle Linux centOS system and yet kswapd is using 100% cpu. All I have running is a single bash session with top running.... I have 32G RAM and yet kswapd is constantly using 100% cpu for ...
10
votes
3answers
43k views

How do I tell what process is causing kswapd to be in use?

I see kswapd using 100% CPU... how can I tell on which process's behalf kswapd is being used so much?
8
votes
1answer
674 views

Create swap file on a running Linux machine

Our company web sites have just been moved from a shared host to a VDS, as the hosting company plans on retiring the less than completely reliable shared hosting server(s). The VDS only has 256MB of ...
8
votes
4answers
5k views

How to create a randomly keyed, encrypted swap partition, referring to it “by-uuid”, on Debian?

It is sensible that if you have any sort of block device encryption implemented on your GNU/Linux system, to encrypt your swap partition too, as any decrypted data may be written in cleartext at any ...
2
votes
2answers
140 views

Tuning windows virtual memory/paging for a specific workload

I have a specific ram-intensive program I run which slows down my entire system for hours after each run - does the Windows NT 6.0/6.1 kernel have any tunables to encourage processes' working sets to ...
1
vote
1answer
204 views

Reasonable memory limit alarm for 2GB machine running RHEL5 OS

We have a bunch of servers with the below configuration: Dual Core single processor 2GHz with 1 MB Cache. Swap is enabled with 1GB limit Memory - 2GB OS - RHEL5.3 64bit One of our alarms is ...
9
votes
2answers
7k views

Why does Windows 2008 use swap before the memory is full?

I administer a Windows 2008 server (well, on Amazon EC2) running IIS and a .NET4 Web app. I got a memory alert the other day and went and looked, and sure enough the process memory had grown over ...