Multiple Servers with multiple cores

107 views
Skip to first unread message

Greg d'Entremont

unread,
Feb 28, 2016, 8:58:18 PM2/28/16
to Jaamsim Users Discussion Group
Hi All,

I have real servers that have real cores, that run concurrent processes that I want to model. Each process gets queued and is given to a server where it uses either 3 or 4 cores of a given server (some processes need 3 cores, and others need 4 cores). I have 288 cores in my real network and 38 servers (a mix of 8 and 16 core servers).

For the model, I can create SimEntities, and I can assign the job type which could be used to determine how many cores will be used for the process.

Should my model use my real cores or my real servers as the JaamSim server objects? So my first question is "Do I build a model with 38 server objects or 288 server objects?" If it's the latter, I'm unclear as to how to setup a model where one SimEntity will grab either 3 or 4 server objects. I have read the Resource object definition and I'm wondering if that is the key.

Each process takes a different amount of time to run, so I use the server object's ServiceTime with Expressions from 'this.obj.xxxx' to compute the time required for each process.

Supposing that it is possible to build this model, will I need to construct the 38 servers or 288 cores, or is there a shortcut that I've missed in the documentation?

Thanks,

Greg

Harry King

unread,
Feb 29, 2016, 12:29:24 AM2/29/16
to Jaamsim Users Discussion Group
Greg,

Does it matter how the 288 cores are distributed among the 38 servers? The model I outline below assumes that only the total number of cores is important:
  • Model the 288 cores as a single Resource object and the individual processes as SimEntities.
  • Send the SimEntities to a Seize object to reserve the cores, then to an EntityDelay for the processing time, and finally to a Release object to make the cores available again.
  • Define attributes for your prototype SimEntity to carry the number of cores required and the processing time.
  • Use an Assign object to set the values for these attributes from an expression or a probability distribution.
  • Once the attributes are assigned, you can use expressions for the inputs to the NumberOfUnits keyword for the Seize and Release objects, and to the Duration keyword for the EntityDelay object.
After setting up and testing your model with an EntityGenerator to create your stream of processing tasks, it would be best to modify the model to recycle the SimEntities so that the model does not have to create new ones all the time. Creating and destroying entities is almost always the slowest part of a model. I expect that you will want to process hundreds of millions of entities.

Do you want to model a random stream of processing tasks with a given average rate, or do you want to choke feed your cores with an unlimited number of tasks?

Harry

Greg d'Entremont

unread,
Feb 29, 2016, 6:41:43 PM2/29/16
to Jaamsim Users Discussion Group
Hi Harry,

Thanks for the instructions.  I was able to create a model using your instructions that fits my needs.  I've attached it here, in case others are trying to do the same. 

I didn't implement the loop to recycle the SimEntity as you describe, since this is just a small part of a larger simulation.

Regards,

Greg
CPU_Cores_as_Resources.cfg

Harry King

unread,
Feb 29, 2016, 7:14:25 PM2/29/16
to Jaamsim Users Discussion Group
Greg,

Nice work -- you've figured out the basics of simulation and JaamSim very quickly.

I agree that there is no need to recycle your SimEntities. The model is fast enough without it.

One thing I wonder about is whether your service tasks should arrive randomly. Normally, if the tasks are independent random events, you would model it as a Poisson process, which implies a negative exponential distribution of inter-arrival times.

Harry

Greg d'Entremont

unread,
Feb 29, 2016, 7:43:51 PM2/29/16
to Jaamsim Users Discussion Group
I have stats on the incoming files ... they are received through an FTP process that also has limitations on concurrent transfers.  Transfers from various sources are independent, but each source does send multiple files in sequence ... I may need to read up in my old stats books.

Greg

Harry King

unread,
Feb 29, 2016, 7:52:19 PM2/29/16
to Jaamsim Users Discussion Group
Greg,

You may need to model the incoming files in more detail to get a realistic load pattern. For example, you could model each source separately as an EntityGenerator followed by a Server and Queue to represent the maximum processing rate for the FTP link.

The necessary scope and level of detail depends on what questions your model is intended to answer.

Harry
Reply all
Reply to author
Forward
0 new messages