summaryrefslogtreecommitdiff
path: root/open_issues/time.mdwn
blob: cc3951c30bb04a0c392cb752b54fa309b5a100be (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
[[!meta copyright="Copyright © 2009, 2011, 2013 Free Software Foundation,
Inc."]]

[[!meta license="""[[!toggle id="license" text="GFDL 1.2+"]][[!toggleable
id="license" text="Permission is granted to copy, distribute and/or modify this
document under the terms of the GNU Free Documentation License, Version 1.2 or
any later version published by the Free Software Foundation; with no Invariant
Sections, no Front-Cover Texts, and no Back-Cover Texts.  A copy of the license
is included in the section entitled [[GNU Free Documentation
License|/fdl]]."]]"""]]

[[!tag open_issue_porting]]

Neither the `time` executable from the GNU time package work completely
correctly, nor does the GNU Bash built-in one.

    tschwinge@flubber:~ $ \time sleep 2
    0.00user 0.00system 9:38:00elapsed 0%CPU (0avgtext+0avgdata 0maxresident)k
    0inputs+0outputs (0major+0minor)pagefaults 0swaps
    tschwinge@flubber:~ $ \time sleep 4
    0.00user 0.00system 18:50:25elapsed 0%CPU (0avgtext+0avgdata 0maxresident)k
    0inputs+0outputs (0major+0minor)pagefaults 0swaps
    tschwinge@flubber:~ $ \time sleep 6
    0.00user 0.00system 28:00:53elapsed 0%CPU (0avgtext+0avgdata 0maxresident)k
    0inputs+0outputs (0major+0minor)pagefaults 0swaps
    tschwinge@flubber:~ $ time sleep 2
    
    real    0m2.093s
    user    0m0.000s
    sys     0m0.011s
    tschwinge@flubber:~ $ time sleep 4
    
    real    0m4.083s
    user    0m0.000s
    sys     0m0.010s
    tschwinge@flubber:~ $ time sleep 6
    
    real    0m6.164s
    user    0m0.000s
    sys     0m0.010s

GNU time's *elapsed* value is off by some factor.

    $ \time factor 1111111111111111111
    1111111111111111111: 1111111111111111111
    0.00user 0.00system 52:39:24elapsed 0%CPU (0avgtext+0avgdata 0maxresident)k
    0inputs+0outputs (0major+0minor)pagefaults 0swaps
    $ time factor 1111111111111111111
    1111111111111111111: 1111111111111111111
    
    real    0m11.424s
    user    0m0.000s
    sys     0m0.010s

As above; also here all the running time should be attriuted to *user* time.
This is probably a [[!taglink open_issue_gnumach]].


# 2011-09-02

Might want to revisit this, and take Xen [[!tag open_issue_xen]] into account
-- I believe flubber has already been Xenified at that time.


## IRC, freenode, #hurd, 2011-09-02

While testing some [[performance/IPC_virtual_copy]] performance issues:

    <tschwinge> And I can confirm that with dd if=/dev/zero of=/dev/null bs=4k
      running, a parallel sleep 10 takes about 20 s (on strauss).


# IRC, OFTC, #debian-hurd, 2013-03-30

    <clopez>  /usr/bin/time seems broken on hurd. It reports weird things.  Ex:
    <clopez> # /usr/bin/time sleep 1
    <clopez> 0.00user 0.00system 4:37:46elapsed 0%CPU (0avgtext+0avgdata
      0maxresident)k
    <clopez> 0inputs+0outputs (0major+0minor)pagefaults 0swaps
    <pinotree> o_O
    <pinotree> indeed, let's see what that time does
    <pinotree> seems like only the elapsed time, %E
    <clopez> not only the time, but also the other variables (pagefaults, cpu
      used, etc) are wrong. For example compare the output of
    <clopez>  /usr/bin/time openssl speed ecdhp521
    <clopez> on linux and hurd
    <pinotree> most probably they are not implemented yet
    <pinotree> they are all 0
    <clopez> yes
    <clopez> should i report a bug to pkg time?
    <pinotree> not sure
    <pinotree> at least, there's this difference between eg amd64 and hurd-i386
      in configure's output:
    <pinotree> -checking for wait3 that fills in rusage... yes
    <pinotree> +checking for wait3 that fills in rusage... no
    <clopez> found this:
      https://www.gnu.org/software/hurd/open_issues/time.html
    <pinotree> seems related, yes
    <pinotree> clopez: apparently all the ways to get the HZ define, either
      directly or with CLOCKS_PER_SEC or CLK_TCK, so it gets defined as HZ
    <pinotree> ... as 60, i mean (instead of 1000000)
    <pinotree> $ ./time sleep 1
    <pinotree> 0.00user 0.00system 0:01.01elapsed 0PU (0avgtext+0avgdata
      0maxresident)k
    <pinotree> :)
    <clopez> what it was?
    <pinotree> i added the check for time.h, and included in the no-wait3 case
      in resuse.c
    <pinotree> (omg, the last release of gnu time was in 1997)
    <clopez> lol
    <pinotree> hm not yet fixed
    <pinotree> oh minor typo
    <pinotree> clopez: http://paste.debian.net/246004/
    <pinotree> i will update the wiki page (on the hurd site) and send the
      patch tomorrow
    <clopez> nice
    <pinotree> yw, thanks again
    <clopez> i dropped the patch on debian/patches of pkg time.. rebuilt it
      both on linux and hurd
    <clopez> and works as expected in both cases
    <clopez> i think you should forward the patch to the mantainer of pkg time
    <pinotree> is there anyone maintaining gnu time?
    <clopez> http://packages.qa.debian.org/t/time.html
    <clopez> Maintainers for time are Bob Proulx <bob@proulx.com>.
    <pinotree> that's the debian maintainer, yes, which is what i implied
      earlier with "send the patch"
    <clopez> i guess that filling a bug against time with this patch attached
      should be enough
    <pinotree> yeah
    <clopez> wow... not only you fixed the elapsed time but also the other
      variables :)
    <clopez>  /usr/bin/time openssl speed ecdhp521
    <clopez> now it reports cpu used and pagefaults :)
    <pinotree> does it?
    <clopez> 10.00user 0.01system 0:10.11elapsed 99%CPU (0avgtext+0avgdata
      0maxresident)k
    <clopez> 0inputs+0outputs (67major+656minor)pagefaults 0swaps


# IRC, OFTC, #debian-hurd, 2013-03-31

    <pinotree> clopez: #704283