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 05-18-2012, 03:05 PM
Paul Smith
 
Default xlock too slow to wake up

On Fri, 2012-05-18 at 16:01 +0200, oxy wrote:
> >Because all your normally-running programs are idle, the kernel will
> >feel free to swap out your programs and use the resulting memory for
> >these bookkeeping processes/disk caching. "Swapping out", FYI, means
> >that the in-memory content of your programs are written to disk (that's
> >what swap space is, disk space reserved to hold memory overflow). Then
> >when you come in in the morning and press a key to wake up your programs
> >the kernel has to swap them back in again (read them out of disk swap
> >space and into memory). This can take a long time (relatively speaking).
>
> I guess thats it. I have 2x 4GB swap, running many progs+virtualbox
> continuously. In the morning i wait 1-5 minutes till i get a passwd prompt.
> Today i went to tty1 and called top, no strange process there.

You are not being clear here. By "2x 4GB swap" did you mean you have 4G
of RAM and 8G of swap? That's far too much swap, IMO.

However, how much swap you should have is a very subjective thing.

Having twice RAM for swap is OK for true desktop systems with smaller
amounts of RAM, where there are likely a number of applications that are
idle much of the time. Even for desktop systems, twice RAM is far too
big once you start getting a decent amount of RAM (anything much over
1G, IMO).

Also you are using your system a bit more like a server, with VMs etc.
For servers you want LESS swap, paradoxically, for better performance
(of course you have to monitor the memory usage of the server and be
willing to add RAM if necessary).

I would recommend you use no more than 1x RAM (4G, if I understand you
correctly). Some people would recommend that you would only use 2G RAM
for swap, for any system with >=2G RAM. Here's a good article on this:

http://www.cyberciti.biz/tips/linux-swap-space.html

You can also modify the "swappiness" setting on your system, which might
help.

You should look at the amount of RAM you're using during the day, when
your machine is busy but responsive (use cat /proc/meminfo or top).
Don't worry about how much RAM is used; Linux will always use all the
RAM it can. The question is do you see much swap being used? There's
always some but unless you see tons of swap being used then you don't
NEED much swap to run your normal operations, and you should have just a
basic amount (2G or so max) to handle overflow/exceptional conditions.

And of course, if you're using an older/slower hard disk drive then swap
is even worse. Sometimes people put a lot of money into CPU and RAM,
but skimp out on the disk drive specs.

> The question is: cannt i get it faster by default setting xlock to higher
> priority?

No. If there are two programs that are both trying to run at the same
time, changing the priority will let one of them run faster than the
other.

Priority has nothing to do with when programs are swapped out in this
case, because the program is idle.


--
ubuntu-users mailing list
ubuntu-users@lists.ubuntu.com
Modify settings or unsubscribe at: https://lists.ubuntu.com/mailman/listinfo/ubuntu-users
 
Old 05-18-2012, 04:22 PM
oxy
 
Default xlock too slow to wake up

hi paul

i just checked it again. I have

8G RAM
2x 16G swap

I run everything on a raid lvl 2. So swap should be on it as well
(thus only 16G).
For some reason i left it out n i have now 32G. Maybe I'll disable one of them.
Actually i even split the swap in each HD in 2 parts. In old times it would get
swaping faster. So maybe i can reduce it to 8G. I also wanna upgrade to 16G
RAM. Now its getting completely used:

Mem: 8158508k total, 7954992k used, 203516k free

Enoying thing with this xlock ...
Thanx a lot ... i'll read the article.
oxy

--
ubuntu-users mailing list
ubuntu-users@lists.ubuntu.com
Modify settings or unsubscribe at: https://lists.ubuntu.com/mailman/listinfo/ubuntu-users
 
Old 05-18-2012, 04:40 PM
Paul Smith
 
Default xlock too slow to wake up

On Fri, 2012-05-18 at 18:22 +0200, oxy wrote:
> i just checked it again. I have
>
> 8G RAM
> 2x 16G swap

Yikes! 32G! That's WAY WAY WAY too much swap.

For an 8G RAM system I would recommend NO MORE THAN 4G swap. Total.
Unless you have unusual requirements for the system (kernel development,
where you're taking kernel panic cores, suspend to ram, etc. are
situations where you need lots of swap). Normal usage for a desktop and
user-space development definitely doesn't need that much.

> I run everything on a raid lvl 2. So swap should be on it as well
> (thus only 16G).
> For some reason i left it out n i have now 32G. Maybe I'll disable one of them.

