Forum: Ruby-core Regression of Benchmark.realtime

Eabad423977cfc6873b8f5df62b848a6?d=identicon&s=25 unknown (Guest)
on 2014-09-01 08:22
(Received via mailing list)
Issue #10188 has been updated by Hiroshi SHIBATA.


Eric Wong wrote:
> shibata.hiroshi@gmail.com wrote:
>  > I investigate this on Amazon Linux 2014.3
>
>  Is this shared machine/VM?  What kernel config/version?

It's VM(AWS)

> $ uname -a
> Linux chkbuild001.hsbt.org 3.10.40-50.136.amzn1.x86_64 #1 SMP Tue May 13
21:35:08 UTC 2014 x86_64 x86_64 x86_64 GNU/Linux

>
>  Kernel config may be in /proc/config.* , otherwise distros may put
>  kernel config in /boot/config*
>
>  I'm mainly interested in *_HZ and preempt options.


```
[hsbt@chkbuild001 ~]$ cat /boot/config-3.10.53-56.140.amzn1.x86_64 |
grep HZ
CONFIG_NO_HZ_COMMON=y
# CONFIG_HZ_PERIODIC is not set
CONFIG_NO_HZ_IDLE=y
# CONFIG_NO_HZ_FULL is not set
CONFIG_NO_HZ=y
# CONFIG_RCU_FAST_NO_HZ is not set
# CONFIG_HZ_100 is not set
CONFIG_HZ_250=y
# CONFIG_HZ_300 is not set
# CONFIG_HZ_1000 is not set
CONFIG_HZ=250
```

>  I think the test case is too fragile.  We should increase delta+sleep or
>  remove test.  Based on comments on thread_pthread.c, 0.1s might be a
>  lower bound on portable timing granularity.
>
>  I think this can fail on your system even with the lib/benchmark.rb
>  optimization in r47260 reverted.

nobu added workaround to this issue. I think this regression is only
available on
virtual environment.

PS. we discussed this issue using Japanese:

https://twitter.com/kosaki55tea/status/505593070336081920

----------------------------------------
Bug #10188: Regression of Benchmark.realtime
https://bugs.ruby-lang.org/issues/10188#change-48597

* Author: Hiroshi SHIBATA
* Status: Open
* Priority: Normal
* Assignee: Eric Wong
* Category:
* Target version: current: 2.2.0
* ruby -v: ruby 2.2.0dev (2014-08-22 trunk 47254) [x86_64-darwin14]
* Backport: 2.0.0: UNKNOWN, 2.1: UNKNOWN
----------------------------------------
After r47260, rubyci is sometimes failed. It seems to relate
https://bugs.ruby-lang.org/issues/10165 .

 *
http://chkbuild001.hsbt.org/chkbuild/ruby-trunk/lo...
 *
http://fb64b.rubyci.org/~chkbuild/ruby-trunk/log/2...

I investigate this on Amazon Linux 2014.3

https://gist.github.com/hsbt/2647af71d60121034c1c

In this results, ```Benchmark.realtime { sleep 0.001 }``` returns 0.01
every 10 times.

> Eric Wong

How about do you think this fail?
This topic is locked and can not be replied to.