1 |
<meino.cramer <at> gmx.de> writes: |
2 |
|
3 |
|
4 |
> > (1) Then pursue quantifying with tools just what is causing the |
5 |
> > writes, strategies for minimization and monitoring as needed. |
6 |
|
7 |
> > So folks are going down path (1) with you, that is fine. |
8 |
|
9 |
Prong (1) includes all issues related to systemd. Probably embedded |
10 |
experience with systemd is rare, just guessing. Certainly I have none |
11 |
of that experience. So post to those iotop responses and remind |
12 |
folks you are using systemd on an embedded (gentoo) micro. |
13 |
|
14 |
root 563 1 0 15:37 ? 00:00:00 /lib/systemd/systemd-udevd --daemon |
15 |
|
16 |
|
17 |
|
18 |
|
19 |
> > (2) First minimize those write to your non-mechanical memory. |
20 |
|
21 |
> > I have dozens of tricks to minimize a gentoo system. But it is quite |
22 |
> > a bit of work, just so you know. It's not a do this and it great. It |
23 |
> > more like, try this, study the result and then alter the strategy. |
24 |
> > |
25 |
> > hth, |
26 |
> > James |
27 |
> > |
28 |
> |
29 |
> Hi, |
30 |
> |
31 |
> thank you very for all help I received regarding my question. |
32 |
> |
33 |
> The system is already down to a limit. The by default running |
34 |
> processes are: |
35 |
> |
36 |
> root 1 0 0 15:36 ? 00:00:00 init [3] |
37 |
> root 2 0 0 15:36 ? 00:00:00 [kthreadd] |
38 |
> root 3 2 0 15:36 ? 00:00:01 [ksoftirqd/0] |
39 |
> root 5 2 0 15:36 ? 00:00:00 [kworker/0:0H] |
40 |
> root 7 2 0 15:36 ? 00:00:00 [khelper] |
41 |
> root 8 2 0 15:36 ? 00:00:00 [kdevtmpfs] |
42 |
> root 160 2 0 15:36 ? 00:00:00 [writeback] |
43 |
> root 162 2 0 15:36 ? 00:00:00 [crypto] |
44 |
> root 164 2 0 15:36 ? 00:00:00 [bioset] |
45 |
> root 166 2 0 15:36 ? 00:00:00 [kblockd] |
46 |
> root 168 2 0 15:36 ? 00:00:00 [cfg80211] |
47 |
> root 169 2 0 15:36 ? 00:00:00 [kworker/0:1] |
48 |
> root 280 2 0 15:36 ? 00:00:00 [kswapd0] |
49 |
> root 296 2 0 15:36 ? 00:00:00 [fsnotify_mark] |
50 |
> root 372 2 0 15:36 ? 00:00:00 [ipv6_addrconf] |
51 |
> root 398 2 0 15:36 ? 00:00:00 [deferwq] |
52 |
> root 406 2 0 15:36 ? 00:00:12 [mmcqd/0] |
53 |
> root 412 2 0 15:36 ? 00:00:00 [kworker/0:2] |
54 |
> root 415 2 0 15:36 ? 00:00:00 [jbd2/mmcblk0p2-] |
55 |
> root 416 2 0 15:36 ? 00:00:00 [ext4-rsv-conver] |
56 |
> root 563 1 0 15:37 ? 00:00:00 /lib/systemd/systemd-udevd |
57 |
--daemon |
58 |
> root 952 1 0 15:37 ? 00:00:00 /usr/sbin/ifplugd --iface=usb0 |
59 |
> root 1380 1 0 15:37 ? 00:00:00 /usr/sbin/sshd |
60 |
> root 1399 1 0 15:37 tty1 00:00:00 /sbin/agetty 38400 tty1 linux |
61 |
> root 1400 1 0 15:37 tty2 00:00:00 /sbin/agetty 38400 tty2 linux |
62 |
> root 1401 1 0 15:37 tty3 00:00:00 /sbin/agetty 38400 tty3 linux |
63 |
> root 1402 1 0 15:37 tty4 00:00:00 /sbin/agetty 38400 tty4 linux |
64 |
> root 1403 1 0 15:37 tty5 00:00:00 /sbin/agetty 38400 tty5 linux |
65 |
> root 1404 1 0 15:37 tty6 00:00:00 /sbin/agetty 38400 tty6 linux |
66 |
> root 1405 1 0 15:37 ttyS0 00:00:00 /sbin/agetty -L 9600 ttyS0 |
67 |
vt100 |
68 |
> root 1406 1380 0 15:37 ? 00:00:02 sshd: root <at> pts/0 |
69 |
> root 1412 1406 0 15:37 pts/0 00:00:00 screen -R -d |
70 |
> root 1414 1412 0 15:37 ? 00:00:01 SCREEN -R -d |
71 |
> root 1415 1414 0 15:37 pts/1 00:00:05 -/bin/zsh |
72 |
> root 1434 2 0 15:38 ? 00:00:00 [kworker/0:1H] |
73 |
> root 1866 2 0 15:43 ? 00:00:00 [kworker/u2:0] |
74 |
> root 8556 2 0 16:49 ? 00:00:00 [kworker/u2:2] |
75 |
|
76 |
I'd research "kworker" |
77 |
|
78 |
http://askubuntu.com/questions/33640/kworker-what-is-it-and-why-is-it-hogging-so-much-cpu |
79 |
|
80 |
|
81 |
> The count of getty processes may be decreaseable...but the rest is ok, |
82 |
> I think. |
83 |
|
84 |
Those are static and just sitting incase you need a getty, so not a problem |
85 |
|
86 |
> When I do a ftop I get no process, which have an open file handle for |
87 |
> writes...sometimes screen writes to utmp but thats it. |
88 |
|
89 |
With a traditional (non systemd) approach, init scripts just fire |
90 |
up things at boot time and such. With systemd, I have no idea |
91 |
what's going on. It's a curious situation and maybe systemd has |
92 |
no issue in your excessive writes; pure speculation on my part. |
93 |
But an embedded system just sitting idle should use very little |
94 |
resource and sit quietly, in my experiences. |
95 |
|
96 |
|
97 |
> I suspect the swapfile I mounted as swapdevice for being guilty. |
98 |
> I will deactivate that and we will see then. |
99 |
|
100 |
good thing to examine. |
101 |
|
102 |
> When looking at /proc/diskstats: Will I see writes to FIFOs on the |
103 |
> disk as writes to the disk??? |
104 |
> If YES...it would explain it... |
105 |
|
106 |
|
107 |
Also good to look at. |
108 |
|
109 |
I usually use ext2 or one of the newer files systems, just for solid state |
110 |
memory. Here is a good link to get your research your fs options. |
111 |
|
112 |
http://free-electrons.com/blog/managing-flash-storage-with-linux/ |
113 |
|
114 |
Since you have (2) boards, have you considered installing the second one |
115 |
differently (different file system, no systemd etc etc to compare the |
116 |
2 results? If you can put different install-varients on different usb/sd/? |
117 |
media, then you can just power down and change them out while comparing |
118 |
resource utilization; just a thought, but something I do routinely. |
119 |
|
120 |
|
121 |
Also, you need to get a custom/stripped kernel building methodology |
122 |
establish so you can try to reduce the kernel size by eliminating things |
123 |
you do not use, testing scheduler options and a host of things. |
124 |
|
125 |
Your entire toolchain needs to be documented and keep track of what |
126 |
you change and the results of which test you run, when and such. |
127 |
|
128 |
Also, when compiling a kernel for a minimize system I find that using |
129 |
(CFLAGS="-Os"" yields faster and small executables) and is an excellent |
130 |
way to reduce resource loading on a minimized or embedded system. |
131 |
|
132 |
It's going to be a long journey, so keep meticulous records of what you |
133 |
try, the results and your conclusions for the best path forward. |
134 |
|
135 |
|
136 |
I'm out for a while. |
137 |
hth, |
138 |
James |