Results 1 to 3 of 3
  1. #1
    KidAget is offline Member
    Join Date
    Feb 2012
    Posts
    9
    Rep Power
    0

    Default increasing or decreasing no of cores/processor in java code

    am trying to measure the performance of sequential java code and parallel one with the same functionality by varying the no. cores or processors.
    I just know how to get the no of cores in java code and I perfectly succeed using it in for the parallel one.
    But I just wander if I can check the performance of the sequential one by varying the no of cores or processors.
    Is there any way that can decrease or increase the no of cores assigned to the java program? I prefer if I can use some code to do so.

  2. #2
    DarrylBurke's Avatar
    DarrylBurke is offline Member
    Join Date
    Sep 2008
    Location
    Madgaon, Goa, India
    Posts
    11,242
    Rep Power
    19

    Default Re: increasing or decreasing no of cores/processor in java code

    AFAIK this can't be done from Java. But if you're on a Windows machine, you can set the number of cores you want java.exe to use from the Task Manager. (Right click -> set Affinity...)

    Moving this to 'Threads and Synchronization'

    db
    If you're forever cleaning cobwebs, it's time to get rid of the spiders.

  3. #3
    KidAget is offline Member
    Join Date
    Feb 2012
    Posts
    9
    Rep Power
    0

    Default Re: increasing or decreasing no of cores/processor in java code

    Ya from windows that is right but I was trying to run it in remote machine using ssh....I don't really know what option do I have for this

Similar Threads

  1. Threads and cores
    By aburnett397 in forum Threads and Synchronization
    Replies: 1
    Last Post: 09-07-2011, 03:36 AM
  2. Increasing/decreasing an int variable with boundrys
    By david522 in forum New To Java
    Replies: 5
    Last Post: 05-12-2011, 12:04 AM
  3. Increasing Java heap space
    By davetheant in forum New To Java
    Replies: 2
    Last Post: 02-03-2011, 02:24 AM
  4. Java Picture Processor: PGM files and Arrays
    By snow_mac in forum New To Java
    Replies: 0
    Last Post: 11-30-2010, 01:16 PM
  5. How to band threads with cup cores?
    By young in forum Threads and Synchronization
    Replies: 4
    Last Post: 04-06-2010, 01:39 PM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •