Author Topic: WHats your Swap Size?  (Read 1120 times)

Bazoukas

  • Member
  • **
  • Posts: 866
  • Kudos: 140
    • http://whitehouse.com
WHats your Swap Size?
« on: 11 November 2002, 08:11 »
Just curious. I have 256DDR and just for the hell of it I have my swap at 1999. It wouldnt go pass 2048.
Yeah

slave

  • Member
  • **
  • Posts: 1,136
  • Kudos: 0
    • http://www.fuckmicrosoft.com
WHats your Swap Size?
« Reply #1 on: 11 November 2002, 08:17 »
I have 512 MB DDR and RHL 8 auto set my swap partition to 1024 MB.  It never uses any of it though  

RudeCat7

  • Member
  • **
  • Posts: 431
  • Kudos: 109
WHats your Swap Size?
« Reply #2 on: 11 November 2002, 08:18 »
Somewhat related topic:

In theory, aren't you supposed to keep your swap relatively small, about the same size as your ram?
This forces the ram to be used more effectively, right? Or else the swap would be used more than the ram, which slows things down...

In theory, wouldn't it be better to get a lot of ram and get rid of the swap?

  :confused:
*meow!* I didn't say Linux was easier, I said it was better, Dumbass!

Bazoukas

  • Member
  • **
  • Posts: 866
  • Kudos: 140
    • http://whitehouse.com
WHats your Swap Size?
« Reply #3 on: 11 November 2002, 08:24 »
From what I know, you are correct.

 I know a dude that doesnt have any Swap at all. Then again he has from i can remember one Gig of RAM.
Yeah

TheQuirk

  • VIP
  • Member
  • ***
  • Posts: 2,154
  • Kudos: 315
WHats your Swap Size?
« Reply #4 on: 11 November 2002, 21:09 »
My usual swap is RAM*2+50.

voidmain

  • VIP
  • Member
  • ***
  • Posts: 5,605
  • Kudos: 184
    • http://voidmain.is-a-geek.net/
WHats your Swap Size?
« Reply #5 on: 11 November 2002, 21:30 »
The general rule of thumb is RAMSIZE*2 with a minimum of 128MB and a maximum of 2GB. However, I try and put enough RAM in a machine so the system never (or rarely) has to swap.

In my case I have 512MB of RAM and 512MB of swap, breaking the general rule which would have wanted me to have 1GB of swap. Really as long as you have enough swap to handle any memory requirements that may come up you are good.

To me it is more important to spread your swap out across multiple disks (if possible) than it is to follow the sizing rules. But then I'm not 100% sure of why the general rules are there and how my breaking them effects performance.
Someone please remove this account. Thanks...

Bazoukas

  • Member
  • **
  • Posts: 866
  • Kudos: 140
    • http://whitehouse.com
WHats your Swap Size?
« Reply #6 on: 11 November 2002, 21:38 »
hmmm am gonna spread out my swap and see what happens. I never tried that.
Yeah

TheQuirk

  • VIP
  • Member
  • ***
  • Posts: 2,154
  • Kudos: 315
WHats your Swap Size?
« Reply #7 on: 11 November 2002, 21:39 »
Stick your swap on one of these:
http://www.3dretreat.com/reviews/rocketdrive/

