DNOTIFY support and some timing

Christian Esken c.esken at cityweb.de
Tue Mar 4 23:25:06 GMT 2003


Am Sonntag, 23. Februar 2003 22:56 schrieb Josef Weidendorfer:
> On Sunday 23 February 2003 15:07, Christian Esken wrote:
> > Hello,
> >
> > is there a good reason not to compile in DNOTIFY support by default?
> > The code in kio/kio/kdirwatch.cpp already checks the kernel version.
> > I agree, that there should be a possibility do --disable-dnotify ,
> > but default should be enabled.
>
> I agree.
>
> > For example SuSE8.1 (ships Kernel 2.4.19 and KDE3.0) has
> > not compiled KDE with "--enable-dnotify".
>
> Hmm. That's not our problem, though.
> Doesn't SuSE use FAM with DNOTIFY? This way, KDE programs should never need
> to do polling at all...
>
> > AFAIK KDE3.0 already had dnotify support?!?
> >
> >
> > Remark: I came across this, while working on a list of tips on how to
> > use KDE3 on slow computers. On "low end" computers like mine
> > (PIII - 450Mhz, 128MB Ram) doing polling has MAJOR impact on
> > overall KDE performance. Application startup and overall resposiveness
> > is much better with DNOTIFY. I blame this on the continuous task
> > switching from and to kded.
>
> You may be right. What's the sustained activity of kded in top?
>
> OTOH, DNOTIFY has drawbacks, too: If you write a big file, for each "write"
> syscall a DNOTIFY real-time signal is sent to each process watching the
> directory.
>
> Can you open konqueror in your HOME, and check the result of a
> "while(true) do echo >> $HOME/log; done" in top?

Yes I can.

Sorry for not answering not earlier, but I am in the progress of setting up
a new computer. Here's the results:


------------------------------------------------------------
New system: Athlon XP2220+ , SuSE8.1 with preinstalled KDE 3.0.3.

CPU states: 23.7% user, 76.2% system,  0.0% nice,  0.0% idle

  PID USER     PRI  NI  SIZE  RSS SHARE STAT %CPU %MEM   TIME COMMAND
20697 chris     25   0  1728 1728  1696 R    37.1  0.3   1:19 bash
 1183 chris    -51   0  5532 5524  4116 S     2.9  1.0   1:40 artsd
20703 root      15   0   972  972   756 R     0.1  0.1   0:00 top

Rest of the processes uses 0.0% CPU (No, I don't know why
37.1% + 2.9% + 0.1% = 100%). And I do not see any fam process,
probably I just "forgot" to install/setup/whatsover the fam subsystem.

But basically this means in plain SuSE8.1 there is no FAM in KDE.
------------------------------------------------------------




------------------------------------------------------------
Old System: PIII-450 , SuSE8.1, KDE from "curent" CVS, including 
DNOTIFY-Support

ATTENTION: /home is on NFS

CPU states: 12.5% user, 41.0% system,  0.0% nice, 46.4% idle

  PID USER     PRI  NI  SIZE  RSS SHARE STAT %CPU %MEM   TIME COMMAND
 1202 chris     25   0  1732 1732  1696 S    24.9  1.3   0:13 /bin/bash
 1194 chris     15   0 13404  12M 11336 S     1.3 10.3   0:05 kdeinit: konsole
 1246 chris     16   0   972  972   756 R     0.7  0.7   0:00 top
  737 root      15   0     0    0     0 SW    0.5  0.0   0:00 rpciod
  974 root      15   0 84736  18M  4048 S     0.3 14.9   0:11 /usr/X11R6/bin/X 
vt7 -auth /v
14856 chris     25   0  1732 1732  1696 R     0.1  1.3   0:00 /bin/bash
 1153 chris     15   0 13784  13M 11444 R     0.1 10.6   0:03 kimi

The rest of the processes use 0.0% CPU.

Don't be confused about "kimi", this is just my hand-tailored fast-starting 
"kicker"-variant (it is stripped down, so that it starts ~3 secs faster on my 
PIII-450 :-)

------------- 
I retried with opening konqy at /tmp and writing output to /tmp/log

CPU states: 20.7% user, 79.2% system,  0.0% nice,  0.0% idle

  PID USER     PRI  NI  SIZE  RSS SHARE STAT %CPU %MEM   TIME COMMAND
 1202 chris     25   0  1760 1760  1760 R    56.2  1.3   3:27 /bin/bash
 1194 chris     15   0 13424  12M 11336 R     1.7 10.3   0:20 kdeinit: konsole
  974 root      15   0 84936  18M  3940 R     1.3 15.1   0:30 /usr/X11R6/bin/X 
vt7 -auth /v
 1165 chris     15   0 22268  21M 17668 S     0.9 17.3   0:18 kdeinit: 
konqueror --silent
 1246 chris     15   0   976  976   756 R     0.9  0.7   0:08 top

Here the result is again: CPU is 0% idle
 

 ------------------------------------------------------------

But it shows that NFS based directories (which use slower polling, IIRC 4s)
work much better, taking <50% of CPU.
(Yes, measurments are done wiht top, but what else shall I use.)



Chris





More information about the kde-core-devel mailing list