Re: Query about existence of way to free up unnecessary RAM usage
On Wed, 10 Sep 2014 16:04:46 +0800
Bret Busby <bret.busby@gmail.com> wrote:
> On 10/09/2014, Steve Litt <slitt@troubleshooters.com> wrote:
> > On Tue, 9 Sep 2014 21:51:35 +0200
> > Bzzzz <lazyvirus@gmx.com> wrote:
> >
> >> On Wed, 10 Sep 2014 03:30:40 +0800
> >> Bret Busby <bret.busby@gmail.com> wrote:
> >>
> >> > Alright, then; it is doing token swapping - with 99% of 16GB
> >> > memory usage, and, swapping only 4% of (about) 40GB swap
> >> > capacity, you can't seriously tell me that the swapping is
> >> > working as it should be.
> >>
> >> Anyway, a swap of 40GB is too much for a RAM of 16GB (should be
> >> around 16-20GB), unless you perform operations that generates
> >> a lot of intermediary results).
> >
> > The reason I agree with you is that if you need to swap anywhere
> > near 40GB of swap, your computer will be crawling to the point
> > where you might as well abort the guilty program (if you can
> > navigate to do so), or reboot the compute.
> >
> > That said, I just found out my swap partition is 44GB for a 16GB
> > semiconductor RAM.
> >
>
> So, does swapping work on your system?
>
> Does your RAM usage go above 50%, without swapping, and, above 90%,
> with less than 5% of the swap capacity being used?
Hi Bret,
I can't answer your question in English, because I've never really
understood Linux memory usage. There's an algorithm to figure out how
much RAM to use in order to cache disk accesses, and another algorithm
to figure out how much swap partition to use to substitute for RAM, and
it just twirls my head.
So the best thing I can do is show the results of a couple commands:
slitt@mydesq2:~$ vmstat -SM
procs -----------memory---------- ---swap-- -----io----
r b swpd free buff cache si so bi bo
0 0 0 7113 682 5172 0 0 14 20
slitt@mydesq2:~$ free -h
total used free shared buffers cached
Mem: 14G 8.0G 6.9G 0B 682M 5.1G
-/+ buffers/cache: 2.2G 12G
Swap: 44G 0B 44G
slitt@mydesq2:~$ ps avx k -%mem --cols 70 | less
PID TTY STAT TIME MAJFL TRS DRS RSS %MEM COMMAND
5206 tty1 Sl 85:29 199 90 1469065 537184 3.4 iceweasel
3684 tty7 Ss+ 164:46 53 0 292516 185980 1.1 /usr/bin/X
10843 tty1 Sl 0:24 2 3208 620275 152020 0.9 /scratch/ex
15930 tty1 SLl 194:54 1 75 570556 100924 0.6 /usr/lib/ic
14880 tty1 Sl 5:48 113 606 561065 68632 0.4 bluefish
2384 ? Ssl 0:13 3 0 172692 37200 0.2 /sbin/zfs-fu
10303 tty1 SL 12:00 0 4001 329142 36720 0.2 /usr/bin/mpl
30977 tty1 Sl 5:39 0 2392 246343 31864 0.2 smplayer
12107 tty1 Sl 3:17 33 627 374508 28320 0.1 xchat
3733 tty1 Sl 0:00 45 2392 230091 26132 0.1 /usr/bin/pyt
3731 tty1 S 0:00 44 2392 183983 22568 0.1 /usr/bin/pyt
12124 tty1 Sl 0:06 15 169 436406 19080 0.1 xfterm
10416 ? Ss 0:00 3 2255 449748 18680 0.1 gvim
20935 pts/14 SL+ 3:42 2 4001 358522 18392 0.1 mplayer -loo
3717 tty1 S 0:23 66 333 156834 14088 0.0 /usr/bin/ope
22826 tty1 Sl 0:01 0 49 300502 12172 0.0 lxt
3734 tty1 Sl 0:00 28 12 369919 11604 0.0 /usr/lib/x86
3246 ? Sl 0:00 96 0 362952 11032 0.0 /usr/lib/x86
Bret, I just remembered, I use the xxxterm browser a lot, and sometimes
when I use it a lot, all of a sudden the RAM consumed by X goes up to
about 99% and the system slows to a crawl, and I have to start killing
xxxterms. As a matter of fact, that's why I'm starting to use more
iceweasel and less xxxterm. xxxterm is a touch typist's dream browser,
but it gets out of control sometimes.
By the way, I'm using Openbox for a windowmanager/desktop. The commands
I gave you represent a typical usage for me, except I have less than
normal xxxterms running.
Anyway, I hope this helps.
SteveT
Steve Litt * http://www.troubleshooters.com/
Troubleshooting Training * Human Performance
Reply to: