xlock too slow to wake up

classic Classic list List threaded Threaded
19 messages Options
Reply | Threaded
Open this post in threaded view
|

xlock too slow to wake up

oxyopes
hi

Everyday i come to my office and have to wait for a looong
time shaking the computer to get xlock give me the passwd
prompt. Why not improve that? A priority matter?

Ubu 12.04/Unity, using the standard unity "Lock Screen"
(Ctrl Alt L) function.

... o

--
ubuntu-users mailing list
[hidden email]
Modify settings or unsubscribe at: https://lists.ubuntu.com/mailman/listinfo/ubuntu-users
Reply | Threaded
Open this post in threaded view
|

Re: xlock too slow to wake up

Basil Chupin-2
On 18/05/12 17:18, oxy wrote:

> hi
>
> Everyday i come to my office and have to wait for a looong
> time shaking the computer to get xlock give me the passwd
> prompt. Why not improve that? A priority matter?
>
> Ubu 12.04/Unity, using the standard unity "Lock Screen"
> (Ctrl Alt L) function.
>
> ... o


But what settings do you have in Power Management? (Hibernate, Sleep,.....?)

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
[hidden email]
Modify settings or unsubscribe at: https://lists.ubuntu.com/mailman/listinfo/ubuntu-users
Reply | Threaded
Open this post in threaded view
|

Re: xlock too slow to wake up

oxyopes
... noo, just xlock (Ctrl Alt L), nothing else.

--
ubuntu-users mailing list
[hidden email]
Modify settings or unsubscribe at: https://lists.ubuntu.com/mailman/listinfo/ubuntu-users
Reply | Threaded
Open this post in threaded view
|

Re: xlock too slow to wake up

Basil Chupin-2
On 18/05/12 19:12, oxy wrote:
> ... noo, just xlock (Ctrl Alt L), nothing else.

By this you mean that you have deselected all settings in Power
Management and set the profile to use the settings for a PC using AC
power and not the profile for a laptop?

OK, if so then this is a curious problem.

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
[hidden email]
Modify settings or unsubscribe at: https://lists.ubuntu.com/mailman/listinfo/ubuntu-users
Reply | Threaded
Open this post in threaded view
|

Re: xlock too slow to wake up

Steve Flynn
In reply to this post by oxyopes
On 18 May 2012 08:18, oxy <[hidden email]> wrote:

> Everyday i come to my office and have to wait for a looong
> time shaking the computer to get xlock give me the passwd
> prompt. Why not improve that? A priority matter?
>
> Ubu 12.04/Unity, using the standard unity "Lock Screen"
> (Ctrl Alt L) function.

I can't replicate this. If I lock my screen, the password prompt
appears immediately upon pressing a key, touching the touchpad or
moving the trackball/mouse.

This is the same on my desktop and all of my laptops.

Roughly how long do you have to wait?
Does the screen come out of sleep immediately?
Is there any hard-drive activity when you do this?
What do you do to "shake the computer"?


--
Steve

When one person suffers from a delusion it is insanity. When many
people suffer from a delusion it is called religion.

--
ubuntu-users mailing list
[hidden email]
Modify settings or unsubscribe at: https://lists.ubuntu.com/mailman/listinfo/ubuntu-users
Reply | Threaded
Open this post in threaded view
|

Re: xlock too slow to wake up

oxyopes
...
power management says: do not suspend

It becomes only slow overnight. It i lock and perss enter
i have an immediate response. Cannt we by default set
xlock to highest priority? I could do it myself, but better
having it for all ...

--
ubuntu-users mailing list
[hidden email]
Modify settings or unsubscribe at: https://lists.ubuntu.com/mailman/listinfo/ubuntu-users
Reply | Threaded
Open this post in threaded view
|

Re: xlock too slow to wake up

Paul Smith-2
In reply to this post by Steve Flynn
> On 18 May 2012 08:18, oxy <[hidden email]> wrote:
>
> > Everyday i come to my office and have to wait for a looong
> > time shaking the computer to get xlock give me the passwd
> > prompt. Why not improve that? A priority matter?
> >
> > Ubu 12.04/Unity, using the standard unity "Lock Screen"
> > (Ctrl Alt L) function.

A more specific definition of "a looong time" would be helpful.  What
seems a long time to you might not seem long to us.  Is it 10 seconds?
1 minute?  10 minutes?

You say it only happens when you unlock in the morning: that's a big
clue.  If you lock the system and go to lunch, meetings, etc. then come
back after an hour or two and unlock is it slow then?

I strongly suspect that it's nothing to do with power management, but
rather normal behavior.  I suspect you have either not enough memory in
your system for the workload you're running, and/or you added too much
swap space.

Remember that memory in your computer is not just used for your
programs.  It's also used by the kernel to support things like disk
caching (so disk IO will be faster).  On any GNU/Linux system, there are
a lot of bookkeeping processes that run overnight, and some of them do
things like walk your entire disk drive (to support the locate database
for example, or if you have any backup software running).  Also some of
them may use a lot of memory while they are running, pushing other
programs out to swap, then exit freeing that memory... but your programs
are already swapped out.

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).

So the less free memory you have for disk caching/bookkeeping programs,
and/or the more swap space you have to allow the kernel to swap out
memory, the more of your programs are swapped out in the morning and the
longer it takes to swap it all back in again before they can run.

