Gentoo Archives: gentoo-user

From: meino.cramer@×××.de
To: gentoo-user@l.g.o
Subject: Re: [gentoo-user] Re: How to find out to what file(...) writes goes on a idle system...
Date: Sat, 06 Dec 2014 19:04:41
Message-Id: 20141206190431.GD4624@solfire
In Reply to: [gentoo-user] Re: How to find out to what file(...) writes goes on a idle system... by James
1 James <wireless@×××××××××××.com> [14-12-06 18:16]:
2 > <meino.cramer <at> gmx.de> writes:
3 >
4 >
5 > > on different systems I see the write stats (/proc/dikstats) to
6 > > physical existing disks steadily increasing.
7 > > Looking at the output of lsof I cannot find any file suspicous
8 > > for receiving those writes.
9 >
10 > Ok so in my experiences you need a (2) pronged approach.
11 >
12 > (1) Then pursue quantifying with tools just what is causing the
13 > writes, strategies for minimization and monitoring as needed.
14 >
15 > So folks are going down path (1) with you, that is fine.
16 >
17 > (2) First minimize those write to your non-mechanical memory.
18 >
19 > Path (2)
20 > on any and all minimized gentoo or embedded gentoo systems,
21 > I start out with USE="-*" to keep things minimum. Yea that tweaks the
22 > devs now, but minimal system are just that, minimized, imho, so that
23 > is a firm standard I always operation on. Set the minimum
24 > number of global flags and the thinest profile that will work for
25 > your system. Every flag invokes more code and hence more processes,
26 > more files, more writing to media.
27 >
28 > Also, all log files should be written off the embeded system via
29 > NFS or other similar mechanisms.
30 >
31 > If you want further help, put up a document where folks can spend
32 > $20 and get a similar board up and running embedded gentoo. Then
33 > they can see exactly what you see have and you can work as a team, or not,
34 > your call.
35 >
36 > I have dozens of tricks to minimize a gentoo system. But it is quite
37 > a bit of work, just so you know. It's not a do this and it great. It
38 > more like, try this, study the result and then alter the strategy.
39 >
40 > hth,
41 > James
42 >
43
44 Hi,
45
46 thank you very for all help I received regarding my question.
47
48 The system is already down to a limit. The by default running
49 processes are:
50
51
52 root 1 0 0 15:36 ? 00:00:00 init [3]
53 root 2 0 0 15:36 ? 00:00:00 [kthreadd]
54 root 3 2 0 15:36 ? 00:00:01 [ksoftirqd/0]
55 root 5 2 0 15:36 ? 00:00:00 [kworker/0:0H]
56 root 7 2 0 15:36 ? 00:00:00 [khelper]
57 root 8 2 0 15:36 ? 00:00:00 [kdevtmpfs]
58 root 160 2 0 15:36 ? 00:00:00 [writeback]
59 root 162 2 0 15:36 ? 00:00:00 [crypto]
60 root 164 2 0 15:36 ? 00:00:00 [bioset]
61 root 166 2 0 15:36 ? 00:00:00 [kblockd]
62 root 168 2 0 15:36 ? 00:00:00 [cfg80211]
63 root 169 2 0 15:36 ? 00:00:00 [kworker/0:1]
64 root 280 2 0 15:36 ? 00:00:00 [kswapd0]
65 root 296 2 0 15:36 ? 00:00:00 [fsnotify_mark]
66 root 372 2 0 15:36 ? 00:00:00 [ipv6_addrconf]
67 root 398 2 0 15:36 ? 00:00:00 [deferwq]
68 root 406 2 0 15:36 ? 00:00:12 [mmcqd/0]
69 root 412 2 0 15:36 ? 00:00:00 [kworker/0:2]
70 root 415 2 0 15:36 ? 00:00:00 [jbd2/mmcblk0p2-]
71 root 416 2 0 15:36 ? 00:00:00 [ext4-rsv-conver]
72 root 563 1 0 15:37 ? 00:00:00 /lib/systemd/systemd-udevd --daemon
73 root 952 1 0 15:37 ? 00:00:00 /usr/sbin/ifplugd --iface=usb0
74 root 1380 1 0 15:37 ? 00:00:00 /usr/sbin/sshd
75 root 1399 1 0 15:37 tty1 00:00:00 /sbin/agetty 38400 tty1 linux
76 root 1400 1 0 15:37 tty2 00:00:00 /sbin/agetty 38400 tty2 linux
77 root 1401 1 0 15:37 tty3 00:00:00 /sbin/agetty 38400 tty3 linux
78 root 1402 1 0 15:37 tty4 00:00:00 /sbin/agetty 38400 tty4 linux
79 root 1403 1 0 15:37 tty5 00:00:00 /sbin/agetty 38400 tty5 linux
80 root 1404 1 0 15:37 tty6 00:00:00 /sbin/agetty 38400 tty6 linux
81 root 1405 1 0 15:37 ttyS0 00:00:00 /sbin/agetty -L 9600 ttyS0 vt100
82 root 1406 1380 0 15:37 ? 00:00:02 sshd: root@pts/0
83 root 1412 1406 0 15:37 pts/0 00:00:00 screen -R -d
84 root 1414 1412 0 15:37 ? 00:00:01 SCREEN -R -d
85 root 1415 1414 0 15:37 pts/1 00:00:05 -/bin/zsh
86 root 1434 2 0 15:38 ? 00:00:00 [kworker/0:1H]
87 root 1866 2 0 15:43 ? 00:00:00 [kworker/u2:0]
88 root 8556 2 0 16:49 ? 00:00:00 [kworker/u2:2]
89
90 The count of getty processes may be decreaseable...but the rest is ok,
91 I think.
92
93 When I do a ftop I get no process, which have an open file handle for
94 writes...sometimes screen writes to utmp but thats it.
95
96 I suspect the swapfile I mounted as swapdevice for being guilty.
97 I will deactivate that and we will see then.
98
99 When looking at /proc/diskstats: Will I see writes to FIFOs on the
100 disk as writes to the disk???
101 If YES...it would explain it...
102
103 Best regards,
104 Meino

Replies

Subject Author
[gentoo-user] Re: How to find out to what file(...) writes goes on a idle system... James <wireless@×××××××××××.com>