Even 16G is far too much swap IMO.

> Actually i even split the swap in each HD in 2 parts. In old times it would get
> swaping faster. So maybe i can reduce it to 8G. I also wanna upgrade to 16G
> RAM. Now its getting completely used:
>
> Mem: 8158508k total, 7954992k used, 203516k free

You missed my comment:

> Don't worry about how much RAM is used; Linux will always use all the
> RAM it can. The question is do you see much swap being used?

The fact that you have all your RAM used is fine, it just means Linux is
being efficient and not wasting resources, by using RAM to make disk
access faster, not getting rid of unused pages in case they're needed
again, etc. You WANT all your memory to be used! Don't buy more memory
just because Linux uses it all; you'll be forever buying more memory.

The question, as I said above, is how much swap is being used? If your
RAM is all used but only 100M or so of swap is used, even during busy
times, then you're fine. In fact, even if you have 1G or so of swap
used (for a system with that much RAM) I would say you're fine. If you
see you have 2-3G of swap used constantly then you might consider adding
more RAM, if your system feels slow/choppy (not in the morning, I mean
once you get it to a steady state).

There are other tools you can use to get a better idea of the "swap
churn", which is more of a problem them a lot of steady-state swap
content. It's too technical to get into here though.


--
ubuntu-users mailing list
ubuntu-users@lists.ubuntu.com
Modify settings or unsubscribe at: https://lists.ubuntu.com/mailman/listinfo/ubuntu-users
 
Old 05-18-2012, 08:56 PM
oxy
 
Default xlock too slow to wake up

> RAM it can. The question is do you see much swap being used?

swapon -s gives 2x 1.5G

I do have 8 virtual working spaces, mostly of the running a software
couse i like to have fast access to all of them. One window runs
constantly windows xp. Others are firefox, thunderbird, xfce, matlab ...

> you'll be forever buying more memory.
:-) funny ... but i'll do that...

thx paul
nothing better than talking to an expert.

--
ubuntu-users mailing list
ubuntu-users@lists.ubuntu.com
Modify settings or unsubscribe at: https://lists.ubuntu.com/mailman/listinfo/ubuntu-users
 
Old 05-19-2012, 05:42 PM
Patton Echols
 
Default xlock too slow to wake up

On 05/18/2012 09:40 AM, Paul Smith wrote:

On Fri, 2012-05-18 at 18:22 +0200, oxy wrote:

i just checked it again. I have

8G RAM
2x 16G swap

Yikes! 32G! That's WAY WAY WAY too much swap.

For an 8G RAM system I would recommend NO MORE THAN 4G swap. Total.
Unless you have unusual requirements for the system (kernel development,
where you're taking kernel panic cores, suspend to ram, etc. are
situations where you need lots of swap). Normal usage for a desktop and
user-space development definitely doesn't need that much.



Normal usage for desktops DOES need that much . . . maybe.

Suspend to disk / Hibernate is normal usage for laptops and desktops too
if the hardware supports it and a backup battery is recognized by the
system. Since swap space is used for that purpose, you need at least as
much swap as RAM. (preferably more) The article you cited agrees and
makes the distinction between servers and desktop/laptops.


--PE

--
Patton Echols
M. Patton Echols, PC
1300 NE Linden
P.O.B. 1768
Gresham, OR 97030
(503) 491-0863
Office email: pechols@greshamlaw.com


--
ubuntu-users mailing list
ubuntu-users@lists.ubuntu.com
Modify settings or unsubscribe at: https://lists.ubuntu.com/mailman/listinfo/ubuntu-users
 
Old 05-20-2012, 03:47 AM
Basil Chupin
 
Default xlock too slow to wake up

On 20/05/12 03:42, Patton Echols wrote:

On 05/18/2012 09:40 AM, Paul Smith wrote:

On Fri, 2012-05-18 at 18:22 +0200, oxy wrote:

i just checked it again. I have

8G RAM
2x 16G swap

Yikes! 32G! That's WAY WAY WAY too much swap.

For an 8G RAM system I would recommend NO MORE THAN 4G swap. Total.
Unless you have unusual requirements for the system (kernel development,
where you're taking kernel panic cores, suspend to ram, etc. are
situations where you need lots of swap). Normal usage for a desktop and
user-space development definitely doesn't need that much.



Normal usage for desktops DOES need that much . . . maybe.

