Linux - SoftwareThis forum is for Software issues.
Having a problem installing a new program? Want to know which application is best for the job? Post your question in this forum.
Notices
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
If you have any problems with the registration process or your account login, please contact us. If you need to reset your password, click here.
Having a problem logging in? Please visit this page to clear all LQ-related cookies.
Get a virtual cloud desktop with the Linux distro that you want in less than five minutes with Shells! With over 10 pre-installed distros to choose from, the worry-free installation life is here! Whether you are a digital nomad or just looking for flexibility, Shells can put your Linux machine on the device that you want to use.
Exclusive for LQ members, get up to 45% off per month. Click here for more info.
I run a java program i called it craft.jar the ram it uses is good but it times its cup usage will spike and ill have issues, i have ubunto 10 opendjdk6 64 bit everything and 6 2.00Ghz Xeon cores. the ave load on all cores is 2% but when i get heavey with my java program use only to on the cores will jump to 90-100% usage and the outheres will stay at 2%.
Qusetion is how do i force the program to run on 5 of the 6 cores to lessen issues with spiking? i use this to start my java program
Code:
#!/bin/bash
cd "${0%/*}"; java -Xincgc -Xmx2G -jar craft.jar
I run a java program i called it craft.jar the ram it uses is good but it times its cup usage will spike and ill have issues, i have ubunto 10 opendjdk6 64 bit everything and 6 2.00Ghz Xeon cores. the ave load on all cores is 2% but when i get heavey with my java program use only to on the cores will jump to 90-100% usage and the outheres will stay at 2%.
Qusetion is how do i force the program to run on 5 of the 6 cores to lessen issues with spiking? i use this to start my java program
Code:
#!/bin/bash
cd "${0%/*}"; java -Xincgc -Xmx2G -jar craft.jar
To use multiple cores, the Java program should be multi-threaded in itself; you can't spread the load if it's just running a sequence of instructions one after the other.
Assuming you can't reprogram the code to use a more parallel algorithm, one thing you can do is change how the garbage collector works, so at least Java's garbage collector is using a different CPU to the main program. You could try using this:
[Mod edit: unnecessary quotation deleted]
—Robert J Lee
so i under stand that -XX:+UseParallelGC will make the programs garbage collector use a diffrent core form the main program? is that right?
is there a way i can sneek -Xshare:auto in there?
Last edited by archtoad6; 03-23-2011 at 11:07 AM.
Reason: Delete long unnecessary quotation
Bumping is against policy, useless, & clutters the thread. -- Please stop doing that.
While it isn't against the rules, quoting the entire preceding post is usually unnecessary, also clutters the thread, & may may be counterproductive because it hides your reply. -- That may be why you felt the need to bump. Now that I have removed it (the quotation), maybe the increased visibility will help get you an answer.
Bumping is against policy, useless, & clutters the thread. -- Please stop doing that.
While it isn't against the rules, quoting the entire preceding post is usually unnecessary, also clutters the thread, & may may be counterproductive because it hides your reply. -- That may be why you felt the need to bump. Now that I have removed it (the quotation), maybe the increased visibility will help get you an answer.
i am very sorry for that i was un aware of that policy
woodzy, ...
While it isn't against the rules, quoting the entire preceding post is usually unnecessary, also clutters the thread, & may may be counterproductive because it hides your reply. -- That may be why you felt the need to bump. Now that I have removed it (the quotation), maybe the increased visibility will help get you an answer.
You did it again, I wonder if you are aware of the 2 "Post Reply" buttons in each thread? Both are on the left side & not in any post. The top one is just above the 1st post, & the bottom one is just below the last post. There also is a "Quick Reply" area only a little further down. Please use one of those unless replying with a quotation is really necessary.
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.