Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Create a CPU Proxy Component #5

Open
faustus123 opened this issue Oct 25, 2023 · 3 comments
Open

Create a CPU Proxy Component #5

faustus123 opened this issue Oct 25, 2023 · 3 comments

Comments

@faustus123
Copy link
Contributor

Create an ERSAP actor in C++ that simulates a CPU component.

The actor should be configurable such that it can:

  • exercise N cores with dummy calculations
  • read data from a socket (UDP, TCP, unix)
  • write fraction of data to a socket (UDP, TCP, unix)
  • configure the "burstiness" of the CPU usage and outputs
@faustus123 faustus123 added this to the M01 milestone Oct 25, 2023
@faustus123 faustus123 changed the title Create a CPU Simulation Actor Create a CPU Proxy Component Oct 25, 2023
@faustus123 faustus123 removed this from the M01 milestone Oct 25, 2023
@faustus123
Copy link
Contributor Author

This is getting a little ahead of ourselves. This is actually Milestone M15 which is scheduled for Y2Q1 in the proposal.

@cissieAB cissieAB assigned cissieAB and unassigned cissieAB Nov 15, 2024
@cissieAB
Copy link
Collaborator

cissieAB commented Nov 15, 2024

@faustus123 Please read the below and share what you think

If you do not need meaningful output, let's approximate it with matrix multiplication.
Think of Ax=y where x & y are vectors, x is the incoming data bandwidth (BW), y is the outgoing BW. Say x's dimension is 10000 (row#)x1(column#), if we want the output to be 200x1, we can generate a matrix of random numbers with a dimension of 200 x 10000(column#) thus you can control the output volume based on the input volume. We need this matrix to be large enough to make the CPU compute bound. So instead x&y are vectors, we make them matrices, e.g., x is of dimension 10000x65536 and y is of 200x65536. We can still use the row number of the matrix to mimic the incoming/outgoing BW.

If this matrix multiplication is too fast, we can add some loops, like Ax=y, A_{inverse}y=x, ..., Ax=y to obtain the desired speed. We can compute A_inverse ahead to save the time.

If you want this proxy running on ifarm, we need to do some benchmarking (reading from socket + matrix multiplication of several loops + sending via socket) to get the relationship of:

  • Execution time (y axis) vs output/input fraction (x axis): fix the input matrix dimension, adjust the output matrix dimension.
  • Execution time (y axis) vs inner loop number(x axis): fix the input and output matrix dimension, adjust the inner loop number.
    We expect a linear relationship for both of the above.

If the benchmarking result agree with our expectation, we can use the 1. input/output fraction 2. inner loop to construct our proxy.

@goodrich-rogue
Copy link
Collaborator

Interesting idea. We could pass some parms to the emulator so that a 10MB input event (e.g., EIC) approaches the 2GB mem process limit without exceeding it and another to scale the computational effort and another to control sleeping for latency or incurring it. How about a last one for the number of thread or cores?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants