General :: Find Out Processes Are Using Swap Space?
Jun 21, 2011
I have a linux server top reports about 9GB of swap used:But I cannot figure where's it use swap, some google results said that top - O commad follow by p will show swap usage by process. But as shown in the above image, taking a brief sum of the SWAP column shows that > 10GB of swap is used, so where does the 9GB figure for swap usage come from? Top reports that about 96492kb of ram is used by buffers. Is there anything I can do to utilize this, instead of using swap?
On one of my servers the "free" command tells me that a lot of swap space are in use. What I'd like to do is to determine which processes have been swapped out. I tried issuing "top" and sort by the "swap" column, but this doesn't seem to provide correct values - when performing the same excersize on another server with close to no pages swapped out, the sum when adding the swap value for each process greatly exceeds the swap usage reported by "free". So how do I go about determining the swap space used for individual processes?
While installing slackware64-current, setup cannot find swap space. This is an extreme case pushing limits with a huge GPT partition table. So there is probably some limit on the number of partitions, or partition number, the swap search looks for. Of 41 partitions I made scattered around the number range from 1 to 128, the swap space exists as partition 90. Maybe the problem is it can only check partitions 1-15 because 16 and beyond have to use a different device major number? When I do proceed with the install, /dev/sda90 is listed as a choice. FYI, so many partitions is planning ahead for a multi-boot system. The rest of the install went OK.
a friend of mine recently installed Ubuntu in his Laptop however is running really slow. It's Dell 1520 so I don't think the computer is that slow. I think what the problem is that he doesn't have a swap space. ok, I could use GPARTED to resize the HD and create SWAP space but how can I tell the system to permanently use that space?
I have a rel 5.6 system that we just added more memory to.
1. What is the correct or best way to increase swap? 2. Can I remove the swap space later on? 3. How do you remove it when done?
Our rootvg only has 8G available to it and I want to be sure if i allocate anything out to it I can reclaim when done without having to rebuild the system.
We have to do a lot of data moves so we allocated extra memory to this VM system and now we need to increase swap. I did see several articles in google but they describe using a new swap partition, a swap file and increasing an existing swap space. I am still not sure what is the best way to go knowing this is a temp situation.
When we want to setup a linux system, there is a common a suggestion like set the swap space as twice as big than your physical memory, I want to know why do we need this and how is this suggestion come from?
Closest analogy I can compare what I want to, is like the `sync` command, which writes out all stuff in the disk buffers, freeing the buffers.Instead of disk buffers, I want to 'clean out' my RAM and SWAP of any/all junk that's accumulated in there over the time my PC has been up. I've long wondered about this, but never asked, though I recall searching around several times..When I first boot it cold and log in, the memory usage bar on my desktop is near zero, and the swap is empty. But after a week or 2 or 3 or more of uptime, and with Firefox always running with a dozen tabs or so at any given time, I end up with all the memory full or 'filled with cached stuff', and the swap space is filled to capacity.Curiousity: I blame Firefox for leaking memory, but even if that's still the case today (historically it was) can this all be blamed on Firefox? Or what-all causes this, besides Firefox- just..Everything?
Here's current stats:
sasha@reactor: uptime 21:21:42 up 30 days, 10:07, 3 users, load average: 0.02, 0.05, 0.01 sasha@reactor: free total used free shared buffers cached
So, 3.8 of 4 Gib of RAM is occupied, and the 1 Gib swap space is jammed full 100%. This must slow things down to some degree, yes? I mean, the kernel does have to keep track of this, right?Of course closing all the applications doesn't make a difference (not an appreciable one anyhow) and the only way I have found to start fresh is to reboot.
Wish a script which would delete cache content and remove additional files which have been downloaded via the internet and saved voluntarily by the user and files any thing other than those used by the OS in linux.Need a command which could make the execution of the above script possible before the shut down command is passed.
I am developing a daemon that is acting up and I am now unable to create any new processes (ie. I cannot start a new process to kill the other rogue processes). So, I need to be able to kill the processes from a remote machine. How do I do "kill" remotely without admin privileges? If I cannot kill my own process from a remote machine as a normal user then tell me so I can mark it as the correct answer.
I have written a script that triggers a mail if the server load average goes beyond a specific value.
The mail contains following field Current Load average. Top 10 CPU utilized processes.
Code: ps -auxf | sort -nr -k 3 | head -10 Top 10 Memory Utilized processes.
Code: ps -auxf | sort -nr -k 4 | head -10
But the problem is that whenever there is any disk related activity happens the load gets high and the command (for ex.mkfs.ext3 /dev/sdb1, dd,scp,cp)which are the main cause behind the load average doesnt get displayed in top 10 CPU/Memory Utilized processes.
Is there any way of finding top 10 processes for Disk related activity?
i had to install oracle in my laptop...it required a certain amount of swap space which i didnt have... i tried to create it using the datadump command... dd if=/dev/zero of=/extraswapf bs=1M count=512 i then rebooted and made the swapfile using: mkswap /extraswap i then made the entry in /etc/fstab as follows "/extraswap swap swap default 0 0" and i used the command : swapon /extraswap the swap space was visible after that... but after rebooting the swap space is not visibille
When i first installed ubuntu about 2 weeks i left about 30gb left for windows vista. I have not used vista at all so i decided to delete it and use the whole hard drive for ubuntu. I got the liveCD out and went into the partition editor on that (i had ubuntu,swap,vista in that order) and deleted the swap space and vista and increased the size of the Ubuntu partition to so there was only 4gb left for swap. I then booted up again from the hard drive and i get this message "one or mounts cannot be mounted" or something to that effect and it talks about the swap partition and offers to boot in recovery mode which does work.Once in recovery mode i go in and try and make swap partition with Disk Utility and i do that and it works. I go to restart Ubuntu to test it out and the same problem happens again, cannot mount swap ect. so i go back into Disk Utility and it now says 4gb Unrecognized instead of swap
Before I start a flame war, I'd like to qualify my question with...I have a boatload of ram and a VERY thin install.(CLI openSuse 11.4-64) If I'm running the most baseline, text-only-install...and the whole system install is like 2GB or less, and I have 8GB of ram (which I could easily upgrade to 16). At install time...do I really need a swap partition at all? What purpose could a swap serve if I have that much ram in such a trimmed down environment?
I had just installed gparted , not used yet.I have a problem , at the time of installation i havent created necessary swap space , my linux partition contains 30GB with ext2 filesystem..I'm fully having this , but my question is with the above mentioned tool can I recreate swap space from this 30GB , like 20GB as user space and rest 10 as swap space . Can I?
I am currently running 32 bit ubuntu in my PC with 2.5 GB RAM, Intel Pentium Dual Core inside. I am coming to debian soon. I will be installing 64 bit squeeze. Now I have 3 GB of swap space. I do satellite image processing. Therefore what is the recommended swap space for me with the kind of work I do. RAM is in very small amount but as of now I have to stay with it.
Also I am interested to know would KDE be an overkill for my machine. Will I run short of memory when I start image processing?