Giter VIP home page Giter VIP logo

Comments (4)

GoogleCodeExporter avatar GoogleCodeExporter commented on August 29, 2024
It seems that there's no built-in cross platform way to set cpu affinity within 
python.

There are a couple of options currently implemented:

1) Increase the "load_throttle_sleep_interval" in global_config.json. If you do 
this make sure to increase "cycle_time and min_cycle_time" to ensure a decent 
population size. This will decrease the cpu load across all cores... which 
isn't too helpful if you're trying to reserve a couple of cores for other tasks.

2) gal.py can be manually edited down to only two clients - 'gts.py all y' & 
'gts.py all n'. However, in this configuration the BOBs and high scoring genes 
will not be used to generate new populations. Instead they will only be 
retested to update the scores. With this method users can manually set the cpu 
affinity in task manager to limit processing to certain cpu cores. 

To improve the second option I'll need to add another command line option 
'score_only' to gts.py and change the behavior of 'gts.py all y' to generate 
and test new populations.

Original comment by [email protected] on 25 Feb 2012 at 2:39

  • Changed state: Accepted

from ga-bitbot.

GoogleCodeExporter avatar GoogleCodeExporter commented on August 29, 2024
Thank you for the clarification. If it helps anyone, my knowledge of 
accomplishing the limiting using the tools that come with various OSes is as 
follows:

Under the *nix OSes, I tend to use two 'prefixes':
- the 'nice' utility which sets the process priority during the process startup
- the 'taskset' utility which restricts the process to only one [selected] core
...so I would run it as:
taskset -p 01 nice -19 pypy gal.py
...It seems the process priority when set to the parent process [gal.py] also 
propagets to it's children [for example, gts.py instances]

For windows machines it seems that process priority can be set during the 
startup by prefixing the command with:
start /low /b

Original comment by [email protected] on 25 Feb 2012 at 7:07

from ga-bitbot.

GoogleCodeExporter avatar GoogleCodeExporter commented on August 29, 2024
Another option is to use VMware player with a linux image. VMware player allows 
you to set a hard limit on the number of cpu cores to use.

Original comment by [email protected] on 29 Feb 2012 at 1:34

from ga-bitbot.

GoogleCodeExporter avatar GoogleCodeExporter commented on August 29, 2024
Going any further into this topic the solutions become very OS specific. 
Users can modify the gal.py script to add any required command line switches to 
meet their needs. 

Original comment by [email protected] on 6 Mar 2013 at 2:03

  • Changed state: WontFix
  • Added labels: Type-Enhancement
  • Removed labels: Type-Defect

from ga-bitbot.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.