General :: Lucid With 1GB RAM Hangs And Swap Usage Very Low
Jan 1, 2011
I have Ubuntu 10.04 installed on my PC with 1GB of RAM and 3GB of Swap partition. But the machine gets hung or reboots itself when the usage is even marginally higher. This is the output of "free -m" for Swap:
Swap: 2908 11 2897
I have tried increasing the swappiness to 80, and this not made any difference. I believe the RAM is taking up all the load and none of the pages are going in to the swap. Hence the slow response and the frequent hung system. I know this is an old PC but Windows XP (installed on another HDD) runs way better on the same configuration.
I'm using slackware about a month now and two days ago I checked to see the usage of my RAM and I saw that there was no swap, no used, no total, nothing! (how can this be?) swap -s returned nothing, I checked fstab and there was swap there so I entered the line about swap:
I believe it' s correct. I checked after restart with "free" and the total was ok but used is 0. I copied about 5 GB to see what would happen and still nothing. RAM was nearly full but still no swap used!
No matter what I do, the SWAP usage remains zero all the time. Is there anything I am missing? In the following case (see attached screenshot) I am running make on the kernel that I downloaded. The CPU usage is understandable. But what is the use of Swap when its never used. [URL]. I am on Kubuntu natty. My partitions are as follows:
On My Ubuntu 10.04 Lucid 64 Bit Server, top command showing CPU usage 9999% for java process.But htop command or ps -aux is showing accurate usage.After googling, i found that its bug related to "sum_exec_runtime', but the Patch given is not working. [URL]
We have several clusters used for high performance computing. The cluster nodes have 48GB memory and on each there is 2GB swap available. What I would like to avoid is the usage of swap as long as there is enough free memory or empty the swap as soon as there is a free memory. I thought that this could be achieved by setting the swapiness to 0, but although it helped a bit, it still didn't solve the problem completely. Even with swapiness set to 0, my memory usage looks like this:
I have a netbook and one of the suggested optimizations was to reduce the use of swap.I've noticed on my desktop and conventional laptop that it is quite usual for the swap file to be used even when memory usage is low (25% of available memory).I'm looking for some advise on the best way to set up a conventional desktop or laptop as my understanding is that the use of a swap file will slow the system responsiveness down. Can I use a version of the above to improve performance and reduce swap usage?
Just noticed from the "top" command that one of my least heavily used box is swapping excessivly by a program called setroubleshootd. Following is the top section of the "top" command sorted by Swap used for both boxes. Also tried checking it out to see if there's a "service setroubleshootd restart" but when I checked the status I got the following.
Code: [root]# service setroubleshootd status setroubleshootd: unrecognized service Lightly loaded box with lots of swapping
For some reason, if I leave my Linux box running for several days, the swap space and RAM slowly fill up until my system is so slow that it takes around 15 seconds just to open a new tab if Firefox (Iceweasel, specifically). I have 512GB RAM and almost a gig of swap; how on earth does it fill up so much? Even if I close all my programs, there's still over 600MB swap used and all RAM is full. I've included a screenshot of 'top' running just about two minutes after I closed all my running programs.
(Before I closed it, I had only 71MB swap free.) I know that Linux is supposed to make good usage of RAM, but isn't this over the top? Is there a way to force it to use only required memory with no or little extras kept in RAM? Just thought I'd add in the fact that I'm running Xfce as opposed to KDE or GNOME in an attempt to have a smoother running system on my old hardware. Also, what's the "VIRT" column?
I am running Apache 2.2.3 on a CentOS release 5.3 (Final) with 100 Sites. I've notice that Apache is making my server Swap around 200 MBs. "http://www.xxx.yyy.zzz/server-status" doesn't show me too much to, so I am looking the behavior of specific httpd process. ProcessID "18753" is the one for "http://www.xxx.yyy.zzz/server-status" in my browser.
This command show me (In KBs) how much virtual memory is that specific process using: # /etc/init.d/httpd start # grep Private_Dirty /proc/18753/smaps | awk '{ print $2 }' | xargs ruby -e 'puts ARGV.inject { |i, j| i.to_i + j.to_i }' 3012 ... Running this command a lot of times it gives me the same output, but suddenly... # grep Private_Dirty /proc/18753/smaps | awk '{ print $2 }' | xargs ruby -e 'puts ARGV.inject { |i, j| i.to_i + j.to_i }' 21708
Something make that process (and all the others httpd process too) to use a lot more memory!
Part of my httpd.conf: # Timeout 120 KeepAlive On MaxKeepAliveRequests 100 KeepAliveTimeout 3
My server is running Mysql 5.1.34, vsftpd 2.0.5, BIND 9.3.4-P1 (as slave). I couldn't found anything running in the specific time that httpd processes start to use that much memory.
My monitor tools indicate that the percentage of swap used is more than the ideal , so I want to calculate which process is consuming from the swap. I tried the following but it didn't help be 100%
#ps -eo vsz,rss,pid,args | sort -n
How to accurately calculate which process consuming from swap, just the swap no ram + 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?
Nagios had alerted me that the server had a very high load average exceeding the critical level (17+), when logging onto the server I found that all 4GB of the swap was in use despite the fact that there was 15GB+ of free memory (and that's not even including memory from cache and buffers!) Because it seems all heavily used pages were being stored in swap, the I/O wait on the server became very high, and 4 kswapd daemons were taking up nearly 100% available CPU. This did coincide with an error reported by Bacula during a backup job while changing to a bad tape...
From /var/log/bacula.log: Code: 10-Dec 02:11 bacula-sd JobId 1898: End of medium on Volume "4097" Bytes=434,170,000,000 Blocks=217,084 at 10-Dec-2010 02:11. 10-Dec 02:11 bacula-sd JobId 1898: 3307 Issuing autochanger "unload slot 4097, drive 0" command. 10-Dec 02:12 bacula-sd JobId 1898: 3301 Issuing autochanger "loaded? drive 0" command. 10-Dec 02:12 bacula-sd JobId 1898: 3302 Autochanger "loaded? drive 0", result: nothing loaded. 10-Dec 02:12 bacula-sd JobId 1898: 3304 Issuing autochanger "load slot 4096, drive 0" command. 10-Dec 02:13 bacula-sd JobId 1898: 3305 Autochanger "load slot 4096, drive 0", status is OK. 10-Dec 02:13 bacula-sd JobId 1898: Volume "4096" previously written, moving to end of data. 10-Dec 03:51 bacula-sd JobId 1898: Error: Unable to position to end of data on device "Tape-1" (/dev/IBMtape0n): ERR=dev.c:1384 read e rror on "Tape-1" (/dev/IBMtape0n). ERR=Input/output error.
10-Dec 03:51 bacula-sd JobId 1898: Marking Volume "4096" in Error in Catalog. 10-Dec 03:51 bacula-sd JobId 1898: 3307 Issuing autochanger "unload slot 4096, drive 0" command. 10-Dec 03:58 bacula-sd JobId 1898: 3301 Issuing autochanger "loaded? drive 0" command. 10-Dec 03:58 bacula-sd JobId 1898: 3302 Autochanger "loaded? drive 0", result: nothing loaded. 10-Dec 03:58 bacula-sd JobId 1898: 3304 Issuing autochanger "load slot 4098, drive 0" command. 10-Dec 03:58 bacula-sd JobId 1898: 3305 Autochanger "load slot 4098, drive 0", status is OK. 10-Dec 03:59 bacula-sd JobId 1898: Wrote label to prelabeled Volume "4098" on device "Tape-1" (/dev/IBMtape0n) 10-Dec 03:59 bacula-sd JobId 1898: New volume "4098" mounted on device "Tape-1" (/dev/IBMtape0n) at 10-Dec-2010 03:59. At the same time, these messages starting occuring in /var/log/messages:
Code: Dec 10 03:51:47 07 kernel: Mem-info: Dec 10 03:51:47 07 kernel: Node 0 DMA per-cpu: Dec 10 03:51:47 07 kernel: cpu 0 hot: high 0, batch 1 used:0 Dec 10 03:51:47 07 kernel: cpu 0 cold: high 0, batch 1 used:0 Dec 10 03:51:47 07 kernel: cpu 1 hot: high 0, batch 1 used:0 Dec 10 03:51:47 07 kernel: cpu 1 cold: high 0, batch 1 used:0 Dec 10 03:51:47 07 kernel: cpu 2 hot: high 0, batch 1 used:0 Dec 10 03:51:47 07 kernel: cpu 2 cold: high 0, batch 1 used:0 Dec 10 03:51:47 07 kernel: cpu 3 hot: high 0, batch 1 used:0 Dec 10 03:51:47 07 kernel: cpu 3 cold: high 0, batch 1 used:0 Dec 10 03:51:47 07 kernel: cpu 4 hot: high 0, batch 1 used:0 Dec 10 03:51:47 07 kernel: cpu 4 cold: high 0, batch 1 used:0 Dec 10 03:51:47 07 kernel: cpu 5 hot: high 0, batch 1 used:0 Dec 10 03:51:47 07 kernel: cpu 5 cold: high 0, batch 1 used:0 Dec 10 03:51:47 07 kernel: cpu 6 hot: high 0, batch 1 used:0 Dec 10 03:51:47 07 kernel: cpu 6 cold: high 0, batch 1 used:0 Dec 10 03:51:47 07 kernel: cpu 7 hot: high 0, batch 1 used:0 Dec 10 03:51:47 07 kernel: cpu 7 cold: high 0, batch 1 used:0 Dec 10 03:51:47 07 kernel: Node 0 DMA32 per-cpu: Dec 10 03:51:47 07 kernel: cpu 0 hot: high 186, batch 31 used:162 Dec 10 03:51:47 07 kernel: cpu 0 cold: high 62, batch 15 used:48 Dec 10 03:51:47 07 kernel: cpu 1 hot: high 186, batch 31 used:0 Dec 10 03:51:47 07 kernel: cpu 1 cold: high 62, batch 15 used:0 Dec 10 03:51:47 07 kernel: cpu 2 hot: high 186, batch 31 used:0 Dec 10 03:51:47 07 kernel: cpu 2 cold: high 62, batch 15 used:0 Dec 10 03:51:47 07 kernel: cpu 3 hot: high 186, batch 31 used:18 Dec 10 03:51:47 07 kernel: cpu 3 cold: high 62, batch 15 used:0 Dec 10 03:51:47 07 kernel: cpu 4 hot: high 186, batch 31 used:159 Dec 10 03:51:47 07 kernel: cpu 4 cold: high 62, batch 15 used:56 ... Dec 10 03:51:47 07 kernel: Node 3 HighMem per-cpu: empty Dec 10 03:51:47 07 kernel: Free pages: 732052kB (0kB HighMem) Dec 10 03:51:47 07 kernel: Active:4232128 inactive:3071288 dirty:158210 writeback:0 unstable:0 free:183320 slab:256840 mapped-file:289545 mapped-anon:3805487 pagetables:13063 Dec 10 03:51:47 07 kernel: Node 0 DMA free:10796kB min:4kB low:4kB high:4kB active:0kB inactive:0kB present:10356kB pages_scanned:0 all_unreclaimable? yes Dec 10 03:51:47 07 kernel: lowmem_reserve[]: 0 3512 9067 9067 Dec 10 03:51:47 07 kernel: Node 0 DMA32 free:213332kB min:2500kB low:3124kB high:3748kB active:1794108kB inactive:1463220kB present:3596296kB pages_scanned:64 all_unreclaimable? no Dec 10 03:51:47 07 kernel: lowmem_reserve[]: 0 0 5555 5555 Dec 10 03:51:47 07 kernel: Node 0 Normal free:41028kB min:3952kB low:4940kB high:5928kB active:3409444kB inactive:1471120kB present:5688320kB pages_scanned:0 all_unreclaimable? no Dec 10 03:51:47 07 kernel: lowmem_reserve[]: 0 0 0 0 Dec 10 03:51:47 07 kernel: Node 0 HighMem free:0kB min:128kB low:128kB high:128kB active:0kB inactive:0kB present:0kB pages_scanned:0 all_unreclaimable? no Dec 10 03:51:47 07 kernel: lowmem_reserve[]: 0 0 0 0 Dec 10 03:51:47 07 kernel: Node 1 DMA free:0kB min:0kB low:0kB high:0kB active:0kB inactive:0kB present:0kB pages_scanned:0 all_unreclaimable? no ... Well to cut a long story short, I fixed the problem by disabling the swap partition with 'swapoff'. After about 30 mins all the swap was freed and the server went back to normal. I don't dare reactivate the swap partition and unfortunately as this is a live server which currently has no fail over, I can't reboot either
Server Spec: 4 * Dual-Core AMD Opteron(tm) Processor 8214 32GB DDR2 ECC RAM RHEL 5.5, 2.6.18-194.11.3.el5 SMP x86_64 Running many KVM VMs (All CentOS x64) and kksmd is used. bacula-dir Version: 5.0.0 IBM Tape Drive using lin_tape module version 1.34.0 according to modinfo
And before anybody asks # sysctl vm.swappiness vm.swappiness = 10
I was trying to have a go at installing MAC on my dell alongside Ub and W7. I copied the grub2 to the first part of my sda5 so as to put the mac loader in MBR.I have since repaired grub2 back to MBR.But now my beloved Ubuntu starts up then continuosly increases RAM usage till 90% then SWAP 90% even when no application is running!!
if I dont use the oracle script written below, then system start fine, but if I use the following script, then system hangs up at startup at message 'Enabling swap space'. I am using Redhat ES 4, with Oracle 10g R2.
vi /etc/init.d/oracle #!/bin/bash # # Run-level Startup script for the Oracle Instance and Listener
I'm running Ubuntu 9.10 otherwise flawlessly on a 2007 core 2 duo Macbook. Right now its set up to triple boot with OS X Snowleopard, Windows 7 Ultimate, as the other operating systems. I'm asking because I'm frequently having to force my system to power down after shutting down from Ubuntu, and I'm concerned that I could be corrupting files and damaging my hardware.
So my Ubuntu 9.10 install has been hanging on boot lately. At first I thought it was a problem with the 2.6.31-20 kernel, because that is the default boot option in GRUB2. It seemed things worked fine if I instead chose the 2.6.31-19 kernel, but I had that hang yesterday too.I also had 2.6.31-20 boot just fine yesterday. Once. Next time I tried it - system hang.
What I mean by "hang" is,I would see the GRUB OS selection screen (I have 2 versions of Windows and 2 versions of Ubuntu on this machine),select the first choice (Ubuntu with the 2.6.31-20 kernel),see the "pulsating white Ubuntu logo" briefly,then a bunch of scrolling text, then...blank screen.Then nothing.I let it sit for a few minutes to a few hours when it did this, but nothing further happened.Then yesterday, I decided to let it sit the whole time I was at work, approximately 9 hours.I came home to a screen with the white Ubuntu logo and the following error message:
Code: One or more of the mounts listed in /etc/fstab cannot yet be mounted: swap: waiting for UUID=3fba81a3-de14-4f56-9e7b-ace95d933a0e /proc/bus/usb: waiting for none[code]....
So it looks like I have a disk partition that refuses to mount sometimes.Gparted for some reason wouldn't tell me the UUIDs of swap partitions.They also don't show up in /dev/disk/by-uuid. Using the bootinfo script, I found out that 3fba81a3-de14-4f56-9e7b-ace95d933a0e is the 4 GB swap partition associated with my Ubuntu 9.10 install.The disk that partition is on is rated "healthy" by Disk Utility, with only a few bad sectors. The HDD is about 7 years old, so it's in remarkably good shape.What could cause this swap partition to not mount during boot, and how do I fix it?
I was trying to get the status of memory usage and disk usage using sigar in windows and ubuntu. done this in windows by just copying the sigar library into jdk library. But i was unable to do so in ubuntu. I've copied the library to java-6-sun library but still can't run the program.
Is there any way to monitor one process' CPU usage and RAM usage over time on Linux? I am trying to change to a cheaper VPS and need to work out what level of CPU and RAM I need!
I installed lucid the other day on my laptop, the first time it booted after installing it gave two error messages (unfortunately I can't remember what they said). The errors stopped appearing after that but once I select Ubuntu from the boot menu, it just hangs on a black screen for a good 15 seconds at the least before it runs the plymouth screen for like 2 seconds (the progress bar is already full) and then goes into the login screen. Here is my boot chart:
http://akgenome.com/files/bootchart.png
I was wondering if anyone can tell from that what is causing the issue and perhaps how to fix it? The boot log is like 3 lines long and is completely normal.
When I try logging in using any user name, ubuntu just returns to the login screen. I cannot actually log in. I used the recovery mode to create a new login with password 123456, and the same thing happens. What could it be? Ubuntu worked just fine for a while, then DKMS started causing problems, I had errors with upgrades, software installs/uninstalls, then my sound went. I found a great fix for the sound (https://help.ubuntu.com/community/SoundTroubleshooting), the sound came back, but then I could not log back in again. I cannot find any help for this issue, and had to install 9.10 Karmic Koala, and that's what I have been using for the past couple of days.10.04 has been fairly buggy for me and I am considering staying with 9.10, or going to another Linux distro.
32 bit Lucid is hanging at random times for me. it always happens when there's some sort of full-screen overlay, like when waking from screensaver, or when using gksu (dims the screen). The machine will remain unresponsive for 30 seconds to a minute, then becomes usable again, just with the desktop not refreshed. Nothing of interest in the logs when this happens. The last thing upgraded in the machine was the graphics card (now running a GTS 450). 3d apps work just fine, temps are just fine, and I have no reason to believe it's hardware.
Last night I shut down my computer and left, since it goes automatically after I tell it to shut down. This morning, my computer was still on, with some shutdown messages like "Stopping MySQL server mysqld" and such. The last line said "deactivating swap..." and didn't appear to be doing anything. code...
i'm having a problem shutingdown my ubuntu 9.10. When I shutdown, it hangs after "Deactivating swap". It doesn't say fail or ok, just hangs there. Keyboard is still working.
I just upgraded my server from 9.10 to 10.04. I have ISPconfig installed on it and worked like a charm until the upgrade. Now when I point a browser to my site the page just hangs as if it is trying to load it but I never get an error nor does it load the page. I have tried to restart apache using /etc/init.d/apache2 restart in which I receive an fail error:
root@ubuntu:~# /etc/init.d/apache2 restart * Restarting web server apache2 (9Address already in use: make_sock: could not bind to address 0.0.0.0:80 no listening sockets available, shutting down
[Code].....
After this I still get the same results when trying to load the page in the browser.
I cannot load anything in the www root or virtual host files.
I use an IBM Thinkpad T30 with an ATI Radeon Mobility 7500 graphics card as my work machine, mostly at a desk, using a docking station to link it into a monitor. I upgraded to Lucid last weekend. When using the integral screen on the laptop the graphics have been fine, but when using a monitor I initially got some very poor contrast, brightness and gamma output, described in this bug.
According to the advice in that bug report, I upgraded the kernel, with Kernelcheck automatically updating me to 2.6.35-candela. Now, rather than poor graphics with the monitor it just hangs on the splash screen, displaying the words Ubuntu with the dots underneath.
Reading around, when similar problems have been seen in previous versions of Ubuntu it has been a graphics issue, which fits. One piece of advice I've seen quite commonly is to remove the "quiet splash" from grub, which I've tried but doesn't work. I am tempted to try and work through the different grub commands these guys used to tackle a similar problem with the live CD:
http://ubuntuforums.org/showthread.php?t=1472054
But am a bit reticent as I don't know what they all do.
As an aside, the 2.6.35-candela kernel brings up a bunch of errors on boot, described at the link below, but reading that thread they don't look like they would cause my problem:
When this happens you have to open a terminal, get the process id for mysql-server-5 then kill that process. Like this: Code: ps -A then from the list of processes that it spits out look at the process id (the number at the beginning of the line) for mysql-server-5.
Now type Code: sudo kill -9 XXXXX where XXXXX is the process id for mysql-server, and enter your password. The upgrade process should now resume.
I'm using xarchive and I have unrar-3.7.8.pet installed. Normal rar files open without problem. Tried opening a password-encrypted rar file and it hangs everytime.