What period is P99 or P95 calculated over? - latency

When committing to/setting SLAs for a service, what time period should the SLA be calculated over?
For example, if I wanted all the services in my organization to commit to P95 latency, and one of the services commits to 500ms, what is the time window - because the P95 will be different based on the time window we look at.

Depends on in what cycles your latency fluctuates.
No daily / hourly peaks? A couple thousand samples do just fine.
Daily fluctuations (e.g. peak usage, concurrent backups etc.)? Then you will need to measure at least a whole day.
Weekly fluctuations (e.g. tied to work hours or evening activities etc.)? Then you will need to sample over a full week.
There is no strict requirement to sample everything over the chosen time window, but your time window better be representative or you may be held liable. Also make sure to be fair when you under-sample.
If you want to be on the safe side, take the worst-case-scenario in your load cycle, and within that scenario take a full minute worth of samples. That gives you a good estimate what will be held against you.

Related

Calculate the travel time from one point to the other on Anylogic

I am developing a logistics simulation in the factory by Anylogic. It's a pick up and delivery problem, where the AGVs need to pick up the parcel and deliver to the target location. All the AGVs are traveling following paths. The paths have different speed limits.
My goal is to reduce the time of traffic jam or waiting time for jobs to be picked up.
I have the leading time, job delivered time - job generated time.
But I from here, I want to identify the time of traffic jam or waiting time.
Is there a way to calculate the time from one spot to the other considering different speed limit of paths without waiting time or traffic jam? So that I could subtract this from leading time.
Let me know if I need to clarify something.
There is no build-in way to do this, you have to do it yourself. I have 3 ideas:
You compute this mathematically in the model yourself, i.e. write a function that computes the length of the total path and you have the ideal speed already, voila
You run a separate experiment and turn off all speed limits and other traffic: record the time in that ideal case and use that to compare
Similarly, you could do this in the same experiment during a warmup period: drive a fake transporter along the path and compute the perfect durations

Silk Performer - recalulating a specific time period

Is it possible to have Silk Performer recalculate results based on a specific time period from testing? What I am seeing is a spike at the end of my test. This needs investigated, but I would like to show that prior to that spike, the average time was good. Because of this spike I am getting a couple seconds higher - at least that is my assumption right now. I would like to show that before the spike the times are good.
Here is what I am seeing:
In the Silk Performance Explorer there is a resample option under results. You can set the specific time period for calculation there.

UPS for 750W to be up 6 hours

I have a Dell PowerEdge t630 server 750W power with PF 94%, I need a UPS that make my server Up for 6 hours at least
please advice the UPS capacity in KVA
thanks
The UPS power capacity will need to be at least 750VA. With a power factor that high, watts and VA are effectively the same. To supply 750W, you need a 750VA UPS.
Make sure the UPS can also supply 750 watts. Not every 750 VA UPS can supply 750 watts. Many UPSes can supply more reactive power than they can real power. You may wind up needing a UPS rated for 1,000 VA to get one that can supply 50 watts.
The amount of time the UPS needs to last has no effect on how much power it needs to be able to supply. A 100 watt light bulb needs 100 watts, whether it's on for a minute or a year.
I would caution you that there is no reliable way to compute a UPS's run time at a given load based on its stated efficiency or reserve time at other load values. Battery efficiency changes drastically with load. For example, halving the battery size will often cut the run time by much more than half. The only reliable way to predict UPS run time is to ask the manufacturer or look at at the manufacturer's graph of run time versus load.
Note that doubling the battery size will typically more than double the run time. This means that, for example, a UPS that claims to run for one hour at half load will almost certainly not run for half an hour at full load, it will usually run for much less time than that.
For such a long run time, look for a UPS that can be expanded with additional battery modules. The manufacturer should provide a chart that will tell you how long each module will last, and that will let you figure out how many modules you will need. Be aware that adding more battery modules often increases the charge time.

What's the name of algorithm to decide best collect frequency in facebook games?

So in many facebook games there are various buildings with different collect frequency and the number of collection you can make depends on the length and gap of periods of free time you have in a day.
Thinking about how to find the maximum occurrence of different frequency reminds me of words like knapsack and scheduling, but I forgot what's really the name of the algorithm about this or whether this is as difficult as those problems.
So, what's the name I am looking for?
Thanks.
(Test: Is it possible to bump a question in SO?)
Sounds like weighted interval scheduling.
A list of tasks is given as a set of time intervals; for instance, one task might run from 2:00 to 5:00 and another task might run from 6:00 to 8:00. Posed as an optimization problem, the goal is to maximize the number of executed tasks without overlapping the tasks. A request corresponds to an interval of time. We say that a subset of requests is compatible if no two of them overlap in time and our goal is to accept as large a compatible subset as possible. A compatible set of maximum size is called optimal.

Controlling events in a hybrid Modelica model

I am confused by the hybrid modelling paradigm in Modelica. On one hand, events are useful, on the other hand, they are to be avoided. Let me explain my case:
I have a large model consisting of multiple buildings in a neighborhood that is simulated over 1 year. Initially, the model ran very slow. Adding noEvent() around as many if-conditions as possible drastically improved the speed.
As the development continued, the control of the model got more complicated, and I have again many events, sometimes at very short intervals. To give an idea:
Number of (model) time events : 28170
Number of (U) time events : 0
Number of state events : 22572
Number of step events : 0
These events blow up the output (for correct post-processing I need the variables at events) and slows the simulation. And moreover, I have the feeling that some of the noEvent(if...) lead to unexpected behavior.
I wonder if it would be a solution to force my events at certain time steps and prohibit them in between these time steps? Ideally, I would like to trigger these 'forced events' based on certain conditions. For example: during the day they should be every 15 minutes, at high solar radiation at every minute, during nights I don't want events at all.
Is this a good idea to do? I guess this will be faster as many of the state events will become time events? How can this be done with Modelica 3.2 (in Dymola)?
Thanks on beforehand for all answers.
Roel
A few comments.
First, if you have a simulation with lots of events (relative to the total duration of the simulation), the first thing I would encourage you to do is use a lower order integrator. The point here is that higher-order integrators normally allow you to take longer time steps. But if those steps are constantly truncated by events, they just end up being really expensive.
Second, you could try fixed-step integrators. Depending on the tool, they may implement this kind of "pool events and fire them all at once" kind of approach in the context of fixed-time step integrators. But the specification doesn't really say anything on how tools should deal with events that occur between fixed time steps.
Third, another way to approach this would be to "pool" your events yourself. The simplest way I could imagine doing this would be to take all the statements that currently generate events and wrap them in a "when sample(...,...) then" statement. This way, you could make sure that the events were only triggered at specific intervals. This would be more portable then the fixed time step approach. I think this is what you were actually proposing in your question but it is important to point out that it should not be based on time steps (the model has no concept of a time step) but rather on a model specified sampling interval (which will, in practice, be completely independent of time steps).
As you point out, using "sample(...,...)" will turn these into time events and, yes, this should be faster.