RE: Why do threads take so long to wake up underlinux
How does this affect the rest of the performance of the machine, are there any downsides? -Original Message-From: Jim Hazen [mailto:[EMAIL PROTECTED]]Sent: February 18, 2002 8:46 PMTo: BlackdownSubject: Re: Why do threads take so long to wake up underlinuxOk, I've rebuild the a kernel with HZ 1000 (and bumped CLOCKS_PER_SEC to 1000 too). The output is now closer to what one would expect. Also if you always sleep for 10ms, you get a total time of 10 ms for nearly every run (some runs were 11-13ms, but most ~27 were 10). Hope this helps. I'm sure glad to know this little trick. total time = 0 for sleep(0) total time = 1 for sleep(1) total time = 3 for sleep(2) total time = 4 for sleep(3) total time = 5 for sleep(4) total time = 6 for sleep(5) total time = 6 for sleep(6) total time = 8 for sleep(7) total time = 9 for sleep(8) total time = 10 for sleep(9) total time = 11 for sleep(10) total time = 12 for sleep(11) total time = 13 for sleep(12) total time = 14 for sleep(13) total time = 14 for sleep(14) total time = 15 for sleep(15) total time = 16 for sleep(16) total time = 18 for sleep(17) total time = 19 for sleep(18) total time = 20 for sleep(19) total time = 21 for sleep(20) total time = 22 for sleep(21) total time = 23 for sleep(22) total time = 24 for sleep(23) total time = 25 for sleep(24) total time = 25 for sleep(25) total time = 27 for sleep(26) total time = 28 for sleep(27) total time = 29 for sleep(28) total time = 30 for sleep(29)
Re: Why do threads take so long to wake up underlinux
The downside for sure it that you now interrupt the cpu 1000 times per second. The overhead in processing the interrupt. ( context save, registers saved ). The services performed at a clock ( jiffy ) tick ( timeout services, scheduling services ), are now done more frequently. but with 1 gighz machine, 1/1000sec is ~1million instructions before an jiffy happens. So if your threads complete before the million, then u r in great shape. If they take longer, then that task may be scheduled out to some other task that is also ready to run. I am not sure if a Threaded task total quantum(s) are include in scheduling priority, or each thread has their own unique scheduling priority. /gat BTW rumor has it ( from the Dec Alpha folks ) that context switching is not very efficient on intel processors. > Martin, Stephen wrote: > > How does this affect the rest of the performance of the machine, are > there any downsides? > > -Original Message- > From: Jim Hazen [mailto:[EMAIL PROTECTED]] > Sent: February 18, 2002 8:46 PM > To: Blackdown > Subject: Re: Why do threads take so long to wake up > underlinux > > Ok, I've rebuild the a kernel with HZ 1000 (and bumped > CLOCKS_PER_SEC to 1000 too). > -- To UNSUBSCRIBE, email to [EMAIL PROTECTED] with a subject of "unsubscribe". Trouble? Contact [EMAIL PROTECTED]
Re: Why do threads take so long to wake up underlinux
That's a good point. However on my Dual 450 there seems to be no performance loss with these new settings. In fact things seem a bit more responsive. I'm not sure exactly why, but my guess would be extensive use of 'wait and notify' in various programs. Before there was a 10ms penalty if one wanted to use this mechanism, now there isn't (but with the risk of many more context switches). My experience seems to indicate that this penalty outweighs the savings of fewer switches. -Jim The downside for sure it that you now interrupt the cpu 1000 times per second. The overhead in processing the interrupt. ( context save, registers saved ). The services performed at a clock ( jiffy ) tick ( timeout services, scheduling services ), are now done more frequently. but with 1 gighz machine, 1/1000sec is ~1million instructions before an jiffy happens. So if your threads complete before the million, then u r in great shape. If they take longer, then that task may be scheduled out to some other task that is also ready to run. I am not sure if a Threaded task total quantum(s) are include in scheduling priority, or each thread has their own unique scheduling priority. /gat BTW rumor has it ( from the Dec Alpha folks ) that context switching is not very efficient on intel processors.
Re: Why do threads take so long to wake up underlinux
On Tue, Feb 19, 2002 at 09:56:14AM -0800, Jim Hazen wrote: > That's a good point. However on my Dual 450 there seems to be no > performance loss with these new settings. In fact things seem a bit > more responsive. I'm not sure exactly why, but my guess would be > extensive use of 'wait and notify' in various programs. Before there > was a 10ms penalty if one wanted to use this mechanism, now there isn't > (but with the risk of many more context switches). My experience seems > to indicate that this penalty outweighs the savings of fewer switches. It's actually more complicated than this :) If someone is interested I guess Linux kernel mailing list is a good source for such informations. Generally better responsiveness is caused by a higher chance that scheduler will sonner finish schedule interactive jobs - because time quantums are 10 times smaller thus especially CPU hangry applications like jave will see benefit of this as long computationaly intensive threads will be more frequently interrupted by small interactive tasks. The problem is that current linux scheduler is not optimal (2.5.X kernels now has O(1) scheduler and some realtime patches which should improve throughput of the system) But as I said most probably this is not discussion which should be on this list. -- .''`. Which fundamental human right do you want to give up today? : :' : Debian GNU/Linux maintainer - www.debian.{org,cz} `. `' Zdenek Kabelac kabi@{debian.org, users.sf.net, fi.muni.cz} `- When in doubt, just blame the Euro. :) -- To UNSUBSCRIBE, email to [EMAIL PROTECTED] with a subject of "unsubscribe". Trouble? Contact [EMAIL PROTECTED]
Re: Why do threads take so long to wake up underlinux
Why not have this discussion on this list? It seems to directly impact Java. The relationship between the Linux scheduler and Java is pretty important. IBM has produced some scheduler kernel mods to improve JVM performance. These are a bit more complicated than just cranking some params, but none the less should be talked about. Sure the nitty gritty of 2.5.x changes should probably be discussed elsewhere, but a more related discussion would be... How do the RT changes in 2.5.x improve JVM performance? What numbers are people seeing? With asynchronous multiplexed IO support in 1.4 how do these simple param tweaks effect performance? Are we seeing much better response times due to busy waiting on selectors? Are there other issues? If there are, what are they and how can we design Java code around (for) them? It seems to me that as people start to design more applications in Java, they will need to discuss issues such as these. With some of the NIO capabilities in 1.4, some people have suggested pure Java production databases, RT messaging systems, etc. I for one want to know that there is an issue with the Linux scheduler and how to fix it, if waiting 10ms to send my JMS message is just too long then the pros and cons of tweaking the kernel should be discussed. -Jim Generally better responsiveness is caused by a higher chance that scheduler will sonner finish schedule interactive jobs - because time quantums are 10 times smaller thus especially CPU hangry applications like jave will see benefit of this as long computationaly intensive threads will be more frequently interrupted by small interactive tasks. The problem is that current linux scheduler is not optimal (2.5.X kernels now has O(1) scheduler and some realtime patches which should improve throughput of the system) But as I said most probably this is not discussion which should be on this list. -- .''`. Which fundamental human right do you want to give up today? : :' : Debian GNU/Linux maintainer - www.debian.{org,cz} `. `' Zdenek Kabelac kabi@{debian.org, users.sf.net, fi.muni.cz} `- When in doubt, just blame the Euro. :)
RE: Why do threads take so long to wake up underlinux
All, I agree with jim. We need to share information about this as this have direct impact on java/linux combination as a Enterprise platform. This should be addressed in a broad spectrum than just changing a parameter in kernel, though I'm interested in the kernel tweak. Lets post this question to linux mailing list. Reg Ved -Original Message-From: Jim Hazen [mailto:[EMAIL PROTECTED]]Sent: Tuesday, February 19, 2002 11:49 AMTo: BlackdownSubject: Re: Why do threads take so long to wake up underlinuxWhy not have this discussion on this list? It seems to directly impact Java. The relationship between the Linux scheduler and Java is pretty important. IBM has produced some scheduler kernel mods to improve JVM performance. These are a bit more complicated than just cranking some params, but none the less should be talked about. Sure the nitty gritty of 2.5.x changes should probably be discussed elsewhere, but a more related discussion would be... How do the RT changes in 2.5.x improve JVM performance? What numbers are people seeing? With asynchronous multiplexed IO support in 1.4 how do these simple param tweaks effect performance? Are we seeing much better response times due to busy waiting on selectors? Are there other issues? If there are, what are they and how can we design Java code around (for) them? It seems to me that as people start to design more applications in Java, they will need to discuss issues such as these. With some of the NIO capabilities in 1.4, some people have suggested pure Java production databases, RT messaging systems, etc. I for one want to know that there is an issue with the Linux scheduler and how to fix it, if waiting 10ms to send my JMS message is just too long then the pros and cons of tweaking the kernel should be discussed. -Jim Generally better responsiveness is caused by a higher chance that scheduler will sonner finish schedule interactive jobs - because time quantums are 10 times smaller thus especially CPU hangry applications like jave will see benefit of this as long computationaly intensive threads will be more frequently interrupted by small interactive tasks. The problem is that current linux scheduler is not optimal (2.5.X kernels now has O(1) scheduler and some realtime patches which should improve throughput of the system) But as I said most probably this is not discussion which should be on this list. -- .''`. Which fundamental human right do you want to give up today? : :' : Debian GNU/Linux maintainer - www.debian.{org,cz} `. `' Zdenek Kabelac kabi@{debian.org, users.sf.net, fi.muni.cz} `- When in doubt, just blame the Euro. :)
Re: Why do threads take so long to wake up underlinux
Hello all, I need to build the Jdk 1.1.8 on a x86 linux box. Where can i get the diff's ?. I am looking for them at blackdown, and i am unable to locate them. Any pointers will be appreciated. Thanks in advance for your help. Regards - asit -- To UNSUBSCRIBE, email to [EMAIL PROTECTED] with a subject of "unsubscribe". Trouble? Contact [EMAIL PROTECTED]
Re: Why do threads take so long to wake up underlinux
On Tue, Feb 19, 2002 at 01:18:17PM -0800, Veda Narayanan wrote: > All, > I agree with jim. We need to share information about this as this have > direct impact on java/linux combination as a Enterprise platform. This > should be addressed in a broad spectrum than just changing a parameter in > kernel, though I'm interested in the kernel tweak. > > Lets post this question to linux mailing list. I assume it would good idea to go through the linux kernel list archive first. I believe it has been discused there for quite a few times. -- .''`. Which fundamental human right do you want to give up today? : :' : Debian GNU/Linux maintainer - www.debian.{org,cz} `. `' Zdenek Kabelac kabi@{debian.org, users.sf.net, fi.muni.cz} `- When in doubt, just blame the Euro. :) -- To UNSUBSCRIBE, email to [EMAIL PROTECTED] with a subject of "unsubscribe". Trouble? Contact [EMAIL PROTECTED]
Re: [Repost] Building the jdk1.1.8 on x86 linux ..
Sorry, bad subject on prev post. - Original Message - From: "asit" <[EMAIL PROTECTED]> To: "Blackdown" <[EMAIL PROTECTED]> Sent: Tuesday, February 19, 2002 1:31 PM Subject: Re: Why do threads take so long to wake up underlinux > Hello all, > > I need to build the Jdk 1.1.8 on a x86 linux box. Where can i get the diff's > ?. I am looking for them at blackdown, and i am unable to locate them. Any > pointers will be appreciated. > > Thanks in advance for your help. > > Regards > - asit > > > -- > To UNSUBSCRIBE, email to [EMAIL PROTECTED] > with a subject of "unsubscribe". Trouble? Contact [EMAIL PROTECTED] > -- To UNSUBSCRIBE, email to [EMAIL PROTECTED] with a subject of "unsubscribe". Trouble? Contact [EMAIL PROTECTED]
I'm newbee
I hope be expert to use Java like all of you. Can you give me to me a clue how to install the java in my linux box? I want to make it be a java server. Please what of java resource should i prepare? Thank you. BEGIN:VCARD VERSION:2.1 N:;[EMAIL PROTECTED] FN:[EMAIL PROTECTED] EMAIL;PREF;INTERNET:[EMAIL PROTECTED] REV:20020220T042117Z END:VCARD