FAQ Search Today's Posts Mark Forums Read
» Video Reviews

» Linux Archive

Linux-archive is a website aiming to archive linux email lists and to make them easily accessible for linux users/developers.


» Sponsor

» Partners

» Sponsor

Go Back   Linux Archive > Ubuntu > Ubuntu User

 
 
LinkBack Thread Tools
 
Old 03-15-2011, 02:06 PM
Rashkae
 
Default Moving Swap file

On 11-03-15 10:00 AM, J wrote:


Might I ask why you'd want to do this?

Don't get me wrong, I'm not necessarily trying to dissuade you from
doing so, but in general, you shouldn't really see any benefit to
moving swap onto an external RAID enclosure, at least not enough
benefit to make it worthwhile.




Well, actually, there is one really large benefit that makes all the
difference. If you expect a machine to keep running during the
occurence/repair of a failed hard drive (presumably, the whole point of
buying a hotswap array), then your swap *must* be on Raid.


--
ubuntu-users mailing list
ubuntu-users@lists.ubuntu.com
Modify settings or unsubscribe at: https://lists.ubuntu.com/mailman/listinfo/ubuntu-users
 
Old 03-15-2011, 02:14 PM
Andy Graybeal
 
Default Moving Swap file

On 03/15/2011 10:00 AM, J wrote:

On Tue, Mar 15, 2011 at 09:00, Andy Graybeal
<andy.graybeal@casanueva.com> wrote:

Hello,
I'd like to move our swap file onto our RAID array.


Might I ask why you'd want to do this?

Don't get me wrong, I'm not necessarily trying to dissuade you from
doing so, but in general, you shouldn't really see any benefit to
moving swap onto an external RAID enclosure, at least not enough
benefit to make it worthwhile.

If you're using only a little swap, then you'd be better off looking
into performance tuning and such. If you're using swap space
constantly, then it's probably time to look into either improving the
hardware (more ram predominately) or getting a new server and
offsetting some of the work. Swap space is fine to use, but it's
incredibly slow when your system has to start swapping memory pages on
and off disk, and so, IMHO, in a production system it's better in the
long term to solve the problem of why you're hitting swap to begin
with.

But that's just my opinion.

As for your actual question... are buddleia and data two separate
LVMs? ANd how much swap do you have right now? (running the Free
command will show this)

So I'm getting back to the "Do you even need to worry about it" question.

Cheers,

Jeff




Jeff, thanks for the "big idea" questions. I'm topped out at 8GB of ram
on our server. Long term, your right, it would be good to consider
getting another machine.


Here's what 'free' says:
root@buddleia:~# free
total used free shared buffers cached
Mem: 8192972 8036204 156768 0 297424 1756296
-/+ buffers/cache: 5982484 2210488
Swap: 7831544 9816 7821728
root@buddleia:~#

As far as your questions about the LVM's... I have no idea, I set it all
up this past August. I would probably know the answer back then. I get
confused when it comes to LVM anyway.


The reason I want to move the swap file to he RAID array is because I
felt really bad for the HD that has the swap partition on it now... and
I figured it'd be best to share some of the load, and RAID is supposed
to be faster. I don't think it matters, but to be clear the array isn't
external.


I've been hearing complaints about the box "slowing down" recently ...
it happened yesterday when there was nothing swapped out (I had just
rebooted the box because of a kernel update that morning). But I've
seen the swap get to be about 4GB and we've had to wait a bit while the
swap sorts things out for us.


Yesterday when the slow-down happened. I hurriedly went into htop to see
what was up; like I said no swap usage, and no CPU's maxed out.. I had
no idea why it was so slow.


I was thinking about moving the swap as a precaution hoping to gain some
performance from it.


What is this performance tuning you speak of? Is this swappiness? I
just read about this in the SwapFaq.


Keep the "big idea" questions coming if you see fit, I like to hear the
ideas. I need it.


-Andy

--
ubuntu-users mailing list
ubuntu-users@lists.ubuntu.com
Modify settings or unsubscribe at: https://lists.ubuntu.com/mailman/listinfo/ubuntu-users
 
Old 03-15-2011, 02:28 PM
Tom H
 
Default Moving Swap file

On Tue, Mar 15, 2011 at 9:00 AM, Andy Graybeal
<andy.graybeal@casanueva.com> wrote:
>
> I'd like to move our swap file onto our RAID array.
>
> This is my fstab:
>
> proc * * * * * */proc * * * * * proc * *nodev,noexec,nosuid 0 0
> /dev/mapper/buddleia_vg-root_lv / * * * * * * * ext4
> relatime,errors=remount-ro 0 * * * 1
> /dev/mapper/data_vg-home_lv /home * * * * * ext4 * *relatime * * * *0 2
> /dev/mapper/data_vg-srv_lv /srv * * * * * *ext4 * *acl,relatime * * * *0 2
> /dev/mapper/buddleia_vg-swap_lv none * * * * * *swap * *sw 0 0
> /dev/fd0 * * * */media/floppy0 *auto * *rw,user,noauto,exec,utf8 0 0
> /dev/sdf1 * * * /media/maxtor * ntfs-3g * * * * rw * * * * * * * * * * *0 0
>
> /srv is where all our data lives.
>
> Should I make a swap file? *I'm reading this:
> https://help.ubuntu.com/community/SwapFaq
>
> It looks like making a swap partition would be best, but I'm afraid to mess
> around with partitions because I'm afraid of messing up. *I'd rather do this
> when I have some downtime. * Maybe re-do the whole partitions scheme.
>
> Can I simply follow the SwapFaq instructions for making a swapfile and
> comment out my current swap partition in fstab?

IIUC, you want to move swap_lv from buddleia_vg to data_vg and leave
root_lv on buddleia_vg.

You're using LVM so it's easy to move swap to data_vg (especially
since there'll be no data to move) if all the PEs on the PV(s) of
data_vg aren't yet allocated. If they are, it's do-able but more
complicated.

(You want swap to be on a RAID volume but not "/"!)

--
ubuntu-users mailing list
ubuntu-users@lists.ubuntu.com
Modify settings or unsubscribe at: https://lists.ubuntu.com/mailman/listinfo/ubuntu-users
 

Thread Tools




All times are GMT. The time now is 08:40 AM.

VBulletin, Copyright ©2000 - 2014, Jelsoft Enterprises Ltd.
Content Relevant URLs by vBSEO ©2007, Crawlability, Inc.
Copyright 2007 - 2008, www.linux-archive.org