Gentoo Archives: gentoo-performance

From: Alex Schuster <wonko@×××××××××.org>
To: gentoo-performance@l.g.o
Subject: Re: [gentoo-performance] Horrible performance
Date: Thu, 26 Aug 2010 16:05:51
Message-Id: 201008261748.44920.wonko@wonkology.org
In Reply to: Re: [gentoo-performance] Horrible performance by Joost Roeleveld
1 Joost Roeleveld writes:
2
3 > On Wednesday 25 August 2010 21:38:10 Alex Schuster wrote:
4
5 > > And I just moved my PORTAGE_TMPDIR to an unencrypted partition.
6 > > Can LVM create noticeable overhead? I also resized my logical volumes
7 > > a couple of times, could this lead to some LVM fragmentation?
8 >
9 > Theoretically, LVM will create an additional overhead.
10 > But I am extensibly using LVM on all my machines and haven't noticed
11 > any significant performance drops.
12
13 That's also what I heard.
14
15 > LVM-fragmentation is a definite possibility.
16 > To defragment it, have a look at the following:
17 >
18 > http://bisqwit.iki.fi/source/lvm2defrag.html
19
20 Cool!
21
22 > http://www.linuxquestions.org/questions/linux-software-2/how-do-i-lvm2-
23 > defrag- or-move-based-on-logical-volumes-689335/
24 >
25 > I played with the first one on an older machine once and it does work
26 > quite nicely.
27
28 Any idea how to check how bad the fragmentation actually is?
29
30 BTW:
31 wonko@weird ~ $ mount | wc -l
32 48
33
34 I use LVM for about everything now, it makes things so much easier. First,
35 I had two volume groups on my system drive, one for the system, placed at
36 the front where the drive is supposed to be faster, and one for data. But
37 I don't do this any more, it cuts down flexibility, and is probably not
38 worth the effort.
39
40 > > > However, how is the write and read performance on those disks?
41 > >
42 > > Here's the output of hdparm -t for all drives, 4 times.
43 > >
44 > > /dev/sda: (SATA system drive)
45 > >
46 > > Timing buffered disk reads: 118 MB in 3.08 seconds = 38.37 MB/sec
47 > > Timing buffered disk reads: 194 MB in 3.11 seconds = 62.47 MB/sec
48 > > Timing buffered disk reads: 322 MB in 3.01 seconds = 106.82 MB/sec
49 > > Timing buffered disk reads: 244 MB in 3.00 seconds = 81.21 MB/sec
50 > >
51 > > /dev/sdb: (PATA master)
52 > >
53 > > Timing buffered disk reads: 114 MB in 3.02 seconds = 37.70 MB/sec
54 > > Timing buffered disk reads: 114 MB in 3.00 seconds = 37.97 MB/sec
55 > > Timing buffered disk reads: 116 MB in 3.05 seconds = 38.06 MB/sec
56 > > Timing buffered disk reads: 116 MB in 3.05 seconds = 38.07 MB/sec
57 > >
58 > > /dev/sdc: (PATA slave)
59 > >
60 > > Timing buffered disk reads: 164 MB in 3.03 seconds = 54.21 MB/sec
61 > > Timing buffered disk reads: 166 MB in 3.02 seconds = 55.04 MB/sec
62 > > Timing buffered disk reads: 166 MB in 3.01 seconds = 55.10 MB/sec
63 > > Timing buffered disk reads: 158 MB in 3.01 seconds = 52.41 MB/sec
64 > >
65 > > /dev/sdd: (SATA backup drive)
66 > >
67 > > Timing buffered disk reads: 314 MB in 3.00 seconds = 104.55 MB/sec
68 > > Timing buffered disk reads: 312 MB in 3.01 seconds = 103.67 MB/sec
69 > > Timing buffered disk reads: 308 MB in 3.01 seconds = 102.34 MB/sec
70 > > Timing buffered disk reads: 314 MB in 3.00 seconds = 104.60 MB/sec
71 > >
72 > > The system drive throughput varies a lot, depending on other I/O.
73 >
74 > Those look ok to me, except that I would expect SATA-drives to be
75 > faster then PATA drives.
76
77 Well, they are, except for the sometimes busy system drive. And by now I
78 get similar results as for the 2nd SATA drive, throughput is between 90
79 and 110 MB/sec.
80
81
82 > > > You're running KDE4, guess you went for the default and use mysql
83 > > > for "app- office/akonadi-server".
84 > > >
85 > > > I switched to using "sqlite" for this due to issues getting it to
86 > > > work with mysql. I think this might help there?
87 > >
88 > > So I only have to set the sqlite use flag and remove the mysql use
89 > > flag for akonadi-server? I'm doing this now. And this also gives an
90 > > example for what is going on here:
91 > And unset mysql.
92 > There is one issue that needs to be resolved manually with getting it
93 > to work with sqlite.
94 > See:
95 > http://forums.gentoo.org/viewtopic-t-834883-view-
96 > next.html?sid=3ae77f5bfba5e006e8745eedb4b6cfc4
97 >
98 > Here is the bit that will solve the problem:
99 > --
100 > $ cd ~/.local/share/akonadi
101 > $ sqlite3 akonadi.db
102 > sqlite> INSERT INTO ResourceTable (name, isVirtual) VALUES
103 > ('akonadi_search_resource', 1);
104 > sqlite> .exit
105
106 I did nothing about this by now, but I probabyl will soon. Thanks for the
107 tip!
108 I also had trouble with akonadi in the past, and it still gives
109 warnings/errors at every startup, but at least it seems to work now.
110
111
112 > > > Disk I/O is, in my experience, a very common cause for
113 > > > "freeze-ups". Can you test with unencrypted disks to see if the
114 > > > issue occurs then as well?
115 > >
116 > > Yes, I can do this. It's some work, but I tried so much, why not
117 > > this. I have some free space, and already have written a backup
118 > > script that automatically creates LVM snapshots, decrypts them, and
119 > > backs it up, so I can do this from the running system.
120 >
121 > Ok, am interested to see if running unencrypted actually has benefits
122 > here.
123
124 Me too, but as things are quite faster now already, the priority for this
125 task is much lower than it was yesterday :)
126
127
128 > > > Can you post the result of: "ps axu"?
129 > > > This will give an indication which processes are running and using
130 > > > a lot of memory.
131 > >
132 > > First, here is free -m:
133 > > total used free shared buffers
134 > > cached
135 > >
136 > > Mem: 3452 3225 226 0 54
137 > > 325 -/+ buffers/cache: 2844 607
138 > > Swap: 4094 935 3159
139 > >
140 > > And here the output of top, sorted by memory. I think it is a similar
141 > > output to ps axu, but more condensed and better readable via mail.
142 > > The full ps aux output, sorted by memory, is in [2].
143 >
144 > <snipped top>
145 >
146 > > X takes an awful lot, then comes java, which is running only for my
147 > > tvbrowser. And many many chrome processes.
148 >
149 > How many web browser windows do you have open? :)
150
151 wonko@weird ~ $ ps ax | grep chromium-browser | wc -l
152 42
153
154 Well, that's tabs, not windows. Chromium uses one process for each tab.
155 I'm not sure if I really want to use Chromium, I started using it because
156 of a nasty konqueror bug that made KDE freeze occasionally, but it seems
157 to be fixed now.
158
159 > Also, do you have file indexing enabled?
160
161 Do you mean Strigi/Nepomuk? I just turned it on again today. It never
162 worked, but crashed. In the last days I investigated this further and
163 filed two bugs about this, and they were already fixed. I'm running the
164 git version now, and so far it seems to work fine, but my home directory
165 is not fully indexed yet. And there were also issues with my music folder,
166 let's see if indexing this will still make strigi crash.
167 I should have done this before - I am waiting over a year now for a fixed
168 version, but apparently few people if any have those crashes, so I had to
169 report them myself.
170 At the moment it's indexing, but so far system load is not very high.
171 That's much better than a year ago when I used it the last time.
172
173
174 > > > > Now I am out of ideas. I really hope someone here has one. I
175 > > > > cannot work with this system any more when emerges are going on.
176 > > >
177 > > > Had similar issues with a desktop machine myself, managed to kill
178 > > > some "features" that I wasn't using and this solved most of the
179 > > > 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 I like to have many things open. With enough memory it's no problem.
188 Unless you are using ati-drivers, that is.
189
190 Wonko

Replies

Subject Author
Re: [gentoo-performance] Horrible performance "J. Roeleveld" <joost@××××××××.org>