Loading ...
Sorry, an error occurred while loading the content.

Re: [nslu2-linux] unslung or openslug without swap

Expand Messages
  • Robert Hammond
    In message , johannes writes ... I have two swaps, the default swap partition and also a swap file off of the
    Message 1 of 8 , Mar 2, 2007
    • 0 Attachment
      In message <es7u6k$bm9$1@...>, johannes <jjh_nospam@...>
      writes
      >Hi,
      >
      >Can the NSLU2 live without a swap space?
      >
      >The thing is: I would like to have a silent slug that spins down the
      >harddrive when it is not used. In my understanding, this means:
      >* I cannot have a swap partition on the harddrive, otherwise it will
      > never spin down.
      I have two swaps, the default swap partition and also a swap file off
      of the root folder. My disk spins down with no problems.



      --
      Robert Hammond
      PGP:0x154144DA
    • Brian Wood
      ... To make a long story short: It stops running properly. ... If all you want to do is run backups I would think the stock firmware would do it with the
      Message 2 of 8 , Mar 2, 2007
      • 0 Attachment
        On Mar 2, 2007, at 3:04 AM, johannes wrote:

        > Thank you Brian for your response!
        >
        > 1.) Your experience makes me think it should be possible (though maybe
        > not advisable) to run SlugOS with no swapping. What would happen if a
        > slug with no swapping runs out of memory?

        To make a long story short: It stops running properly.

        >
        >
        > 2.) As for the silent slug, I have been rethinking my question:
        >
        > Let's say my slug is running 24/7 in my living room but I only access
        > it once a day to make a backup. The slug swaps onto the harddrive that
        > is attached to it. Will the harddrive get any rest?
        >
        > I mean, if the slug does not have anything to do, does it need to
        > access the swap on the harddrive at all? Will the network traffic (not
        > when I am trying to backup, but any lost packages swirling around)
        > cause access to the swap?
        >
        > Maybe the harddisk can be spun down even though there is a swap space
        > on it? What do you think?
        >

        If all you want to do is run backups I would think the stock firmware
        would do it with the exception of the spindown, remember that the
        stock F/W runs with no swap space. Running backups will probably not
        require swap at all but you might need it for some of the
        installation routines (depends on the F/W you use) and you would
        definitely need it to compile anything beyond "hello world" (and
        maybe even then).

        But some questions come to mind:

        How much data are you needing to back up? If it's over 100GB or so
        the small form factor drives are pretty much out of the question.

        Why does the slug have to be in your LR ? Since it is on your network
        I'd think you could put it just about anywhere.

        How much noise can you tolerate? As I said the small drives are
        pretty quiet these days.

        Many USB drive/case combinations can handle spindown, and you could
        connect the drive to a regular Linux/Unix machine and use the
        standard utilities to set up the spindown. I know the Maxtor units
        can do this - in fact they come set to spindown and I had trouble
        getting them to stop doing that. I'll bet if you connected one out of
        the box to the stock F/W or UnSlung it would work fine and spindown
        well. I think there's lots of info on spindown on the NSLU2 sites as
        well.

        I run backups using a slug as an NFS server and a spun-down condition
        simply results in a brief delay when the job starts.

        I know a lot of folks will disagree with me, but I believe you are
        better off not spinning down a drive. The constant running will age
        the motor and bearings more, but IMHO it will increase the overall
        life. Every drive I've ever had fail did so at startup, and replacing
        them more often due to drive/bearing failure is something I'm willing
        to accept. Please no flames on this, it's just an opinion :-)
      • johannes
        Thank you Brian, thank you Robert for your responses! I am now running slugOs with no swap: The root system is on my memory stick on usbPort1 (I will always
        Message 3 of 8 , Mar 2, 2007
        • 0 Attachment
          Thank you Brian, thank you Robert for your responses!

          I am now running slugOs with no swap: The root system is on my memory
          stick on usbPort1 (I will always leave the memory stick plugged in).
          It is doing very well, but I have to say I have not done yet much
          apart from formatting harddrives and installing nano. We'll see how it
          does when I install Samba.

          The harddisk is on usbPort2. I can switch it on and off as I want and
          leave the slug running. I get automatically mounted into /media/sdb1
          when I turn it on. I can spin the drive down manually by calling
          scsci-stop /dev/sdb. I have not found out yet if it is going to be
          spun down automatically if I wait long enough (is this what the kernel
          patch is supposed to do?)

          I think I will reserve a swap partition on the harddisk but only
          activate it when I need it - that could be a good option! If the drive
          spins down despite the activated swap partition (like Robert's drive
          does), I could leave it activated all the time.


          Brian Wood wrote:
          > On Mar 2, 2007, at 3:04 AM, johannes wrote:
          >
          >> Thank you Brian for your response!
          >>
          >> 1.) Your experience makes me think it should be possible (though maybe
          >> not advisable) to run SlugOS with no swapping. What would happen if a
          >> slug with no swapping runs out of memory?
          >
          > To make a long story short: It stops running properly.
          giving random errors etc? does not sound nice!


          >>
          >> 2.) As for the silent slug, I have been rethinking my question:
          >>
          >> Let's say my slug is running 24/7 in my living room but I only access
          >> it once a day to make a backup. The slug swaps onto the harddrive that
          >> is attached to it. Will the harddrive get any rest?
          >>
          >> I mean, if the slug does not have anything to do, does it need to
          >> access the swap on the harddrive at all? Will the network traffic (not
          >> when I am trying to backup, but any lost packages swirling around)
          >> cause access to the swap?
          >>
          >> Maybe the harddisk can be spun down even though there is a swap space
          >> on it? What do you think?
          >>
          >
          > If all you want to do is run backups I would think the stock firmware
          > would do it with the exception of the spindown, remember that the
          > stock F/W runs with no swap space. Running backups will probably not
          > require swap at all but you might need it for some of the
          > installation routines (depends on the F/W you use) and you would
          > definitely need it to compile anything beyond "hello world" (and
          > maybe even then).
          I don't think I'll start compiling things on my slug (yet) - but then
          I would certainly have to activate some swap space on my harddisk.

          >
          > But some questions come to mind:
          >
          > How much data are you needing to back up? If it's over 100GB or so
          > the small form factor drives are pretty much out of the question.
          I bought a desktop drive because it they are lot cheaper than the
          laptop ones. It's a Hitachi one because it was said to be not too
          noisy. 320 GB had the best price per MB right now (at least in
          europe), so that's what I went for.


          >
          > Why does the slug have to be in your LR ? Since it is on your network
          > I'd think you could put it just about anywhere.
          I am a student and I pretty much only have one room that I have to
          share with my computer equipment :-)

          > How much noise can you tolerate? As I said the small drives are
          > pretty quiet these days.
          The drive I have actually is quite ok - it makes about as much noise
          as my macbook when the fans are starting to spin up a bit.

          > Many USB drive/case combinations can handle spindown, and you could
          > connect the drive to a regular Linux/Unix machine and use the
          > standard utilities to set up the spindown. I know the Maxtor units
          > can do this - in fact they come set to spindown and I had trouble
          > getting them to stop doing that. I'll bet if you connected one out of
          > the box to the stock F/W or UnSlung it would work fine and spindown
          > well. I think there's lots of info on spindown on the NSLU2 sites as
          > well.
          I guess that by 'setting the spindown' you are referring to method1
          (hdparm) on http://www.nslu2-linux.org/wiki/FAQ/SpinDownUSBHarddisks -
          I am using method3 (scsi-stop) to spindown.


          > I run backups using a slug as an NFS server and a spun-down condition
          > simply results in a brief delay when the job starts.
          that's about what i have in mind. i don't think i'd care about the
          delay too much, though.


          > I know a lot of folks will disagree with me, but I believe you are
          > better off not spinning down a drive. The constant running will age
          > the motor and bearings more, but IMHO it will increase the overall
          > life. Every drive I've ever had fail did so at startup, and replacing
          > them more often due to drive/bearing failure is something I'm willing
          > to accept. Please no flames on this, it's just an opinion :-)
          yes, i've heard about this, and I respect your opinion. (I know
          there's a lot of discussion on this topic)

          my calculation is: if the drive supports about 50.000 spinups (I don't
          remember where I found this number), it would last for more than ten
          years even if I'd spin it up 10 times a day. Considering the comfort
          of sleeping in total silence, I think I will spin the drive up and down.

          thank you all for your kind help,
          Johannes
        • Brian Wood
          ... Not sure if this will be of help but remember that you can swap to a file as well as a partition.
          Message 4 of 8 , Mar 2, 2007
          • 0 Attachment
            On Mar 2, 2007, at 4:29 PM, johannes wrote:

            >
            >
            > I think I will reserve a swap partition on the harddisk but only
            > activate it when I need it - that could be a good option! If the drive
            > spins down despite the activated swap partition (like Robert's drive
            > does), I could leave it activated all the time.
            >

            Not sure if this will be of help but remember that you can swap to a
            file as well as a partition.
          • johannes
            ... thanks for the hint, this is the smarter option!
            Message 5 of 8 , Mar 3, 2007
            • 0 Attachment
              Brian Wood wrote:
              > On Mar 2, 2007, at 4:29 PM, johannes wrote:
              >
              >>
              >> I think I will reserve a swap partition on the harddisk but only
              >> activate it when I need it - that could be a good option! If the drive
              >> spins down despite the activated swap partition (like Robert's drive
              >> does), I could leave it activated all the time.
              >>
              >
              > Not sure if this will be of help but remember that you can swap to a
              > file as well as a partition.
              thanks for the hint, this is the smarter option!
            Your message has been successfully submitted and would be delivered to recipients shortly.