Announcement

Collapse
No announcement yet.

Swap (and low memory) performance

Collapse
This topic is closed.
X
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

  • SecretCode
    replied
    Originally posted by oshunluvr View Post
    What if you upgraded the laptop to a small SSD? Then swap would happen much faster.
    I've considered that a bit. Should be possible, but I'd like - actually need - a large enough internal drive as well. I'd need to see if the CD/DVD bay can be used for storage devices. (An external CD/DVD drive would be no hardship.)

    But I'm worried that, since it grinds to a halt even when on low memory with no swap enabled, the speed of drive access may not be the constraint; it may be some kind of CPU-bound memory management load.

    Leave a comment:


  • oshunluvr
    replied
    A couple of years back I had a similar experience. I was transcoding and ripping DVD's 2-3 at a time and 4GB's didn't cut it. I went up to 8GB and never looked back Best upgrade I've done in years. I might be buying a couple SSD's soon though so I'll be in heaven all over again when that happens. Obviously, I use a desktop system for this kind of work. Your laptop isn't much use if the monitor and battery are dying and there aren't many laptops that will handle 8GB (maybe more now than I realize). That plus the other expenses means decision time for you. I'd offer you a few parts, but the mailing costs would be more than they're worth.

    What if you upgraded the laptop to a small SSD? Then swap would happen much faster. You could get a small SSD (30-40GB) and an inexpensive external USB case for your hard drive so you could still use it for data storage. I see SSD's on Amazon.uk for around £40 and enclosures for about £15.

    Leave a comment:


  • SecretCode
    replied
    Thanks James
    Originally posted by james147 View Post
    Personally I find that if you are using more then a few hundred megs of swap you generally get a massive performance hit and should really get more ram (hell, if you are using any swap you should really get more ram). Or at least reduce your ram usage by quite allot.
    More accurately, I find that it's when paging out/in is taking place that the system grinds to a halt. If some memory's been paged out but (eventually) active apps have what they need in RAM, then performance is OK again.

    Keen to hear from others as well, if anyone finds that performance is bearable when the system starts swapping.

    Leave a comment:


  • james147
    replied
    Originally posted by SecretCode View Post
    I have 4GB of RAM and can quite easily use it all with Firefox, virtual machines, etc. I have a 4GB swap partition. But when I'm short of RAM and the swap gets used, performance is so bad it's practically unusable - the system will take 30s to respond to a window action, minutes to respond to a change of virtual desktop, etc. Even going to a tty console is very slow. Load average (as reported by uptime, tload, etc) goes through the roof.

    Is this true for everyone? Obviously swap is going to be significantly slower than RAM, but does anyone find that it's actually acceptable for occasional use?
    I think that part of the problem is that swap is mostly designed for dumping unused memory pages onto the disk so they can be used by other programs. This becomes a problem when you have more active pages then physical memory which causes it to swap like hell and thrash the disk... I suggest checking your disk io and see if that is the bottle neck.

    Personally I find that if you are using more then a few hundred megs of swap you generally get a massive performance hit and should really get more ram (hell, if you are using any swap you should really get more ram). Or at least reduce your ram usage by quite allot.

    I've tried a swap file in addition to (at higher priority than) the swap partition - no practical difference.
    There should be no noticeable difference between a swap file and partition, if any swapfiles probably perform worst since they need to go through the native file system as well.

    I've tried vm.swappiness at 60 and at 10 and at 80 - no practical difference.
    This will only make a difference when you are reaching the limit of your ram, since it tells the kernel how soon to start swapping, once you are using more memory then you physically have it shouldn't make much difference.

    Recently I tried disabling swap altogether (thinking because it's close to unusable, I'd rather have out of memory errors). But when free memory ran low, I got exactly the same symptoms, suggesting that it's something to do with the OS "thrashing" with memory pages and not specifically due to swapping. I've been using the stress tool to simulate memory and other kinds of load.
    I have had a similar experience when running out of memory, the problem is different then that caused by swap. The problem I had was that new processes where being created faster then they where being killed which caused the system to hang and wait for more memory to be freed which might be the case if you are using a stress tool to simulate the experience.

    plan to buy more RAM anyway, but I also have an LCD panel issue and a battery issue so I'm thinking of a new desktop instead. And an SSD drive!
    I would at least get more RAM, but if you have the money I always recommend a desktop over a laptop for your main computer (with a cheap portable netbook if you also need some mobility).
    Last edited by james147; Aug 30, 2012, 02:20 PM.

    Leave a comment:


  • SecretCode
    started a topic Swap (and low memory) performance

    Swap (and low memory) performance

    I have 4GB of RAM and can quite easily use it all with Firefox, virtual machines, etc. I have a 4GB swap partition. But when I'm short of RAM and the swap gets used, performance is so bad it's practically unusable - the system will take 30s to respond to a window action, minutes to respond to a change of virtual desktop, etc. Even going to a tty console is very slow. Load average (as reported by uptime, tload, etc) goes through the roof.

    Is this true for everyone? Obviously swap is going to be significantly slower than RAM, but does anyone find that it's actually acceptable for occasional use?

    -----------------------
    Some more background:

    I keep an eye on free memory and swap use with the System Load Viewer widget.

    I've tried a swap file in addition to (at higher priority than) the swap partition - no practical difference.

    I've tried vm.swappiness at 60 and at 10 and at 80 - no practical difference.

    Recently I tried disabling swap altogether (thinking because it's close to unusable, I'd rather have out of memory errors). But when free memory ran low, I got exactly the same symptoms, suggesting that it's something to do with the OS "thrashing" with memory pages and not specifically due to swapping. I've been using the stress tool to simulate memory and other kinds of load.

    memtest86 reports no errors; disk tests report no errors.
    CPU is Intel(R) Core(TM)2 Duo CPU T6670 @ 2.20GHz; Kubuntu 11.10 64 bit.
    I plan to buy more RAM anyway, but I also have an LCD panel issue and a battery issue so I'm thinking of a new desktop instead. And an SSD drive!
Working...
X