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