Size of swap


 
Thread Tools Search this Thread
Top Forums UNIX for Dummies Questions & Answers Size of swap
# 1  
Old 06-21-2002
Size of swap

Hy all,

i've a little problem with the size of the swap. I've an old solaris machine, with 4Go, and swap is taking 500Mo for only 1% used at any time.
So : how can i change this size without problems ?????
(ok it may be a stupid question, but it's a real problem when you lose about 1 or 2 hours per day, just to free space on the disk ... Smilie )
# 2  
Old 06-21-2002
First, I've never used Solaris but I believe most of what can be done in Linux also applies to Solaris. Correct me if I'm wrong.

This solution is just a theory I have, never tried it out so if anyone knows if this'll work... otherwise, try this at your own risk Smilie
The idea is to first create a file to use as swap space. Then boot from for example a boot diskette and use a partitioning program to delete the swap partition and create a new one. And after that create a filesystem on that partition. Reboot and mount it where it's needed...


1. Create an empty file, say /myswap, with 10MB of size (or whatever you want it to be)

# dd if=/dev/zero of=/myswap bs=1024 count=10000

2. Now create a swap area in the file

# mkswap /myswap

3. Remove any swap partition that is in /etc/fstab and put this line in the file:

/myswap swap swap defaults 0 0

4. Reboot, and boot from a boot diskette with fdisk and mkfs-tools. Start fdisk.

bootdisk# fdisk /dev/hdXX

Delete the swap partition, create a new partition (preferably where the swap partition resided). Create a filesystem, for example:

bootdisk# mkfs.ext2 /dev/hdXX

5. Reboot.. Mount your new fresh partition where it's needed, say /home
Edit /etc/fstab ...


Or is there simply a more simple (correct) way? Smilie
# 3  
Old 06-24-2002
Thanks, i'll try today or tomorrow Smilie
# 4  
Old 06-25-2002
swap hd memory

if in bsd goto /stand/sysinstall then goto config list then slice the hd

if in linux goto harddrake and see what your hd is and split it from there you all ways want to make it 1/2 of your real ram
amicrawler
 
Login or Register to Ask a Question

Previous Thread | Next Thread

10 More Discussions You Might Find Interesting

1. Solaris

/tmp size is less whereas size allocated to swap is more

Hi, the /tmp size is less whereas the size allocated to swap is quite big. how to increase the size of /tmp - #: swap -l swapfile dev swaplo blocks free /dev/md/dsk/d20 85,20 8 273096 273096 #: swap -s total: 46875128k bytes allocated + 2347188k reserved =... (2 Replies)
Discussion started by: psb74
2 Replies

2. AIX

SWAP SIZE Recommended.

Dear All, During installation of SAP, it shows like below : Condition : Swap Size Result Code : Condition not met Severity : MEDIUM Message : For the selected services at least 74228 MB swap space are recommended. Current value: 65536 MB. (Updated 2005-06-24) I am working on AIX OS. ... (8 Replies)
Discussion started by: kak
8 Replies

3. Solaris

Help on Understanding Swap Size

Hi All, I want to know how to understand the actual swap size. My o/p shows as below root@ecovs1a # swap -s total: 4546056k bytes allocated + 358856k reserved = 4904912k used, 5046688k available root@ecovs1a # swap -l swapfile dev swaplo blocks free /dev/md/dsk/d31 ... (9 Replies)
Discussion started by: vivek.goel.piet
9 Replies

4. Solaris

Swap size increase

Dear All, How to increase the swap size when physicall memory reaches 60 %. OR it can be only done after the physicall memory is full. Rgds Rj (8 Replies)
Discussion started by: jegaraman
8 Replies

5. UNIX for Dummies Questions & Answers

swap memory and original size of HD

few questions a. where can I find the RAM of a server? im about to install redhat on a server (reformat). need to know because it will be my basis for swap size. i saw something line 3048MB detected upon boot. is this the memory? b. what is the command in lunux to check the original size of... (2 Replies)
Discussion started by: lhareigh890
2 Replies

6. Programming

Swap different size string

how can I write a function to swap to different sized string? (2 Replies)
Discussion started by: rupeshkp728
2 Replies

7. UNIX for Dummies Questions & Answers

Size of swap partition during installation

Greetings. I've been into computers since the '80s, but this is my first attempt at Linux. I'm installing Debian Lenny on a PIII 733 with 10GB hard drive and 512MB Ram. I intend to use the machine primarily as a development server, with things like mySQL, Apache, php, etc. I don't really want... (22 Replies)
Discussion started by: fguy
22 Replies

8. Solaris

Weird swap size on Solaris 9

I have a machine: SunOS <server> 5.9 Generic_117171-15 sun4u sparc SUNW,Sun-Fire-480R It has these filesystems: Filesystem size used avail capacity Mounted on /dev/md/dsk/d0 19G 15G 3.9G 80% / /proc 0K 0K 0K 0% /proc... (6 Replies)
Discussion started by: son_t
6 Replies

9. HP-UX

Increasing swap size

We increased our server's RAM 8 -> 32 GB RAM. swap memory is currently 10 GB. With which command I can increase this memory? (1 Reply)
Discussion started by: akyuceisik
1 Replies

10. UNIX for Dummies Questions & Answers

chang swap size after install

Hello all, I just got a laptop with redhat linux 7.2 installed, but during the installation the installer only put 1gig of sawp space( this laptop has 1gig of RAM). To my understanding when creating swap space, the size is determine by double the RAM. Therefore my question is that how do I... (2 Replies)
Discussion started by: larry
2 Replies
Login or Register to Ask a Question