mSvcBench / muBench

Other
29 stars 19 forks source link

Alibaba Example #20

Closed hassanSattariNia closed 9 hours ago

hassanSattariNia commented 1 month ago

Thank you for providing examples of Alibaba traces, but using Alibaba traces, I read a document on how to create deployment and applications, but I can't create applications with these files . For instance, when creating /par/app5 with service_mesh.json In this file, I see a structure like this: { "s0": { "external_services": [ { "seq_len": 10000, "services": [] } ] }, "s1": { "external_services": [ { "seq_len": 10000, "services": [] } ] }, ... }

I attempted to create workmode.json using service_mesh.json, but the resulting workmode.json does not define any external services for s0. This is expected, as service_mesh.json also does not define any external services.

I noticed that the traces for /app5 indicate the presence of external services. How can I create a workmode.json for app5 that accurately reflects the conditions found in the Alibaba traces for app5? While I could manually review all the traces and edit service_mesh.json, I don't think this is the best approach. Could you assist me in creating a workmode.json that precisely matches the app5 conditions in the Alibaba traces?

andreadetti commented 1 month ago

For trace driven benchmarks as Alibaba ones, the workmodel file cannot contain any external services, since the external services to be called are defined by the trace sent via HTTP post to s0. See the section of the manual on "trace-driven benchmarks".

hassanSattariNia commented 3 weeks ago

So, if I want to create an application with different branches and varying call depths, I cannot use the Alibaba examples?

I need to develop an application that supports multiple branches and allows me to see different requests in each branch.

Which example can help me achieve this, and how can I create an application with these requirements?

Please provide detailed instructions and descriptions if possible.

I am looking to create an application with multiple requests that simulate a real-world application. Therefore, I reviewed the Alibaba traces.

andreadetti commented 3 weeks ago

You definitively can. Please consider the following instructions.

Alibaba traces

In the examples directory, there is the Alibaba folder with a collection of applications obtained from processing the real Alibaba traces, in the same directory we can find the Matlab scripts used for the processing of the traces. To use these applications, first, we need to unzip the trace-mbench.zip file inside the examples/Alibaba directory. As a result of this operation, we obtain the trace-mbench directory within two folders: par and seq.

muBench/
├─ examples/
│  ├─ Alibaba/
│  │  ├─ Matlab/
│  │  ├─ traces-mbench/
│  │  │  ├─ par/
│  │  │  │  ├─ app2/
│  │  │  │  ├─ app3/
│  │  │  │  ├─ ...
│  │  │  ├─ seq/
│  │  │  │  ├─ app2/
│  │  │  │  ├─ app3/
│  │  │  │  ├─ ...

Each folder contains 29 applications, each one with a set of traces. The difference between the traces in the two folders is that traces in the par directory execute downstream requests in parallel, whereas the traces in the seq directory execute requests in sequence. In each app folder, you will find a service_mesh.json file that represents the app's service graph and its traces. The service_mesh.json does not contain any external services, because the sequence of external services to be called is specified by the trace sent via HTTP POST.

To benchmark an app generated from Alibaba trace, the following steps must be performed:

hassanSattariNia commented 3 weeks ago

I followed the steps to create a working model based on the service_mesh.json file. Then, I sent requests based on individual trace files located in the provided folder. I observed that the requests worked well. Here is a picture of sending requests for app5/trace0001.json, trace0002.json, trace0003.json, and trace0004.json. request_trace_base

However, when I try to create a workload on the application using Runner.py provided in this application, I notice that all the requests are the same and do not exit from s0, as shown in the picture below.

request_when_runner

To simulate a real application, how can I create a realistic workload? Should I write a custom script that sends requests to different traces like this:

send random of these requests: curl -X POST -H "Content-Type: application/json" http://:31113/s0 -d @examples/Alibaba/traces-mbench/seq/app18/trace00001.json

Or should I use JMeter or other benchmarking tools?

Please provide instructions on how to create a more realistic workload and effectively simulate a real application workload.

andreadetti commented 3 weeks ago

Hi, Runner is not designed for trace-based benchmarks. It simply sends HTTP GET to S0, rather than HTTP POST with the trace. For trace benchmarking, you need to use another tool. For example, we used Apache Jmeter. I don't remember how :-(. Anyway, the idea was to randomly choose a trace from the possible ones for each request and use HTTP post.