So, useful information for us would be, how long does the system take to
wake up in the morning?  How much memory do you have in the system?  How
large is your swap space?

If your system is running OK otherwise, you might just need to get used
to pressing some keys to wake it up, then going to get your morning tea
or coffee etc. while it swaps in.  The alternative would be to buy more
memory, or reduce your swap space.  I wouldn't recommend trying to turn
off the bookkeeping processes.


--
ubuntu-users mailing list
[hidden email]
Modify settings or unsubscribe at: https://lists.ubuntu.com/mailman/listinfo/ubuntu-users
Reply | Threaded
Open this post in threaded view
|

Re: xlock too slow to wake up

Basil Chupin-2
In reply to this post by oxyopes
On 18/05/12 22:29, oxy wrote:
> ...
> power management says: do not suspend
>
> It becomes only slow overnight. It i lock and perss enter
> i have an immediate response. Cannt we by default set
> xlock to highest priority? I could do it myself, but better
> having it for all ...

As far a I am aware, every task can have its priority changed - moved up
or down. Look at the documentation on how to do it.

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
[hidden email]
Modify settings or unsubscribe at: https://lists.ubuntu.com/mailman/listinfo/ubuntu-users
Reply | Threaded
Open this post in threaded view
|

Re: xlock too slow to wake up

Paul Smith-2
On Fri, 2012-05-18 at 23:02 +1000, Basil Chupin wrote:

> On 18/05/12 22:29, oxy wrote:
> > ...
> > power management says: do not suspend
> >
> > It becomes only slow overnight. It i lock and perss enter
> > i have an immediate response. Cannt we by default set
> > xlock to highest priority? I could do it myself, but better
> > having it for all ...
>
> As far a I am aware, every task can have its priority changed - moved up
> or down. Look at the documentation on how to do it.

Unless the system is very busy doing something when you come in in the
morning I seriously doubt that it's an issue with priority, or that
changing the priority will have any impact.  Priority only helps if
there's contention.  If the machine is idle (just swapped out) there's
no contention and priority settings won't make any difference.

If they system IS very busy when you arrive at work you might want to
adjust the times at which overnight bookkeeping functions run, so they
end before you get into work.  If you work odd hours (for example you
start at 4am or something) you may run into this.


--
ubuntu-users mailing list
[hidden email]
Modify settings or unsubscribe at: https://lists.ubuntu.com/mailman/listinfo/ubuntu-users
Reply | Threaded
Open this post in threaded view
|

Re: xlock too slow to wake up

oxyopes
>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.

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

thx...

--
ubuntu-users mailing list
[hidden email]
Modify settings or unsubscribe at: https://lists.ubuntu.com/mailman/listinfo/ubuntu-users
Reply | Threaded
Open this post in threaded view
|

Re: xlock too slow to wake up

Paul Smith-2
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
[hidden email]
Modify settings or unsubscribe at: https://lists.ubuntu.com/mailman/listinfo/ubuntu-users
Reply | Threaded
Open this post in threaded view
|

Re: xlock too slow to wake up

oxyopes
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
[hidden email]
Modify settings or unsubscribe at: https://lists.ubuntu.com/mailman/listinfo/ubuntu-users
Reply | Threaded
Open this post in threaded view
|

Re: xlock too slow to wake up

Paul Smith-2
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
[hidden email]
Modify settings or unsubscribe at: https://lists.ubuntu.com/mailman/listinfo/ubuntu-users
Reply | Threaded
Open this post in threaded view
|

Re: xlock too slow to wake up

oxyopes
> 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
[hidden email]
Modify settings or unsubscribe at: https://lists.ubuntu.com/mailman/listinfo/ubuntu-users
Reply | Threaded
Open this post in threaded view
|

Re: xlock too slow to wake up

Patton Echols
In reply to this post by Paul Smith-2
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: [hidden email]


--
ubuntu-users mailing list
[hidden email]
Modify settings or unsubscribe at: https://lists.ubuntu.com/mailman/listinfo/ubuntu-users
Reply | Threaded
Open this post in threaded view
|

Re: xlock too slow to wake up

Basil Chupin-2
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
[hidden email]
Modify settings or unsubscribe at: https://lists.ubuntu.com/mailman/listinfo/ubuntu-users
Reply | Threaded
Open this post in threaded view
|

Re: xlock too slow to wake up

Liam Proven
In reply to this post by Patton Echols
On 19 May 2012 18:42, Patton Echols <[hidden email]> 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: [hidden email] • GMail/G+/Twitter/Flickr/Facebook: lproven
MSN: [hidden email] • Skype/AIM/Yahoo/LinkedIn: liamproven
Tel: +44 20-8685-0498 • Cell: +44 7939-087884

--
ubuntu-users mailing list
[hidden email]
Modify settings or unsubscribe at: https://lists.ubuntu.com/mailman/listinfo/ubuntu-users
Reply | Threaded
Open this post in threaded view
|

Re: xlock too slow to wake up

oxyopes
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
[hidden email]
Modify settings or unsubscribe at: https://lists.ubuntu.com/mailman/listinfo/ubuntu-users
Reply | Threaded
Open this post in threaded view
|

Re: xlock too slow to wake up

Patton Echols
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: [hidden email]


--
ubuntu-users mailing list
[hidden email]
Modify settings or unsubscribe at: https://lists.ubuntu.com/mailman/listinfo/ubuntu-users