1 |
Florian Philipp writes: |
2 |
|
3 |
> I have a bit of a problem. I'm on KDE-4.4.5 and it eats memory for |
4 |
> breakfast. Directly after booting, everything is okay but the usage |
5 |
> grows significantly. I wonder whether this is expected behavior. |
6 |
|
7 |
I was just about to write something about this. I suffered from bad |
8 |
performance for quite a while now (like mplayer stuttering during |
9 |
emerges), started a thread in in the gentoo-performance list and got some |
10 |
advice that made things a little better, but I suspect the effect came |
11 |
from reduced memory usage only. Since yesterday the problems all seem to |
12 |
be gone, but again it's not a real solution, as I plugged in another 2GB |
13 |
of memory, so now I have 6G. |
14 |
|
15 |
I used to restart kdm once per day in order to free memory. If I did not |
16 |
do this, KDE4 became nearly unsusabe. |
17 |
|
18 |
> The following statistics have been taken after 8 days of uptime during |
19 |
> which the system was on standby most of the time during work days and |
20 |
> at night. |
21 |
> |
22 |
> free -m |
23 |
> total used free shared buffers cached |
24 |
> Mem: 3754 3588 165 0 57 258 |
25 |
> -/+ buffers/cache: 3271 482 |
26 |
> Swap: 6142 978 5163 |
27 |
> |
28 |
> A desktop machine that has 4GB RAM and still needs to swap?! |
29 |
|
30 |
After 1 day of uptime, my system needs even more, but I'm also running |
31 |
some stuff. |
32 |
|
33 |
wonko@weird ~ $ free -m |
34 |
total used free shared buffers cached |
35 |
Mem: 5721 5618 103 0 112 1108 |
36 |
-/+ buffers/cache: 4397 1323 |
37 |
Swap: 4094 50 4044 |
38 |
|
39 |
|
40 |
> Excerpt from top: |
41 |
> VIRT RES SHR S %CPU %MEM TIME+ COMMAND |
42 |
> 1094m 484m 10m S 0 12.9 96:43.01 firefox |
43 |
> 932m 471m 15m S 0 12.6 5:10.20 akregator |
44 |
> 384m 303m 2856 S 0 8.1 59:43.43 virtuoso-t |
45 |
> 709m 282m 2936 S 0 7.5 0:40.51 nepomukservices |
46 |
> 839m 146m 15m S 0 3.9 8:37.76 thunderbird-bin |
47 |
> 191m 131m 532 S 0 3.5 12:30.73 dbus-daemon |
48 |
> 902m 105m 5288 S 0 2.8 0:30.16 krunner |
49 |
> 263m 105m 1724 S 0 2.8 2:31.18 squid |
50 |
> 255m 61m 6672 S 7 1.6 305:04.24 X |
51 |
> 1106m 55m 7756 S 0 1.5 4:22.73 amarok |
52 |
> 534m 54m 10m S 0 1.5 2:33.94 kopete |
53 |
> 559m 52m 6536 S 0 1.4 56:52.37 nepomukservices |
54 |
> 718m 38m 12m S 4 1.0 143:36.62 plasma-desktop |
55 |
> 295m 33m 2048 S 0 0.9 1:59.32 mysqld |
56 |
> 360m 17m 1856 S 0 0.5 0:07.56 tomboy |
57 |
> 445m 16m 3392 S 0 0.4 38:54.36 nepomukservices |
58 |
> 365m 14m 6356 S 1 0.4 27:38.49 konsole |
59 |
> 438m 11m 4928 S 0 0.3 0:20.12 kded4 |
60 |
> 508m 11m 6364 S 0 0.3 0:45.79 kwin |
61 |
|
62 |
Now this looks different here. I have X with 946M, plasma-desktop with |
63 |
505M, that's 15 times the memory you need. Then comes java with 371M (for |
64 |
TV-Browser - yes, 371MB just for showing the TV programme!), emerge wants |
65 |
272M while emerging openoffice. Chromium also needs much memory, my 33 |
66 |
tabs want 762M: |
67 |
|
68 |
VIRT RES SHR S %CPU %MEM TIME+ COMMAND |
69 |
1722m 946m 22m R 24 16.5 217:29.77 X |
70 |
1728m 504m 23m S 0 8.8 61:07.82 plasma-desktop |
71 |
2018m 371m 6772 S 0 6.5 2:45.60 java |
72 |
379m 272m 1884 S 0 4.8 4:39.50 emerge |
73 |
2632m 127m 11m S 0 2.2 6:48.31 pica |
74 |
694m 123m 21m S 0 2.2 11:28.50 kontact |
75 |
1246m 117m 20m S 0 2.1 27:30.34 amarok |
76 |
757m 101m 86m S 0 1.8 116:20.68 vmware-vmx |
77 |
946m 94m 10m S 0 1.7 1:37.32 chrome |
78 |
682m 91m 15m S 0 1.6 4:22.98 chrome |
79 |
494m 79m 14m S 0 1.4 0:40.28 kmymoney |
80 |
929m 61m 13m S 0 1.1 2:29.96 chrome |
81 |
328m 56m 5084 S 0 1.0 1:46.09 kio_imap4 |
82 |
73712 49m 616 S 0 0.9 0:10.79 screen |
83 |
921m 48m 30m S 0 0.8 0:01.62 systemsettings |
84 |
573m 46m 14m S 0 0.8 1:36.06 dolphin |
85 |
|
86 |
> Okay, I'm used to Firefox taking much memory. I'm okay with that since |
87 |
> it's the most heavily used application currently running. But why does |
88 |
> Akregator need that much memory? It doesn't even have any tabs open at |
89 |
> the moment and is just running minimized in the background. |
90 |
|
91 |
Beats me. |
92 |
|
93 |
> Virtuoso looks like an optional Soprano dependency which in turn is |
94 |
> needed for Nepomuk. Are the default use flags for dev-libs/soprano |
95 |
> suboptimal? What happens if I choose other flags for Soprano? |
96 |
|
97 |
Don't know. But you can just turn off virtuoso in systemsettings-> desktop |
98 |
search. |
99 |
I just turned it on again, and - now I need 271M of swap, and again my |
100 |
system becomes unresponsive due to the constant swapping that is going on. |
101 |
With 6G! |
102 |
|
103 |
Which is another problem I think. One question is how KDE4 can need such a |
104 |
lot of memory, the other is how the system can become so unresponsive once |
105 |
its starts swapping. I used to have larger swap with less RAM, and did not |
106 |
have those performance problems. One year ago I usually had 2G tmpfs for |
107 |
/var/tmp/portage, nowadays (with 4G) I cannot emerge things while working |
108 |
with the system (like, watching videos with mplayer). It feels like as |
109 |
soon as RAM is not enough and swapping occurs, the system swaps stuff that |
110 |
it will need again immediately. |
111 |
|
112 |
What stuff do I run? I have 8 activities/desktops, there are some |
113 |
screenshots at [1] in case someone is interested. My default session has 4 |
114 |
konsoles with a total of 8 tabs, 3 dolphins with 5 views, amarok, kontact, |
115 |
kmymoney2. TV-Browser (java application which eats a lot of memory), some |
116 |
admin tools like gkrellm or diagnostic plasmoids. And a lot of browser |
117 |
tabs, around 30. Currently I'm using chromium, that seems to use less |
118 |
memory than konqueror. The number of tabs increases with uptime. Is this |
119 |
too much? Desktop effects are enabled. Today I started openoffice once, |
120 |
played a little quake3. There is a windows VM running with vmplayer, but |
121 |
that takes only 50MB. wine uses more, I'm using this today, but normally |
122 |
not. |
123 |
|
124 |
The system is an AMD Athlon 4850e (2 cores, 2500MHz) with 4GB of RAM. |
125 |
Everything is on LVM, most partitions are LUKS-encrypted. /var/tmp/portage |
126 |
is unencrypted, and at the moment swap is also not encrypted and on my 2nd |
127 |
drive. The encryption does not be much of an overhead, when the system |
128 |
stutters, top shows a large wa(it) value, and not much CPU usage. swappiness |
129 |
is set to 10. |
130 |
|
131 |
Any ideas? I might just get another 2G, and then the problems will be gone, |
132 |
but I think this would be only a workaround. 6G should be enough already |
133 |
even when using lots of applications, shouldn't it`? |
134 |
|
135 |
BTW, I emerged and tried KDE 3.5 a week ago. Cool, things were fast |
136 |
there. Probably because it needs less memory. But I don't want to go back. |
137 |
|
138 |
Wonko |
139 |
|
140 |
[1] http://archives.gentoo.org/gentoo-performance/msg_e4365aee884ee527dc8fb82d2c725ec4.xml |