Victor Kimura
asked on
creating swapfile on Centos 5.9 linux
Hi,
I need more memory so I was reading this page:
https://www.linux.com/news/software/applications/8208-all-about-linux-swap-space
A couple of questions:
(1)
I ran this:
dd if=/dev/zero of=/swapfile bs=1024 count=2048576
the above command ran fine.
But this command gives me a "command not found" error:
mkswap /swapfile
Also, I don't have the command:
swapon -s
(2)
If I create the swapfile then will it free my physical RAM?
(3)
Are there any other considerations I need to make so nothing breaks or happens?
Thank you and Father bless<><
I need more memory so I was reading this page:
https://www.linux.com/news/software/applications/8208-all-about-linux-swap-space
#free -m
total used free shared buffers cached
Mem: 1024 1024 0 0 0 0
-/+ buffers/cache: 1024 0
Swap: 0 0 0
A couple of questions:
(1)
I ran this:
dd if=/dev/zero of=/swapfile bs=1024 count=2048576
the above command ran fine.
But this command gives me a "command not found" error:
mkswap /swapfile
Also, I don't have the command:
swapon -s
(2)
If I create the swapfile then will it free my physical RAM?
(3)
Are there any other considerations I need to make so nothing breaks or happens?
Thank you and Father bless<><
SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
ASKER
I get this with fdisk:
root@ip-184-168-116-73 [/home/myultrat/public_html/l4]# fdisk -l
bash: fdisk: command not found
root@ip-184-168-116-73 [/home/myultrat/public_html/l4]# /sbin/fdisk -l
cannot open /proc/partitions
SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
ASKER
yeah, it's a VDS with godaddy. Anyone suggest a better VDS that doesn't have restrictions? A friend recommended mochhosting.
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
ASKER
@gheist, wow, those are really cheap. Are there some good tutorials on compcache setup? Tried looking but there doesn't seem to be that much info on it. I'm running Centos 5.9 but RHEL is similar I would think.
ASKER
Bless you all! =)
On RHEL6 you can use compcache as an indication when swapping occurs.
RHEL 5, CentOS 5 , Oracle Linux 5 , Scientific Linux Boron do not fall in RedHat v6 category by any means.
RHEL 5, CentOS 5 , Oracle Linux 5 , Scientific Linux Boron do not fall in RedHat v6 category by any means.
ASKER
@gheist, ok, thanks! Are there tutorials on compcache? How does one view it and if there is something we need it make it active or does it come standard?
This is good:
https://extremeshok.com/1448/1448/
https://extremeshok.com/1448/1448/
ASKER
So I shouldn't use swap at all then? I was going to just test and see what the performance will be like. How do I undo the swapfile after the test? What are the commands to unswap the file or partition?
@gheist, just curious how do I find out how which device is the swap partition? I'm on a VDS from gd hosting. Currently, Centos 5.9.