Author Topic: cycles/sec  (Read 3977 times)

Offline jknilinux

  • Bot Destroyer
  • ***
  • Posts: 468
    • View Profile
cycles/sec
« on: November 23, 2009, 01:15:21 PM »
What's the most cycles/second anyone has ever achieved, with a decently large population/sim size? What hardware did you use?

Offline Numsgil

  • Administrator
  • Bot God
  • *****
  • Posts: 7742
    • View Profile
cycles/sec
« Reply #1 on: November 23, 2009, 01:39:49 PM »
I managed 1000 bots at 1 cycle/sec I think (maybe more like .6 cycles/sec)...  That was on my 2 Ghz P4.  The program is single threaded and single core speed increases have mostly stalled in the last 5 years or so, so I doubt anyone's managed anything much more than that.  Even if you're running Darwinbots on some sort of super computer, they're super parallel, not super serial.

Of course with a multi core machine you could run multiple instances and connect them with teleporters.
« Last Edit: November 23, 2009, 01:40:20 PM by Numsgil »

Offline jknilinux

  • Bot Destroyer
  • ***
  • Posts: 468
    • View Profile
cycles/sec
« Reply #2 on: December 19, 2009, 11:24:22 PM »
I don't have a multi-core machine, so this may be a simple question, but how do  you get one DB to run on on core and the other DB to run on the second? You can't just go to task manager and click "run off of processor 2" or something, can you?


*EDIT: By "DB", I mean darwinbots/other program
« Last Edit: December 20, 2009, 12:02:49 AM by jknilinux »

Offline Numsgil

  • Administrator
  • Bot God
  • *****
  • Posts: 7742
    • View Profile
cycles/sec
« Reply #3 on: December 20, 2009, 12:49:24 AM »
Operating systems will usually evenly split a single threaded process across multiple processors.  So for instance, if you have a dual core machine DB2 will use 50% of the first processor and 50% of the second.

Offline Testlund

  • Bot God
  • *****
  • Posts: 1574
    • View Profile
cycles/sec
« Reply #4 on: December 20, 2009, 10:55:42 AM »
Quote from: jknilinux
I don't have a multi-core machine, so this may be a simple question, but how do  you get one DB to run on on core and the other DB to run on the second? You can't just go to task manager and click "run off of processor 2" or something, can you?


*EDIT: By "DB", I mean darwinbots/other program

Yes, you can!    If you select the process tab and right-click on a process you can chose which core it should run on.

It's quite remarkable that there are many new games/programs not optimised for more than 1 core, now when even dual-cores are getting old and you have quad-cores!

Software makers are starting to lack behind. It used to be the other way around. I have a few old game titles that it took several years before there were hardware that could run them smoothly.

Software and hardware makers should talk to each other more often.
The internet is corrupt and controlled by criminally minded people.

Offline jknilinux

  • Bot Destroyer
  • ***
  • Posts: 468
    • View Profile
cycles/sec
« Reply #5 on: December 20, 2009, 02:14:48 PM »
Nums: Wait, if it splits a single-threaded process across 2 cores, isn't that pretty much automatic parallelization? I thought multiple cores won't increase the speed of a single-threaded process...

Testlund: Great! So, assuming I have a 4-core processor, would DB run faster if I run 1 big sim or if I run 4 small sims and assign 1 to each core, and connect them with teleports?

Offline Numsgil

  • Administrator
  • Bot God
  • *****
  • Posts: 7742
    • View Profile
cycles/sec
« Reply #6 on: December 20, 2009, 02:32:51 PM »
Quote from: Testlund
It's quite remarkable that there are many new games/programs not optimised for more than 1 core, now when even dual-cores are getting old and you have quad-cores!

Software makers are starting to lack behind. It used to be the other way around. I have a few old game titles that it took several years before there were hardware that could run them smoothly.

Software and hardware makers should talk to each other more often.

The problem is that for many decades home PCs were single core machines, and that single core was getting exponentially faster.  Hardware makers have since hit a brick wall in single core speed, so they've begun branching out "horizontally" with more cores.  But programming for more cores requires more than one thread, and programming with multiple threads is hard because you can't always predict what one thread is doing during another thread's execution.  They might be trying to write to the same place in memory, and then they'll stomp on each other and you'll get impossible-to-track-down bugs.  So you need to use special commands to make sure that doesn't happen.  But if you use too many of those commands your program will actually run slower.

Quote from: jknilinux
Nums: Wait, if it splits a single-threaded process across 2 cores, isn't that pretty much automatic parallelization? I thought multiple cores won't increase the speed of a single-threaded process...

It splits them across multiple cores to load balance.  But only one core is ever active at a single time.  So 50% of two cores is still only 1 core worth of processing power.

Quote
Testlund: Great! So, assuming I have a 4-core processor, would DB run faster if I run 1 big sim or if I run 4 small sims and assign 1 to each core, and connect them with teleports?

4 smaller sims.

Offline Testlund

  • Bot God
  • *****
  • Posts: 1574
    • View Profile
cycles/sec
« Reply #7 on: December 20, 2009, 07:42:14 PM »
Here's an example of DB running on two cores connected with teleporters.
« Last Edit: December 20, 2009, 07:53:32 PM by Testlund »
The internet is corrupt and controlled by criminally minded people.

Offline jknilinux

  • Bot Destroyer
  • ***
  • Posts: 468
    • View Profile
cycles/sec
« Reply #8 on: December 21, 2009, 01:19:22 AM »
Awesome! Thanks!