Repository navigation
Conversation
See microcks#1807 Signed-off-by: Apoorva Srinivas Appadoo <[email protected]>
Signed-off-by: Apoorva Srinivas Appadoo <[email protected]>
Signed-off-by: Apoorva Srinivas Appadoo <[email protected]>
Signed-off-by: Apoorva Srinivas Appadoo <[email protected]>
Signed-off-by: Apoorva Srinivas Appadoo <[email protected]>
|
Current branch The change does not seem to have the expected memory reduction The benchmark that was used: import http from 'k6/http';
import { check, sleep } from 'k6';
export let options = {
// total number of requests (one request per iteration)
iterations: 10000,
// concurrency: number of virtual users running in parallel.
// Increase for higher concurrency, decrease to throttle.
vus: 20,
// optional thresholds to fail the test if too many errors/slow responses
thresholds: {
'http_req_failed': ['rate<0.01'], // <1% errors allowed
'http_req_duration': ['p(95)<1000'] // 95% requests < 1000ms
}
};
// target URL
const URL = 'http://localhost:8080/rest/FIWARE-NGSI+v2/1.0/v2';
export default function () {
const res = http.get(URL, {
headers: {
'Accept': 'application/json',
}
});
check(res, {
'status is 2xx': (r) => r.status >= 200 && r.status < 300,
});
// small sleep to avoid hammering too tightly; remove or change if you want max throughput
sleep(0.1);
}I think there must be some java black magic somewhere |
|
Hello, I've built and run a micro-benchmark on my side and see the effects of not saving the So basically, the process is as follow:
Here are the results I get:
So there's a little time penalty in filtering the span (re-creating and copying to another object to do so) but there's a nice memory usage enhancement here.
|
Signed-off-by: Apoorva Srinivas Appadoo <[email protected]>
Signed-off-by: Apoorva Srinivas Appadoo <[email protected]>
Signed-off-by: Apoorva Srinivas Appadoo <[email protected]>
|
@lbroudoux i have removed the unnecessary synchronized blocks. I also removed the method queryTraceIdsBySpanAttributes as it wasn't used. Btw: What tool did you use to setup the test? For exemple to trigger the GC? |
IT was all hand-written in pure Java ;-) And it just calls |
|
@Apoorva64 For some reason I don't explain, I had some comments that were still in a pending review... I think you can remove even more synchronized blocks or switch back to a simple unitary command that makes them unnecessary. Can you check again please? BTW Sorry for the trouble. |
Signed-off-by: Apoorva Srinivas Appadoo <[email protected]>
Signed-off-by: Apoorva Srinivas Appadoo <[email protected]>
Signed-off-by: Apoorva Srinivas Appadoo <[email protected]>
Signed-off-by: Apoorva Srinivas Appadoo <[email protected]>
Signed-off-by: Apoorva Srinivas Appadoo <[email protected]>
|
@lbroudoux thanks a lots for taking your time to review and giving advice on this PR, I learned a lot about java and memory management xD |




See #1807
Description
This PR creates a DTO of the SpanData to omit the repetitive resource field
A Span now looks like
The size has been reduce by a factor of 2
Related issue(s)
#1807 and #1823