Suspend to disk / Hibernate is normal usage for laptops and desktops
too if the hardware supports it and a backup battery is recognized by
the system. Since swap space is used for that purpose, you need at
least as much swap as RAM. (preferably more) The article you cited
agrees and makes the distinction between servers and desktop/laptops.


I have 16GB of RAM and during installation the install process
automatically assigned only 2GB to the swap partition.


BC


--
Using openSUSE 12.1 x86_64 KDE 4.8.3 and kernel 3.3.6 on a system with-
AMD FX 8-core 3.6/4.2GHz processor
16GB PC14900/1866MHz Quad Channel Corsair "Vengeance" RAM
Gigabyte AMD3+ m/board; Gigabyte nVidia GTX550Ti 1GB DDR5 GPU


--
ubuntu-users mailing list
ubuntu-users@lists.ubuntu.com
Modify settings or unsubscribe at: https://lists.ubuntu.com/mailman/listinfo/ubuntu-users
 
Old 05-20-2012, 02:05 PM
Liam Proven
 
Default xlock too slow to wake up

On 19 May 2012 18:42, Patton Echols <p.echols@comcast.net> wrote:
> On 05/18/2012 09:40 AM, Paul Smith wrote:
>>
>> On Fri, 2012-05-18 at 18:22 +0200, oxy wrote:
>>>
>>> i just checked it again. I have
>>>
>>> 8G RAM
>>> 2x 16G swap
>>
>> Yikes! Â*32G! Â*That's WAY WAY WAY too much swap.
>>
>> For an 8G RAM system I would recommend NO MORE THAN 4G swap. Â*Total.
>> Unless you have unusual requirements for the system (kernel development,
>> where you're taking kernel panic cores, suspend to ram, etc. are
>> situations where you need lots of swap). Â*Normal usage for a desktop and
>> user-space development definitely doesn't need that much.
>
> Normal usage for desktops DOES need that much . . . maybe.
>
> Suspend to disk / Hibernate is normal usage for laptops and desktops too if
> the hardware supports it and a backup battery is recognized by the system.
> Â*Since swap space is used for that purpose, you need at least as much swap
> as RAM. (preferably more) Â*The article you cited agrees and makes the
> distinction between servers and desktop/laptops.

You do need it for hibernation support, it's true.

For 20Y I have recommended 2× physical RAM as swap space, but now we
have PCs with 4-8GB of RAM becoming commonplace and 12-16GB not all
that rare, I think 2× RAM is too much. If you want hibernation
support, I'd probably allocate RAM+2GB now. If you have more than 2G
of stuff in swap, your system will be on its knees anyway, I think...

--
Liam Proven • Profile: http://lproven.livejournal.com/profile
Email: lproven@cix.co.uk • GMail/G+/Twitter/Flickr/Facebook: lproven
MSN: lproven@hotmail.com • Skype/AIM/Yahoo/LinkedIn: liamproven
Tel: +44 20-8685-0498 • Cell: +44 7939-087884

--
ubuntu-users mailing list
ubuntu-users@lists.ubuntu.com
Modify settings or unsubscribe at: https://lists.ubuntu.com/mailman/listinfo/ubuntu-users
 
Old 05-21-2012, 08:38 AM
oxy
 
Default xlock too slow to wake up

I solved my problem by installing xlockmore.
Since it displays moving pictures while locking
It wont fall in the swap space anymore.

By the way, how can i put a button with a costume
command (/usr/bin/xlock) on this Unity side-panel?

Regarding configurability this Unity is frustrating !

--
ubuntu-users mailing list
ubuntu-users@lists.ubuntu.com
Modify settings or unsubscribe at: https://lists.ubuntu.com/mailman/listinfo/ubuntu-users
 
Old 05-23-2012, 02:01 PM
Patton Echols
 
Default xlock too slow to wake up

On 05/21/2012 01:38 AM, oxy wrote:

I solved my problem by installing xlockmore.
Since it displays moving pictures while locking
It wont fall in the swap space anymore.

By the way, how can i put a button with a costume
command (/usr/bin/xlock) on this Unity side-panel?

Regarding configurability this Unity is frustrating !


You should start a new thread with a new question. A lot of folks who
might answer this may not be following this thread.


-- PE





--
Patton Echols
M. Patton Echols, PC
1300 NE Linden
P.O.B. 1768
Gresham, OR 97030
(503) 491-0863
Office email: pechols@greshamlaw.com


--
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 02:17 PM.

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