How do i adjust swap info?

Asked by Not As needi newbi

I had a total RAM of 256MB ;I added 1024GiB of RAM by replacing 2 - 64MB sticks with 2 -512MB. So now my total is 1165. So now i have "cached 893Mb; Active: 455Mb; and Inactive:630Mb
and the Swap Info reads: Total: 248Mb and Free: 170Mb
So i havent a clue on how to make adjustsments to Swap and any other configuration that i need to do. Programs are still running slow or stall.
I was downloading 2 files; then i tried to burn a DVD from an iso file and it failed. After i rebooted and stopped the downloads, it worked ok.
But shouldnt i be able to do more than 1 thing at a time with a Pent 4 1.3Ghz of power and now 1165Mb of RAM? I have Ubuntu 6.06 Dapper Drake i386. BTW, the DVD burner is a LG
GSA-E4OL 18X External Super Multi DVD Rewriter and it talks mostly of being Windows compatable but i've been able to burn DVDs ok.

Question information

Language:
English Edit question
Status:
Solved
For:
Ubuntu Edit question
Assignee:
No assignee Edit question
Solved by:
Hanusz leszek
Solved:
Last query:
Last reply:
Revision history for this message
Hanusz leszek (leszek-skynet) said :
#1

Hello,

You can have more information about swap here:
https://help.ubuntu.com/community/SwapFaq

I advice you to increase the partition size with this howto.
If you don't see any change, try to change the swappiness value.

If it is still slow, you can try to disable swap (not advised):
swapoff -a

Revision history for this message
Not As needi newbi (mango553) said :
#2

oem@freekbox:~$ sudo dd if=/dev/zero of=/mnt/1165Mb.swap bs=1M count=1165
Password:
sudo mkswap /mnt/1165Mb.swap
1165+0 records in
1165+0 records out
1221591040 bytes (1.2 GB) copied, 63.9165 seconds, 19.1 MB/s
oem@freekbox:~$ sudo mkswap /mnt/1165Mb.swap
Setting up swapspace version 1, size = 1221586 kB
no label, UUID=36cc9d19-a1c7-4b82-ac78-cf8cf9f43770
oem@freekbox:~$ sudo swapon /mnt/1165Mb.swap
oem@freekbox:~$ /mnt/1165Mb.swap none swap sw 0 0
bash: /mnt/1165Mb.swap: Permission denied
oem@freekbox:~$ /etc/fstab/mnt/1165Mb.swap none swap sw 0 0
bash: /etc/fstab/mnt/1165Mb.swap: Not a directory
oem@freekbox:~$

I don't know how to do the last part to make the change permanent:
    *

      d- Making the change permanent :
          o

            Add this line to your /etc/fstab :
          o

            /mnt/512Mb.swap none swap sw 0 0
????

Also, now the Swap Info says Total: 248MB [same as before] but "Free" is 1364MB
??

Revision history for this message
Not As needi newbi (mango553) said :
#3

Here's what i got from running the command to check if it went right

oem@freekbox:~$ cat /proc/meminfo
MemTotal: 1165952 kB
MemFree: 18732 kB
Buffers: 3996 kB
Cached: 849744 kB
SwapCached: 14064 kB
Active: 335908 kB
Inactive: 740416 kB
HighTotal: 261888 kB
HighFree: 332 kB
LowTotal: 904064 kB
LowFree: 18400 kB
SwapTotal: 1441948 kB
SwapFree: 1364232 kB
Dirty: 23312 kB
Writeback: 0 kB
Mapped: 281644 kB
Slab: 50988 kB
CommitLimit: 2024924 kB
Committed_AS: 676736 kB
PageTables: 2140 kB
VmallocTotal: 114680 kB
VmallocUsed: 9224 kB
VmallocChunk: 104872 kB
oem@freekbox:~$

Revision history for this message
Hanusz leszek (leszek-skynet) said :
#4

You need to edit the /etc/fstab file.
type the following in a terminal:
sudo gedit /etc/fstab
and add the mentioned line at the end of the file
and save

Revision history for this message
Not As needi newbi (mango553) said :
#5

This is what i got, what shud i do?

A file named "fstab" already exists. Do you want to replace it?

Revision history for this message
Not As needi newbi (mango553) said :
#6

