Re: Massive performance loss from OS::sleep hack

2007-09-19 Thread Kris Kennaway
Kurt Miller wrote: On Tuesday 18 September 2007 03:17:14 pm Kris Kennaway wrote: Kurt Miller wrote: David Xu confirmed for me that pthread_yield() does give some time to lower priority threads on 7.0 using thr. Attached and inline are two patches for the 1.5 port that is how I suggest the issue

Re: Massive performance loss from OS::sleep hack

2007-09-18 Thread Kurt Miller
On Tuesday 18 September 2007 03:17:14 pm Kris Kennaway wrote: > Kurt Miller wrote: > > David Xu confirmed for me that pthread_yield() does give some > > time to lower priority threads on 7.0 using thr. Attached and inline > > are two patches for the 1.5 port that is how I suggest the issue be > > a

Re: Massive performance loss from OS::sleep hack

2007-09-18 Thread Kris Kennaway
Kurt Miller wrote: David Xu confirmed for me that pthread_yield() does give some time to lower priority threads on 7.0 using thr. Attached and inline are two patches for the 1.5 port that is how I suggest the issue be addressed. For 7.0 and up default UseThreadPriorities to true and always use p

Re: Massive performance loss from OS::sleep hack

2007-09-18 Thread Daniel Eischen
On Tue, 18 Sep 2007, Kurt Miller wrote: Daniel Eischen wrote: I would just totally ignore setting thread priorities unless the UseThreadPriority knob is set. The kernel scheduler (for libthr) doesn't seem to care what a thread's priority is anyways unless it is in the real-time class. That wa

Re: Massive performance loss from OS::sleep hack

2007-09-18 Thread Kurt Miller
Daniel Eischen wrote: > On Tue, 18 Sep 2007, Kurt Miller wrote: > >> Hi Daniel, >> >> Daniel Eischen wrote: >>> On Tue, 18 Sep 2007, Kurt Miller wrote: >>> David Xu confirmed for me that pthread_yield() does give some time to lower priority threads on 7.0 using thr. Attached and inline >

Re: Massive performance loss from OS::sleep hack

2007-09-18 Thread Daniel Eischen
On Tue, 18 Sep 2007, Kurt Miller wrote: Hi Daniel, Daniel Eischen wrote: On Tue, 18 Sep 2007, Kurt Miller wrote: David Xu confirmed for me that pthread_yield() does give some time to lower priority threads on 7.0 using thr. Attached and inline are two patches for the 1.5 port that is how I s

Re: Massive performance loss from OS::sleep hack

2007-09-18 Thread Kurt Miller
Hi Daniel, Daniel Eischen wrote: > On Tue, 18 Sep 2007, Kurt Miller wrote: > >> David Xu confirmed for me that pthread_yield() does give some >> time to lower priority threads on 7.0 using thr. Attached and inline >> are two patches for the 1.5 port that is how I suggest the issue be >> addressed

Re: Massive performance loss from OS::sleep hack

2007-09-18 Thread Daniel Eischen
On Tue, 18 Sep 2007, Kurt Miller wrote: David Xu confirmed for me that pthread_yield() does give some time to lower priority threads on 7.0 using thr. Attached and inline are two patches for the 1.5 port that is how I suggest the issue be addressed. I don't think you should rely on pthread_yie

Re: Massive performance loss from OS::sleep hack

2007-09-18 Thread Kurt Miller
David Xu confirmed for me that pthread_yield() does give some time to lower priority threads on 7.0 using thr. Attached and inline are two patches for the 1.5 port that is how I suggest the issue be addressed. For 7.0 and up default UseThreadPriorities to true and always use pthread_yield(). For <

Re: Massive performance loss from OS::sleep hack

