urxvtd performance problems and possible fixes
Marc Lehmann
schmorp at schmorp.de
Fri Dec 7 20:36:51 CET 2007
On Fri, Dec 07, 2007 at 07:16:36PM +0000, Reuben Thomas <rrt at sc3d.org> wrote:
> > You can't do that without an idle watcher - it runs when the app has nothing
> > better to do, which means it has to use a lower priority than the tasks that
> > update the other terminals.
>
> I don't want the app to wait until it has nothing better to do, I just don't
> want the reformatting to stop me from using it! Am I being unclear?
No, but I wonder whats so hard to understand about what I wrote a number
of times so far: You can't do that without an idle watcher.
Can't you accept that? If you disagree with that, how should it be
implemented?
> > Are you sure you are looking at it right? Free certainly is a different
> > value than cache on all opertaing systems. Cache means the memory isn't
> > free, but used for other purposes. It doesn't preclude the scrollback
> > being swapped out, for example.
>
> Modern Linux doesn't really ever give you "free" memory: memory not used by
> processes is used to cache the file system, swap &c.
All versions, modern or not, of linux happily give you "free" memory:
total used free shared buffers cached
Mem: 2060176 2046756 13420 0 125188 791236
"free" means unused, not as you claim "used by cache". buffers and cached
together are the memory used to cache file system. Memory used by other
apps is also never used for swapping, ever.
You are seriously confused (and confusing) about memory management works
on Linux. Its not totally unlike what you said (memory otherwise unused
might be used to cache filesystem data), but its still different than what
you claim. You also seem to confuse the terms "RAM" and "swap". They are
totally different.
> Swapping is indeed the main suspect here, but I'm at a loss to see why.
Lack of memory, or your operating system is swapping too
aggressively. Likely it is the former.
> >> Mem: 507792k total, 498888k used, 8904k free, 25852k buffers
> >> Swap: 522104k total, 261052k used, 261052k free, 67636k cached
> >>
> >> i.e. ~100Mb of RAM free.
> >
> > I see 25mb, not 100, which is rather little, given that linux (I assuem
> > you use linux) will not use all the buffer cache.
>
> I'm seeing "67636k cache", i.e. it's caching 67Mb of swap in RAM. That's
> basically free too.
No, it is used by filesystem caches. Linux will not give up all of that
for applications to use, so its not "basically free".
> > If you compile without --enable-unicode3, then each character will need 6
> > bytes instead if 8, which helps a lot with big scrollbacks.
>
> I'm just using the Debian package.
Well.
> > You probably use it a lot more,
>
> Not really. I'm normally swapping between email (in a urxvt), Emacs, and
Ok.
> day. Part of the problem with urxvt is that it reformats all my history
> whenever a window is resized, i.e. it visits pretty much all its memory,
There is no problem with urxvt. The problem is your set-up: You don't have
the RAM to use all your apps at the same time, so some of them get swapped
out and get slow.
> I agree that more memory would solve my problem; sadly my laptop is not
> upgradeable any further, and since the problem is clearly soluble in theory,
Sure, just close some apps, helps in practise, too.
> I thought it was worth discussing. Basically, the way that urxvt works at
> the moment doesn't play very well with virtual memory, it relies on having
> enough physical memory. That's a pity.
No, it doesn't rely on enough physical memory. Your machine is rather
untypical, and resizing all windows is also ratehr untypical, and you use
untypically long scrollback buffers.
urxvt works quite well with virtual memory. It doesn't work with your
usage style, at best. No application works well if most of it is swapped
out and it is told to access all that memory. It has nothign whatsoever to
do with urxvt.
--
The choice of a Deliantra, the free code+content MORPG
-----==- _GNU_ http://www.deliantra.net
----==-- _ generation
---==---(_)__ __ ____ __ Marc Lehmann
--==---/ / _ \/ // /\ \/ / pcg at goof.com
-=====/_/_//_/\_,_/ /_/\_\
More information about the rxvt-unicode
mailing list