/dev/hda1 /boot ext3 defaults 0 2 #size=100
/dev/hda2 none swap sw 0 0 #size=250
/dev/hda3 / ext3 defaults,errors=remount-ro 0 1 #size=remaining
/dev/hdb1 /media/hdb1 vfat auto,rw,umask=000 0 0
/dev/hdb5 /media/hdb5 vfat auto,rw,umask=000 0 0
/dev/fd0 /floppy auto defaults,user,noauto 0 0
/dev/cdrom /cdrom iso9660 defaults,ro,user,noauto 0 0
proc /proc proc defaults 0 0
/mnt/1165Mb.swap none swap sw 0 0

this is the fstab, do u want me to save it and replace the fstab file that is already there?

Revision history for this message
Hanusz leszek (leszek-skynet) said :
#7

Yes, you need to add the line to the /etc/fstab file and save it.

Revision history for this message
Not As needi newbi (mango553) said :
#8

Ok now what do i do with the Swap info: Total is only 248MB ?
and the Free: is 1364Mb Ihave a total installed RAM of 1165MB

Revision history for this message
Hanusz leszek (leszek-skynet) said :
#9

Where do you see this info ?

Revision history for this message
Not As needi newbi (mango553) said :
#10

never mind, i closed the sys info box and reopened it and now it apppears like this:

Total 1441

Free: 1364

but these are the wrong # if i only have a total RAM of 1165

Revision history for this message
Hanusz leszek (leszek-skynet) said :
#11

From what is see in the /proc/meminfo report, it seems that you added the swap file correctly.
Reboot and type again cat /proc/meminfo in a terminal to be sure that the change is permanent.

If you still see strange values in what I think is the system monitor (you didn't answer my question), then it could be a bug in the system monitor.

Then did your system is more responsive ?
If not, try the swappiness modification:
https://help.ubuntu.com/community/SwapFaq#head-b179a5c0d7df0ab7d0ea1d58caaa47c7a5f8ab0e

Revision history for this message
Not As needi newbi (mango553) said :
#12

ok, i got this and the Swap info again is incorrect;

oem@freekbox:~$ cat /proc/meminfo
MemTotal: 1165952 kB
MemFree: 835740 kB
Buffers: 12236 kB
Cached: 178812 kB
SwapCached: 0 kB
Active: 165928 kB
Inactive: 128788 kB
HighTotal: 261888 kB
HighFree: 324 kB
LowTotal: 904064 kB
LowFree: 835416 kB
SwapTotal: 1441948 kB
SwapFree: 1441948 kB
Dirty: 268 kB
Writeback: 0 kB
Mapped: 151280 kB
Slab: 16328 kB
CommitLimit: 2024924 kB
Committed_AS: 417184 kB
PageTables: 1604 kB
VmallocTotal: 114680 kB
VmallocUsed: 9176 kB
VmallocChunk: 104948 kB
oem@freekbox:~$
////
yes i was using system Info and now it says Swap and Free are both 1441Mb instead of 1165Mb

Revision history for this message
Not As needi newbi (mango553) said :
#13

I did the swapiness and changed it from 60 to 10

Revision history for this message
Best Hanusz leszek (leszek-skynet) said :
#14

No this is completely normal,

You have your old swap partition of 276 MB (1441-1165)
And you have a swap file of 1165 MB

For a total of 1441 MB of swap.

Revision history for this message
Not As needi newbi (mango553) said :
#15

Hi, please look at attached file of my sys info reading; the
cat /proc/meminfo was:oem@freekbox:~$ cat /proc/meminfo
MemTotal: 1165952 kB
MemFree: 835036 kB
Buffers: 12248 kB
Cached: 178844 kB
SwapCached: 0 kB
Active: 165768 kB
Inactive: 130028 kB
HighTotal: 261888 kB
HighFree: 316 kB
LowTotal: 904064 kB
LowFree: 834720 kB
SwapTotal: 1441948 kB
SwapFree: 1441948 kB
Dirty: 752 kB
Writeback: 0 kB
Mapped: 152880 kB
Slab: 16420 kB
CommitLimit: 2024924 kB
Committed_AS: 434160 kB
PageTables: 1572 kB
VmallocTotal: 114680 kB
VmallocUsed: 9176 kB
VmallocChunk: 104948 kB
oem@freekbox:~$

Revision history for this message
Not As needi newbi (mango553) said :
#16

ok, then i'm good to go? thanx mucho, er, many thanks

Revision history for this message
Not As needi newbi (mango553) said :
#17

Thanks Hanusz leszek, that solved my question.