2007-09-16 Thread David Xu
Kris Kennaway wrote: Hi, I have been running the volano java benchmark (http://www.volano.com/benchmarks.html) on an 8-core i386 system, and out of the box jdk15 on FreeBSD performs extremely poorly. The system is more than 90% idle, and profiling shows that the ~800 threads in the benchmar

Re: Massive performance loss from OS::sleep hack

2007-09-16 Thread Kurt Miller
Kip Macy wrote: > Yes, if we could hack the jvm to work around this without calling > sleep that would be better yet. However, making java work well is more > important than keeping the interface clean. One possible alternative is to not honor thread priorities in the jdk by default. In hotspot/sr

Re: Massive performance loss from OS::sleep hack

2007-09-16 Thread Alfred Perlstein
* Daniel Eischen <[EMAIL PROTECTED]> [070916 08:46] wrote: > On Sat, 15 Sep 2007, Kip Macy wrote: > > >Or more likely they'll continue to maintain a sched_yield that isn't > >posix compliant. We may just want to add some sort of interface so the > >jvm can tell the kernel that sched_yield should b

Re: Massive performance loss from OS::sleep hack

2007-09-16 Thread Kip Macy
On 9/16/07, Daniel Eischen <[EMAIL PROTECTED]> wrote: > On Sat, 15 Sep 2007, Kip Macy wrote: > > > Or more likely they'll continue to maintain a sched_yield that isn't > > posix compliant. We may just want to add some sort of interface so the > > jvm can tell the kernel that sched_yield should be n

Re: Massive performance loss from OS::sleep hack

2007-09-16 Thread Kurt Miller
On Saturday 15 September 2007 10:50:50 pm Kurt Miller wrote: > The following are programs I wrote when I isolated the problem. > If the c program runs ok on 7.0 for both single cpu and mp then > remove the os_sleep() and try the java program. If that works too > then you're clear to make the os_sle

Re: Massive performance loss from OS::sleep hack

2007-09-16 Thread Kurt Miller
On Saturday 15 September 2007 01:50:13 pm Kris Kennaway wrote: > Hi, > > I have been running the volano java benchmark > (http://www.volano.com/benchmarks.html) on an 8-core i386 system, and > out of the box jdk15 on FreeBSD performs extremely poorly. The system > is more than 90% idle, and profil

Re: Massive performance loss from OS::sleep hack

2007-09-16 Thread Daniel Eischen
On Sat, 15 Sep 2007, Kip Macy wrote: Or more likely they'll continue to maintain a sched_yield that isn't posix compliant. We may just want to add some sort of interface so the jvm can tell the kernel that sched_yield should be non-compliant for the current process. I don't think that is a goo

Re: Massive performance loss from OS::sleep hack

2007-09-16 Thread Kris Kennaway
Kurt Miller wrote: On Saturday 15 September 2007 10:50:50 pm Kurt Miller wrote: The following are programs I wrote when I isolated the problem. If the c program runs ok on 7.0 for both single cpu and mp then remove the os_sleep() and try the java program. If that works too then you're clear to m

Re: Massive performance loss from OS::sleep hack

2007-09-15 Thread Kip Macy
Or more likely they'll continue to maintain a sched_yield that isn't posix compliant. We may just want to add some sort of interface so the jvm can tell the kernel that sched_yield should be non-compliant for the current process. On 9/15/07, Daniel Eischen <[EMAIL PROTECTED]> wrote: > On Sat, 15

Re: Massive performance loss from OS::sleep hack

2007-09-15 Thread Daniel Eischen
On Sat, 15 Sep 2007, Kurt Miller wrote: Hello Kris, I recall why I added the os_sleep() call. While working on the certification testing one of the JCK tests was deadlocking. The test itself was faulty in that it created a high priority thread in a tight yield loop. Since pthread_yield() on a s

Re: Massive performance loss from OS::sleep hack

2007-09-15 Thread Daniel Eischen
On Sat, 15 Sep 2007, Kris Kennaway wrote: Hi, I have been running the volano java benchmark (http://www.volano.com/benchmarks.html) on an 8-core i386 system, and out of the box jdk15 on FreeBSD performs extremely poorly. The system is more than 90% idle, and profiling shows that the ~800 th

Re: Massive performance loss from OS::sleep hack

2007-09-15 Thread Kris Kennaway
Daniel Eischen wrote: When I removed this hack (i.e. revert to pthread_yield()) I got an immediate 7-fold performance increase, which brings FreeBSD performance on par with Solaris. What is the reason why this code is necessary? Does FreeBSD's sched_yield() really have different semantics t

Massive performance loss from OS::sleep hack

2007-09-15 Thread Kris Kennaway
Hi, I have been running the volano java benchmark (http://www.volano.com/benchmarks.html) on an 8-core i386 system, and out of the box jdk15 on FreeBSD performs extremely poorly. The system is more than 90% idle, and profiling shows that the ~800 threads in the benchmark are spending most of