Outperforms any SCSI hard drive (I'm serious, too), and is not bound to conventional mechanical flaws and limits.

voidmain

  • VIP
  • Member
  • ***
  • Posts: 5,605
  • Kudos: 184
    • http://voidmain.is-a-geek.net/
WHats your Swap Size?
« Reply #8 on: 11 November 2002, 21:51 »
quote:
Originally posted by bazoukas:
hmmm am gonna spread out my swap and see what happens. I never tried that.


I would also qualify that if you spread your swap out between multiple disks it would be best if all disks used were of roughly equal performance, otherwise you might just want to put it on the fastest drive, closest to the center of the drive (first partition). If you want to spread it out do it like this in your fstab:

Code: [Select]

Notice they are all at the same priority which will cause the kernel to balance its use on each disk.
Someone please remove this account. Thanks...

CaptainCool

  • Member
  • **
  • Posts: 129
  • Kudos: 0
WHats your Swap Size?
« Reply #9 on: 11 November 2002, 15:49 »
I got 384 mb ram in my pc and my swap is set to 220. So far it's been runnning nice and smooth with no slow downs.

Master of Reality

  • VIP
  • Member
  • ***
  • Posts: 4,249
  • Kudos: 177
    • http://www.bobhub.tk
WHats your Swap Size?
« Reply #10 on: 11 November 2002, 17:16 »
i got 250 MB of swap 128 SDRAM. My swap is on a harddrive beside only the boot partition, my root is on a separate drive.
Disorder | Rating
Paranoid: Moderate
Schizoid: Moderate
Linux User #283518
'It takes more than a self-inflicted gunshot wound to the head to stop Bob'

voidmain

  • VIP
  • Member
  • ***
  • Posts: 5,605
  • Kudos: 184
    • http://voidmain.is-a-geek.net/
WHats your Swap Size?
« Reply #11 on: 11 November 2002, 18:15 »
quote:
Originally posted by The Master of Reality / B0B:
i got 250 MB of swap 128 SDRAM. My swap is on a harddrive beside only the boot partition, my root is on a separate drive.


Having the swap on the least utilized drive would be best as you have it. I'm not sure if spreading the swap out across a utilized drive and a non-utilized drive would increase or decrease the performance. I guess it would depend on how utilized the drive is, but I am not sure of the logic that the kernel uses. I believe it to be much like RAID striping if using more than one swap partition at the same priority, but not sure.
Someone please remove this account. Thanks...

voidmain

  • VIP
  • Member
  • ***
  • Posts: 5,605
  • Kudos: 184
    • http://voidmain.is-a-geek.net/
WHats your Swap Size?
« Reply #12 on: 11 November 2002, 19:09 »
I found an interesting thread that doesn't really relate to spreading swap out across multiple partitions but it discusses swap in general and also brings in another important term "thrashing". It's an interesting debate/argument (it's a large thread):

Swap vs No Swap

In a couple of the messages the term "thrashing" was brought up. I forgot about this important issue when it comes to swapping. Your RAM isn't only used for program code but also for caching program data and files. Less used code and data are paged out to your swap partition to make more room for caching (to increase performance). Generally it's good to have a fair amount of swap space so that the kernel can page out less used program data to make room in fast RAM for caching more utilized code/data.

Thrashing occurs if your swap partition is on the same drive as your "/" partition (or working partitions).  Basically you want your swap space on a dedicated or low utilized drive. The reason for this is because you may be doing heavy I/O on your "/" partition that would trigger a lot of swap/paging activity. Well, when this happens your  disk heads are going to be switching back and forth between your "/" partition and your swap partition very frequently. This can cause the system to come to a crawl (I would expect the farther apart the partitions are the slower the system would be).

So optimally you would want your swap on a low utilized disk (the disk heads can stay in pretty much the same spot). So m0r, you have your swap set up in a good way. It would be even better if you had several low utilized disks that you can spread the swap out over that would allow the kernel to stripe and increase performance even more. I would guess that in the case of only having two disks you would only want the swap on the least utilized disk as to prevent the thrashing scenerio.
Someone please remove this account. Thanks...

Bazoukas

  • Member
  • **
  • Posts: 866
  • Kudos: 140
    • http://whitehouse.com
WHats your Swap Size?
« Reply #13 on: 11 November 2002, 19:17 »
Oh oh this cant be good  :(

My second HD which is the exact same size, brand and speed with my Master HD, does a


vzououououm,,,chaklan,,,,chaklan chaklan vzouououou, chaclan noise.!

 Am gonna take it out. This can only mean trouble.
  then again that HD was the HD that I always installed windos.
Yeah

voidmain

  • VIP
  • Member
  • ***
  • Posts: 5,605
  • Kudos: 184
    • http://voidmain.is-a-geek.net/
WHats your Swap Size?
« Reply #14 on: 11 November 2002, 19:21 »
Yeah, clanking sounds coming from a hard drive are never good in my experience. They turn into a paper weight fast and in a hurry.
Someone please remove this account. Thanks...