Announcement

Collapse
No announcement yet.

Swap on USB Flash Drive?

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

    Swap on USB Flash Drive?

    What would happen if you mounted the swap partition on a usb flash drive? Would it improve performance on a light weight machine, say 256kb? Has anyone done it? Say you used a 1GB stick and set swappiness to 100?

    #2
    Re: Swap on USB Flash Drive?

    Mounting swap an a USB stick works, buts it is much slower than having it on hard disk.
    If your USB is 2.0 and you have a stick in GB, it will give you a reasonable rate, but noticeably slower than internal disk.

    I think what would improve your machine, if possible is to maximize your RAM. It's not that expensive, but 2G will mean you will hardly ever have to swap and that's much faster.

    The other thing, you will need you USB connected every time you run your machine, taking up one USB port.
    HP Compaq nc6400, 2Gi, 100Gi, ATI x1300 with 512M

    Comment


      #3
      Re: Swap on USB Flash Drive?

      Originally posted by kevinc
      Mounting swap an a USB stick works, buts it is much slower than having it on hard disk.
      If your USB is 2.0 and you have a stick in GB, it will give you a reasonable rate, but noticeably slower than internal disk.
      Why would it be slower? With flash memory instead of a spinning hard drive you would think it would be faster.

      The machine in question, an older laptop, has USB 2.0, but upgrading the memory is not cheap.

      Comment


        #4
        Re: Swap on USB Flash Drive?

        It's a matter of throughput. IF the throughput was equal, then the flashdrive would probably be faster. But the max throughput on an ATA-6 IDE connection is 100 MBytes/sec, and on SATA 3 three times that. USB 2.0 is rated at 480 mbs that's megabits/sec or about 60 megabytes/sec.

        That's all theoretical, of course, but in general it's the bus speed that is the limiter not the ability of the storage device.
        The next brick house on the left
        Intel i7 11th Gen | 16GB | 1TB | KDE Plasma 5.27.11​| Kubuntu 24.04 | 6.8.0-31-generic



        Comment


          #5
          Re: Swap on USB Flash Drive?

          Well put, jglen490. Agree.
          You notice this (communication slowness) when messing with Live Linux flash drives.
          An intellectual says a simple thing in a hard way. An artist says a hard thing in a simple way. Charles Bukowski

          Comment


            #6
            Re: Swap on USB Flash Drive?

            Originally posted by jglen490
            That's all theoretical, of course, but in general it's the bus speed that is the limiter not the ability of the storage device.
            That makes sense. Thanks.

            Comment


              #7
              Re: Swap on USB Flash Drive?

              You're welcome!!

              Now when USB 3.0 comes out in a couple of years, all bets are off. The talk seems to be of gigabit speeds. Fasten your seat belts, if that's true. But then again SATA isn't going sit still, and who knows what else ... (maybe just hang on to your wallet) .
              The next brick house on the left
              Intel i7 11th Gen | 16GB | 1TB | KDE Plasma 5.27.11​| Kubuntu 24.04 | 6.8.0-31-generic



              Comment

              Working...
              X