1 |
On Wednesday 25 August 2010 21:38:10 Alex Schuster wrote: |
2 |
> J. Roeleveld writes: |
3 |
> > On Wednesday 25 August 2010 03:32:40 Alex Schuster wrote: |
4 |
> > > I have an AMD Athlon(tm) Dual Core Processor 4850e CPU, on-board |
5 |
> > > Radeon HD 3200 graphics, 4GB of memory, an 1.5 TB drive. Lots of LVM |
6 |
> > > volumes, all encrypted, except for /usr/src and portage stuff. The |
7 |
> > > system is ~amd64, and I have -march=k8-sse3 in my CFLAGS. Current |
8 |
> > > kernel is 2.6.34-tuxonice, but I also tried others. I'm running KDE4 |
9 |
> > > with desktop effects enabled, X itself takes about 30-40% of CPU |
10 |
> > > time according to top. After system startup and login into KDE, 3.5G |
11 |
> > > of RAM are occupied. This increases after a while, and I need swap |
12 |
> > > space. Nothing to worry about I think. |
13 |
> > |
14 |
> > Encrypted filesystems can cause additional with activity, but I would |
15 |
> > expect that to remain the same over a long period. |
16 |
> |
17 |
> And I just moved my PORTAGE_TMPDIR to an unencrypted partition. |
18 |
> Can LVM create noticeable overhead? I also resized my logical volumes a |
19 |
> couple of times, could this lead to some LVM fragmentation? |
20 |
|
21 |
Theoretically, LVM will create an additional overhead. |
22 |
But I am extensibly using LVM on all my machines and haven't noticed any |
23 |
significant performance drops. |
24 |
|
25 |
LVM-fragmentation is a definite possibility. |
26 |
To defragment it, have a look at the following: |
27 |
|
28 |
http://bisqwit.iki.fi/source/lvm2defrag.html |
29 |
http://www.linuxquestions.org/questions/linux-software-2/how-do-i-lvm2-defrag- |
30 |
or-move-based-on-logical-volumes-689335/ |
31 |
|
32 |
I played with the first one on an older machine once and it does work quite |
33 |
nicely. |
34 |
|
35 |
> > However, how is the write and read performance on those disks? |
36 |
> |
37 |
> Here's the output of hdparm -t for all drives, 4 times. |
38 |
> |
39 |
> /dev/sda: (SATA system drive) |
40 |
> Timing buffered disk reads: 118 MB in 3.08 seconds = 38.37 MB/sec |
41 |
> Timing buffered disk reads: 194 MB in 3.11 seconds = 62.47 MB/sec |
42 |
> Timing buffered disk reads: 322 MB in 3.01 seconds = 106.82 MB/sec |
43 |
> Timing buffered disk reads: 244 MB in 3.00 seconds = 81.21 MB/sec |
44 |
> |
45 |
> /dev/sdb: (PATA master) |
46 |
> Timing buffered disk reads: 114 MB in 3.02 seconds = 37.70 MB/sec |
47 |
> Timing buffered disk reads: 114 MB in 3.00 seconds = 37.97 MB/sec |
48 |
> Timing buffered disk reads: 116 MB in 3.05 seconds = 38.06 MB/sec |
49 |
> Timing buffered disk reads: 116 MB in 3.05 seconds = 38.07 MB/sec |
50 |
> |
51 |
> /dev/sdc: (PATA slave) |
52 |
> Timing buffered disk reads: 164 MB in 3.03 seconds = 54.21 MB/sec |
53 |
> Timing buffered disk reads: 166 MB in 3.02 seconds = 55.04 MB/sec |
54 |
> Timing buffered disk reads: 166 MB in 3.01 seconds = 55.10 MB/sec |
55 |
> Timing buffered disk reads: 158 MB in 3.01 seconds = 52.41 MB/sec |
56 |
> |
57 |
> /dev/sdd: (SATA backup drive) |
58 |
> Timing buffered disk reads: 314 MB in 3.00 seconds = 104.55 MB/sec |
59 |
> Timing buffered disk reads: 312 MB in 3.01 seconds = 103.67 MB/sec |
60 |
> Timing buffered disk reads: 308 MB in 3.01 seconds = 102.34 MB/sec |
61 |
> Timing buffered disk reads: 314 MB in 3.00 seconds = 104.60 MB/sec |
62 |
> |
63 |
> The system drive throughput varies a lot, depending on other I/O. |
64 |
|
65 |
Those look ok to me, except that I would expect SATA-drives to be faster then |
66 |
PATA drives. |
67 |
|
68 |
> > You're running KDE4, guess you went for the default and use mysql for |
69 |
> > "app- office/akonadi-server". |
70 |
> > |
71 |
> > I switched to using "sqlite" for this due to issues getting it to work |
72 |
> > with mysql. I think this might help there? |
73 |
> |
74 |
> So I only have to set the sqlite use flag and remove the mysql use flag |
75 |
> for akonadi-server? I'm doing this now. And this also gives an example for |
76 |
> what is going on here: |
77 |
|
78 |
And unset mysql. |
79 |
There is one issue that needs to be resolved manually with getting it to work |
80 |
with sqlite. |
81 |
See: |
82 |
http://forums.gentoo.org/viewtopic-t-834883-view- |
83 |
next.html?sid=3ae77f5bfba5e006e8745eedb4b6cfc4 |
84 |
|
85 |
Here is the bit that will solve the problem: |
86 |
-- |
87 |
$ cd ~/.local/share/akonadi |
88 |
$ sqlite3 akonadi.db |
89 |
sqlite> INSERT INTO ResourceTable (name, isVirtual) VALUES |
90 |
('akonadi_search_resource', 1); |
91 |
sqlite> .exit |
92 |
-- |
93 |
|
94 |
> I have just logged into KDE. I did not log out since yesterday, and when |
95 |
> started a VM with vmplayer, the system swapped like crazy, I could not use |
96 |
> it for minutes. After this, the panel did not react any more, and the |
97 |
> desktop background did not redraw, so I logged out and in again. The VM |
98 |
> started fine now. Well, could be faster, but maybe it was okay. |
99 |
> Then I started answering your mail, and tried to reemerge akonadi-server, |
100 |
> but I had a type, so portage took a long search for akomadi-server. |
101 |
> meanwhile the dektop became quite unresponsive, load went high, and I made |
102 |
> a screenshot [*]. If you look at the top right, gkrellm shows this above |
103 |
> 'Proc'. The first increase at the left was after I started emerge, the 2nd |
104 |
> at the right was after I pressed the PrtSc key. |
105 |
|
106 |
VMWare allows virtual machines to use more memory then is actually available. |
107 |
Also, there are settings in VMWare (possibly enabled by default) that cause |
108 |
the memory to be duplicated onto disk. |
109 |
This can cause issues like you are seeing. |
110 |
|
111 |
> > > Performance does not feel too bad at first. But after a while, I |
112 |
> > > cannot even play videos during emerges. The playback stutters, |
113 |
> > > sometimes I have pauses for several seconds. As long as there is no |
114 |
> > > swap space occpied, it's not so bad I think. Maybe I have a probelm |
115 |
> > > with disk I/O, and things get much worse when swapping occurs. When |
116 |
> > > I look at iotop, I see various programs like chromium and various |
117 |
> > > KDE applications appear. I guess that's normal, but should not be |
118 |
> > > noticeable. Hey, there were times when I created a 2G tmpfs for |
119 |
> > > /var/tmp/portage, with only 3G on my 32bit system. BTW, I lowered my |
120 |
> > > swappiness to 10. This helps a little I think, because the swapping |
121 |
> > > occurs later, the system is more responsive. |
122 |
> > |
123 |
> > Do you also encrypt swap? |
124 |
> |
125 |
> Yes. |
126 |
> |
127 |
> > Disk I/O is, in my experience, a very common cause for "freeze-ups". |
128 |
> > Can you test with unencrypted disks to see if the issue occurs then as |
129 |
> > well? |
130 |
> |
131 |
> Yes, I can do this. It's some work, but I tried so much, why not this. I |
132 |
> have some free space, and already have written a backup script that |
133 |
> automatically creates LVM snapshots, decrypts them, and backs it up, so I |
134 |
> can do this from the running system. |
135 |
|
136 |
Ok, am interested to see if running unencrypted actually has benefits here. |
137 |
|
138 |
> > > And I have similar problems when copying data between some old PATA |
139 |
> > > drives. When I copy stuff and do a mkfs on another partition, mplayer |
140 |
> > > sometimes stutters and hangs for ten seconds. No joy. Working with |
141 |
> > > KDE sucks, switching dektops sometimes takes ages, and even now I am |
142 |
> > > typing faster than kmail can display the characters. That's with am |
143 |
> > > emerge of chromium running, with PORTAGE_NICENESS=10 and using |
144 |
> > > ionice -c 3. Load is around 8, but sometimes gets even higher. And |
145 |
> > > then, load suddenly drops back to lower values, as if somthing was |
146 |
> > > blocking. Some applications swapping, maybe. |
147 |
> > |
148 |
> > Very possibly, maybe an idea to check which applications are hogging |
149 |
> > the memory. If it is the swapping of the system, then this will be |
150 |
> > caused by the most memory-hungry processes. |
151 |
> > |
152 |
> > Can you post the result of: "ps axu"? |
153 |
> > This will give an indication which processes are running and using a |
154 |
> > lot of memory. |
155 |
> |
156 |
> First, here is free -m: |
157 |
> total used free shared buffers cached |
158 |
> Mem: 3452 3225 226 0 54 325 |
159 |
> -/+ buffers/cache: 2844 607 |
160 |
> Swap: 4094 935 3159 |
161 |
> |
162 |
> And here the output of top, sorted by memory. I think it is a similar |
163 |
> output to ps axu, but more condensed and better readable via mail. The |
164 |
> full ps aux output, sorted by memory, is in [2]. |
165 |
> |
166 |
<snipped top> |
167 |
> |
168 |
> X takes an awful lot, then comes java, which is running only for my |
169 |
> tvbrowser. And many many chrome processes. |
170 |
|
171 |
How many web browser windows do you have open? :) |
172 |
|
173 |
Also, do you have file indexing enabled? |
174 |
|
175 |
> > > Now I am out of ideas. I really hope someone here has one. I cannot |
176 |
> > > work with this system any more when emerges are going on. |
177 |
> > |
178 |
> > Had similar issues with a desktop machine myself, managed to kill some |
179 |
> > "features" that I wasn't using and this solved most of the problems. |
180 |
> |
181 |
> I hope I can say this soon, too. |
182 |
|
183 |
In my experience, X uses more memory when a lot of windows are open. |
184 |
And yours uses about 4 times as much as mine. |
185 |
But then again, I don't have much running at the moment. |
186 |
|
187 |
> > Lets see where checking for IO-speeds and memory-usage of your apps |
188 |
> > take us :) |
189 |
> |
190 |
> Thanks for your help! I appreciate this very much. |
191 |
|
192 |
I'll do my best :) |
193 |
|
194 |
-- |
195 |
Joost |