diff --git a/src/main/java/ru/vk/itmo/test/alenkovayulya/ServerImpl.java b/src/main/java/ru/vk/itmo/test/alenkovayulya/ServerImpl.java index 048feb37e..4e554a7ca 100644 --- a/src/main/java/ru/vk/itmo/test/alenkovayulya/ServerImpl.java +++ b/src/main/java/ru/vk/itmo/test/alenkovayulya/ServerImpl.java @@ -3,37 +3,50 @@ import one.nio.http.HttpServer; import one.nio.http.HttpServerConfig; import one.nio.http.HttpSession; -import one.nio.http.Param; -import one.nio.http.Path; import one.nio.http.Request; -import one.nio.http.RequestMethod; import one.nio.http.Response; import one.nio.server.AcceptorConfig; import org.slf4j.Logger; import org.slf4j.LoggerFactory; import ru.vk.itmo.ServiceConfig; -import ru.vk.itmo.dao.BaseEntry; -import ru.vk.itmo.dao.Dao; -import ru.vk.itmo.dao.Entry; +import ru.vk.itmo.test.alenkovayulya.dao.BaseEntryWithTimestamp; +import ru.vk.itmo.test.alenkovayulya.dao.Dao; +import ru.vk.itmo.test.alenkovayulya.dao.EntryWithTimestamp; import java.io.IOException; import java.lang.foreign.MemorySegment; import java.lang.foreign.ValueLayout; import java.nio.charset.StandardCharsets; +import java.util.Arrays; +import java.util.List; +import java.util.Set; +import java.util.concurrent.CompletableFuture; +import java.util.concurrent.CopyOnWriteArrayList; import java.util.concurrent.ExecutorService; +import java.util.concurrent.RejectedExecutionException; +import java.util.concurrent.atomic.AtomicBoolean; +import java.util.concurrent.atomic.AtomicInteger; +import static ru.vk.itmo.test.alenkovayulya.ShardRouter.REDIRECT_HEADER; +import static ru.vk.itmo.test.alenkovayulya.ShardRouter.TIMESTAMP_HEADER; import static ru.vk.itmo.test.alenkovayulya.ShardRouter.redirectRequest; public class ServerImpl extends HttpServer { - public static final String PATH = "/v0/entity"; + private static final Logger LOGGER = LoggerFactory.getLogger(ServerImpl.class); - private final Dao> referenceDao; + private final Dao> referenceDao; private final ExecutorService executorService; private final String url; private final ShardSelector shardSelector; + private static final Set ALLOWED_METHODS = Set.of( + Request.METHOD_GET, + Request.METHOD_PUT, + Request.METHOD_DELETE + ); + private static final int[] AVAILABLE_GOOD_RESPONSE_CODES = new int[] {200, 201, 202, 404}; public ServerImpl(ServiceConfig serviceConfig, - Dao> referenceDao, + Dao> referenceDao, ExecutorService executorService, ShardSelector shardSelector) throws IOException { super(createServerConfig(serviceConfig)); this.referenceDao = referenceDao; @@ -54,87 +67,251 @@ private static HttpServerConfig createServerConfig(ServiceConfig serviceConfig) } @Override - public void handleRequest(Request request, HttpSession session) { - executorService.execute(() -> { - try { - super.handleRequest(request, session); - } catch (Exception e) { + public void handleRequest(Request request, HttpSession session) throws IOException { + if (!ALLOWED_METHODS.contains(request.getMethod())) { + sendEmptyResponse(Response.METHOD_NOT_ALLOWED, session); + return; + } + + String id = request.getParameter("id="); + if (isEmptyId(id)) { + sendEmptyResponse(Response.BAD_REQUEST, session); + return; + } + + if (request.getHeader(REDIRECT_HEADER) != null) { + long timestamp = resolveTimestamp(request.getHeader(TIMESTAMP_HEADER)); + Response response = handleInternalRequest(request, id, timestamp); + session.sendResponse(response); + } else { + handleAsLeader(request, session, id); + } + } + + private void handleAsLeader(Request request, HttpSession session, String id) { + String ackS = request.getParameter("ack="); + String fromS = request.getParameter("from="); + + int from = isEmptyId(fromS) + ? shardSelector.getClusterSize() : Integer.parseInt(fromS); + int ack = isEmptyId(ackS) + ? quorum(from) : Integer.parseInt(ackS); + + if (ack == 0 || ack > from) { + sendEmptyResponse(Response.BAD_REQUEST, session); + } + + try { + executorService.execute(() -> { try { - session.sendError(Response.BAD_REQUEST, e.getMessage()); - } catch (IOException ex) { - LOGGER.info("Exception during sending the response: ", ex); - session.close(); + collectResponses(request, session, id, from, ack); + } catch (Exception e) { + try { + session.sendError(Response.BAD_REQUEST, e.getMessage()); + } catch (IOException ex) { + LOGGER.info("Exception during sending the response: ", ex); + session.close(); + } } - } - }); + }); + } catch (RejectedExecutionException e) { + LOGGER.error("Request rejected by policy", e); + sendEmptyResponse(Response.SERVICE_UNAVAILABLE, session); + } } - @Path(PATH) - @RequestMethod(Request.METHOD_GET) - public Response getEntity(@Param(value = "id", required = true) String id) { - if (isEmptyId(id)) { - return new Response(Response.BAD_REQUEST, Response.EMPTY); + private void collectResponses(Request request, + HttpSession session, + String id, + int from, + int ack + ) { + List> asyncResponses = new CopyOnWriteArrayList<>(); + long timestamp = System.currentTimeMillis(); + int firstOwnerShardIndex = shardSelector.getOwnerShardIndex(id); + + for (int i = 0; i < from; i++) { + CompletableFuture asyncResponse; + int shardIndex = (firstOwnerShardIndex + i) % shardSelector.getClusterSize(); + + if (isRedirectNeeded(shardIndex)) { + asyncResponse = handleRedirect(request, timestamp, shardIndex); + } else { + asyncResponse = handleInternalRequestAsync(request, id, timestamp); } - String ownerShardUrl = shardSelector.getOwnerShardUrl(id); - if (isRedirectNeeded(ownerShardUrl)) { - return redirectRequest("GET", id, ownerShardUrl, new byte[0]); + + asyncResponses.add(asyncResponse); + + } + + handleAsyncResponses(session, ack, from, request, asyncResponses); + + } + + private void handleAsyncResponses( + HttpSession session, int ack, int from, Request request, + List> completableFutureResponses + ) { + List validResponses = new CopyOnWriteArrayList<>(); + AtomicBoolean isEnoughValidResponses = new AtomicBoolean(); + AtomicInteger allResponsesCounter = new AtomicInteger(); + + for (CompletableFuture completableFuture : completableFutureResponses) { + completableFuture.whenCompleteAsync((response, throwable) -> { + if (isEnoughValidResponses.get()) { + return; + } + allResponsesCounter.incrementAndGet(); + + if (throwable != null) { + response = new Response(Response.INTERNAL_ERROR); + } + + if (isValidResponse(response)) { + validResponses.add(response); + } + + sendResponseIfEnoughReplicasResponsesNumber(request, + isEnoughValidResponses, + session, + validResponses, + ack); + + if (allResponsesCounter.get() == from && validResponses.size() < ack) { + sendEmptyResponse("504 Not Enough Replicas", session); + } + }, executorService).exceptionally((th) -> new Response(Response.INTERNAL_ERROR)); + } + } + + private void sendResponseIfEnoughReplicasResponsesNumber( + Request request, + AtomicBoolean isEnoughValidResponses, + HttpSession session, + List responses, + int ack + ) { + try { + if (responses.size() >= ack) { + isEnoughValidResponses.set(true); + if (request.getMethod() == Request.METHOD_GET) { + session.sendResponse(getResponseWithMaxTimestamp(responses)); + } else { + session.sendResponse(responses.getFirst()); + } } - Entry value = referenceDao.get( - convertBytesToMemorySegment(id.getBytes(StandardCharsets.UTF_8))); + } catch (IOException e) { + LOGGER.error("Exception during send win response: ", e); + sendEmptyResponse(Response.INTERNAL_ERROR, session); + session.close(); + } + } + + private boolean isValidResponse(Response response) { + return Arrays.stream(AVAILABLE_GOOD_RESPONSE_CODES) + .anyMatch(code -> code == response.getStatus()); + } - return value == null ? new Response(Response.NOT_FOUND, Response.EMPTY) - : Response.ok(value.value().toArray(ValueLayout.JAVA_BYTE)); + private CompletableFuture handleRedirect(Request request, long timestamp, int nodeIndex) { + return redirectRequest(request.getMethodName(), + request.getParameter("id="), + shardSelector.getShardUrlByIndex(nodeIndex), + request.getBody() == null + ? new byte[0] : request.getBody(), timestamp); } - @Path(PATH) - @RequestMethod(Request.METHOD_PUT) - public Response putEntity(@Param(value = "id", required = true) String id, Request request) { - if (isEmptyId(id)) { - return new Response(Response.BAD_REQUEST, Response.EMPTY); + private CompletableFuture handleInternalRequestAsync(Request request, String id, long timestamp) { + return CompletableFuture.supplyAsync(() -> + handleInternalRequest(request, id, timestamp), ShardRouter.proxyExecutor); + } + + private Response handleInternalRequest(Request request, String id, long timestamp) { + switch (request.getMethod()) { + case Request.METHOD_GET -> { + EntryWithTimestamp entry = referenceDao.get( + convertBytesToMemorySegment(id.getBytes(StandardCharsets.UTF_8))); + + if (entry == null) { + return new Response(Response.NOT_FOUND, Response.EMPTY); + } else if (entry.value() == null) { + Response response = new Response(Response.NOT_FOUND, Response.EMPTY); + response.addHeader(TIMESTAMP_HEADER + ": " + entry.timestamp()); + return response; + } else { + Response response = Response.ok(entry.value().toArray(ValueLayout.JAVA_BYTE)); + response.addHeader(TIMESTAMP_HEADER + ": " + entry.timestamp()); + return response; + } } - String ownerShardUrl = shardSelector.getOwnerShardUrl(id); - if (isRedirectNeeded(ownerShardUrl)) { - return redirectRequest("PUT", id, ownerShardUrl, request.getBody()); + case Request.METHOD_PUT -> { + referenceDao.upsert(new BaseEntryWithTimestamp<>( + convertBytesToMemorySegment(id.getBytes(StandardCharsets.UTF_8)), + convertBytesToMemorySegment(request.getBody()), timestamp)); + + return new Response(Response.CREATED, Response.EMPTY); } - referenceDao.upsert(new BaseEntry<>( - convertBytesToMemorySegment(id.getBytes(StandardCharsets.UTF_8)), - convertBytesToMemorySegment(request.getBody()))); - return new Response(Response.CREATED, Response.EMPTY); - } - - @Path(PATH) - @RequestMethod(Request.METHOD_DELETE) - public Response deleteEntity(@Param(value = "id", required = true) String id) { - String ownerShardUrl = shardSelector.getOwnerShardUrl(id); - if (isRedirectNeeded(ownerShardUrl)) { - return redirectRequest("DELETE", id, ownerShardUrl, new byte[0]); + case Request.METHOD_DELETE -> { + referenceDao.upsert(new BaseEntryWithTimestamp<>( + convertBytesToMemorySegment(id.getBytes(StandardCharsets.UTF_8)), + null, timestamp)); + + return new Response(Response.ACCEPTED, Response.EMPTY); } - if (isEmptyId(id)) { - return new Response(Response.BAD_REQUEST, Response.EMPTY); + default -> { + return new Response(Response.METHOD_NOT_ALLOWED, Response.EMPTY); } - referenceDao.upsert(new BaseEntry<>( - convertBytesToMemorySegment(id.getBytes(StandardCharsets.UTF_8)), null)); - return new Response(Response.ACCEPTED, Response.EMPTY); - } - - @Override - public void handleDefault(Request request, HttpSession session) throws IOException { - switch (request.getMethodName()) { - case "GET", "PUT", "DELETE" -> session.sendResponse(new Response(Response.BAD_REQUEST, Response.EMPTY)); - default -> session.sendResponse(new Response(Response.METHOD_NOT_ALLOWED, Response.EMPTY)); } } - private boolean isRedirectNeeded(String ownerUrl) { - return !url.equals(ownerUrl); + private boolean isRedirectNeeded(int shardIndex) { + return !url.equals(shardSelector.getShardUrlByIndex(shardIndex)); } private boolean isEmptyId(String id) { - return id.isEmpty() && id.isBlank(); + return id == null || (id.isEmpty() && id.isBlank()); } private MemorySegment convertBytesToMemorySegment(byte[] byteArray) { return MemorySegment.ofArray(byteArray); } + private int quorum(int from) { + return from / 2 + 1; + } + + private long resolveTimestamp(String timestampHeader) { + if (isEmptyId(timestampHeader)) { + return 0L; + } + try { + return Long.parseLong(timestampHeader); + } catch (NumberFormatException e) { + return 0L; + } + } + + private void sendEmptyResponse(String response, HttpSession session) { + var emptyRes = new Response(response, Response.EMPTY); + try { + session.sendResponse(emptyRes); + } catch (IOException e) { + LOGGER.info("Exception during sending the empty response: ", e); + } + } + + private Response getResponseWithMaxTimestamp(List responses) { + Response result = responses.getFirst(); + long max = 0; + for (Response response : responses) { + String timestampHeader = response.getHeaders()[response.getHeaderCount() - 1]; + + long timestamp = resolveTimestamp(timestampHeader); + if (max < timestamp) { + max = timestamp; + result = response; + } + } + + return result; + } } diff --git a/src/main/java/ru/vk/itmo/test/alenkovayulya/ServiceImpl.java b/src/main/java/ru/vk/itmo/test/alenkovayulya/ServiceImpl.java index b06c120ec..d755191a1 100644 --- a/src/main/java/ru/vk/itmo/test/alenkovayulya/ServiceImpl.java +++ b/src/main/java/ru/vk/itmo/test/alenkovayulya/ServiceImpl.java @@ -3,9 +3,9 @@ import ru.vk.itmo.Service; import ru.vk.itmo.ServiceConfig; import ru.vk.itmo.dao.Config; -import ru.vk.itmo.dao.Dao; -import ru.vk.itmo.dao.Entry; import ru.vk.itmo.test.ServiceFactory; +import ru.vk.itmo.test.alenkovayulya.dao.Dao; +import ru.vk.itmo.test.alenkovayulya.dao.EntryWithTimestamp; import ru.vk.itmo.test.alenkovayulya.dao.ReferenceDao; import java.io.IOException; @@ -17,7 +17,7 @@ public class ServiceImpl implements Service { - private Dao> referenceDao; + private Dao> referenceDao; private ExecutorService executorService; private ServerImpl server; private final ServiceConfig config; @@ -72,7 +72,7 @@ private void shutdownDao() { } } - @ServiceFactory(stage = 3) + @ServiceFactory(stage = 5) public static class Factory implements ServiceFactory.Factory { @Override public Service create(ServiceConfig config) { diff --git a/src/main/java/ru/vk/itmo/test/alenkovayulya/ShardRouter.java b/src/main/java/ru/vk/itmo/test/alenkovayulya/ShardRouter.java index 6a0dbea8a..c26f7b397 100644 --- a/src/main/java/ru/vk/itmo/test/alenkovayulya/ShardRouter.java +++ b/src/main/java/ru/vk/itmo/test/alenkovayulya/ShardRouter.java @@ -1,5 +1,6 @@ package ru.vk.itmo.test.alenkovayulya; +import one.nio.async.CustomThreadFactory; import one.nio.http.Response; import org.slf4j.Logger; import org.slf4j.LoggerFactory; @@ -8,42 +9,69 @@ import java.net.http.HttpClient; import java.net.http.HttpRequest; import java.net.http.HttpResponse; - -import static ru.vk.itmo.test.alenkovayulya.ServerImpl.PATH; +import java.util.concurrent.ArrayBlockingQueue; +import java.util.concurrent.CompletableFuture; +import java.util.concurrent.ThreadPoolExecutor; +import java.util.concurrent.TimeUnit; public final class ShardRouter { private static final Logger LOGGER = LoggerFactory.getLogger(ShardRouter.class); + public static final String PATH = "/v0/entity"; + public static final String TIMESTAMP_HEADER = "Timestamp"; + public static final String REDIRECT_HEADER = "Redirect"; private static final HttpClient client = HttpClient.newHttpClient(); + public static ThreadPoolExecutor proxyExecutor = new ThreadPoolExecutor( + 8, + 8, + 0L, + TimeUnit.MILLISECONDS, + new ArrayBlockingQueue<>(128), + new CustomThreadFactory("ShardRouter")); + private ShardRouter() { } - public static Response redirectRequest(String method, String id, String ownerShardUrl, byte[] body) { + public static CompletableFuture redirectRequest(String method, + String id, + String ownerShardUrl, + byte[] body, + long timestamp) { String path = ownerShardUrl + PATH + "?id=" + id; HttpRequest request = HttpRequest.newBuilder() .uri(URI.create(path)) + .header(REDIRECT_HEADER, "true") + .header(TIMESTAMP_HEADER, String.valueOf(timestamp)) .method(method, HttpRequest.BodyPublishers.ofByteArray(body)) .build(); try { - HttpResponse response = client.send(request, HttpResponse.BodyHandlers.ofByteArray()); - return new Response(getHttpResponseByCode(response.statusCode()), response.body()); + CompletableFuture> response = client.sendAsync( + request, + HttpResponse.BodyHandlers.ofByteArray()); + return response.thenApplyAsync(ShardRouter::getHttpResponseByCode); } catch (Exception e) { LOGGER.error("Error during sending request by router", e); Thread.currentThread().interrupt(); - return new Response(Response.INTERNAL_ERROR, Response.EMPTY); + return CompletableFuture.completedFuture(new Response(Response.INTERNAL_ERROR, Response.EMPTY)); } } - private static String getHttpResponseByCode(int code) { - return switch (code) { + private static Response getHttpResponseByCode(HttpResponse response) { + String responseCode = switch (response.statusCode()) { case 200 -> Response.OK; case 201 -> Response.CREATED; case 202 -> Response.ACCEPTED; case 400 -> Response.BAD_REQUEST; case 404 -> Response.NOT_FOUND; - case 405 -> Response.METHOD_NOT_ALLOWED; - default -> Response.INTERNAL_ERROR; + case 500 -> Response.INTERNAL_ERROR; + default -> throw new IllegalStateException("Not available status code: " + response.statusCode()); }; + + Response shardResponse = new Response(responseCode, response.body()); + shardResponse.addHeader(response.headers().firstValue(TIMESTAMP_HEADER).orElse("")); + + return shardResponse; + } } diff --git a/src/main/java/ru/vk/itmo/test/alenkovayulya/ShardSelector.java b/src/main/java/ru/vk/itmo/test/alenkovayulya/ShardSelector.java index 16e0a587d..0b70cf34d 100644 --- a/src/main/java/ru/vk/itmo/test/alenkovayulya/ShardSelector.java +++ b/src/main/java/ru/vk/itmo/test/alenkovayulya/ShardSelector.java @@ -12,16 +12,24 @@ public ShardSelector(List shardUrls) { this.shardUrls = shardUrls; } - public String getOwnerShardUrl(String id) { + public int getOwnerShardIndex(String id) { int maxHash = Integer.MIN_VALUE; - String maxHashShardUrl = null; - for (String shard : shardUrls) { - int hash = Hash.murmur3(id + shard); + int maxHashShardIndex = -1; + for (int i = 0; i < shardUrls.size(); i++) { + int hash = Hash.murmur3(id + shardUrls.get(i)); if (hash > maxHash) { maxHash = hash; - maxHashShardUrl = shard; + maxHashShardIndex = i; } } - return maxHashShardUrl; + return maxHashShardIndex; + } + + public int getClusterSize() { + return shardUrls.size(); + } + + public String getShardUrlByIndex(int index) { + return shardUrls.get(index); } } diff --git a/src/main/java/ru/vk/itmo/test/alenkovayulya/dao/BaseEntryWithTimestamp.java b/src/main/java/ru/vk/itmo/test/alenkovayulya/dao/BaseEntryWithTimestamp.java new file mode 100644 index 000000000..37404d423 --- /dev/null +++ b/src/main/java/ru/vk/itmo/test/alenkovayulya/dao/BaseEntryWithTimestamp.java @@ -0,0 +1,8 @@ +package ru.vk.itmo.test.alenkovayulya.dao; + +public record BaseEntryWithTimestamp(D key, D value, long timestamp) implements EntryWithTimestamp { + @Override + public String toString() { + return "{" + key + ":" + value + ":" + timestamp + "}"; + } +} diff --git a/src/main/java/ru/vk/itmo/test/alenkovayulya/dao/Dao.java b/src/main/java/ru/vk/itmo/test/alenkovayulya/dao/Dao.java new file mode 100644 index 000000000..aa490b7c6 --- /dev/null +++ b/src/main/java/ru/vk/itmo/test/alenkovayulya/dao/Dao.java @@ -0,0 +1,87 @@ +package ru.vk.itmo.test.alenkovayulya.dao; + +import java.io.Closeable; +import java.io.IOException; +import java.util.Iterator; + +public interface Dao> extends Closeable { + /** + * Returns ordered iterator of entries with keys between from (inclusive) and to (exclusive). + * @param from lower bound of range (inclusive) + * @param to upper bound of range (exclusive) + * @return entries [from;to) + */ + Iterator get(D from, D to); + + /** + * Returns entry by key. Note: default implementation is far from optimal. + * @param key entry`s key + * @return entry + */ + default E get(D key) { + Iterator iterator = get(key, null); + if (!iterator.hasNext()) { + return null; + } + + E next = iterator.next(); + if (next.key().equals(key)) { + return next; + } + return null; + } + + /** + * Returns ordered iterator of all entries with keys from (inclusive). + * @param from lower bound of range (inclusive) + * @return entries with key >= from + */ + default Iterator allFrom(D from) { + return get(from, null); + } + + /** + * Returns ordered iterator of all entries with keys < to. + * @param to upper bound of range (exclusive) + * @return entries with key < to + */ + default Iterator allTo(D to) { + return get(null, to); + } + + /** + * Returns ordered iterator of all entries. + * @return all entries + */ + default Iterator all() { + return get(null, null); + } + + /** + * Inserts of replaces entry. + * @param entry element to upsert + */ + void upsert(E entry); + + /** + * Persists data (no-op by default). + */ + default void flush() throws IOException { + // Do nothing + } + + /** + * Compacts data (no-op by default). + */ + default void compact() throws IOException { + // Do nothing + } + + /* + * Releases Dao (calls flush by default). + */ + @Override + default void close() throws IOException { + flush(); + } +} diff --git a/src/main/java/ru/vk/itmo/test/alenkovayulya/dao/EntryWithTimestamp.java b/src/main/java/ru/vk/itmo/test/alenkovayulya/dao/EntryWithTimestamp.java new file mode 100644 index 000000000..81a424d81 --- /dev/null +++ b/src/main/java/ru/vk/itmo/test/alenkovayulya/dao/EntryWithTimestamp.java @@ -0,0 +1,9 @@ +package ru.vk.itmo.test.alenkovayulya.dao; + +public interface EntryWithTimestamp { + D key(); + + D value(); + + long timestamp(); +} diff --git a/src/main/java/ru/vk/itmo/test/alenkovayulya/dao/MemTable.java b/src/main/java/ru/vk/itmo/test/alenkovayulya/dao/MemTable.java index 3ff8f1f40..b1a384203 100644 --- a/src/main/java/ru/vk/itmo/test/alenkovayulya/dao/MemTable.java +++ b/src/main/java/ru/vk/itmo/test/alenkovayulya/dao/MemTable.java @@ -1,7 +1,5 @@ package ru.vk.itmo.test.alenkovayulya.dao; -import ru.vk.itmo.dao.Entry; - import java.lang.foreign.MemorySegment; import java.util.Iterator; import java.util.NavigableMap; @@ -13,7 +11,7 @@ * @author incubos */ final class MemTable { - private final NavigableMap> map = + private final NavigableMap> map = new ConcurrentSkipListMap<>( MemorySegmentComparator.INSTANCE); @@ -21,7 +19,7 @@ boolean isEmpty() { return map.isEmpty(); } - Iterator> get( + Iterator> get( final MemorySegment from, final MemorySegment to) { if (from == null && to == null) { @@ -39,11 +37,11 @@ Iterator> get( } } - Entry get(final MemorySegment key) { + EntryWithTimestamp get(final MemorySegment key) { return map.get(key); } - Entry upsert(final Entry entry) { + EntryWithTimestamp upsert(final EntryWithTimestamp entry) { return map.put(entry.key(), entry); } } diff --git a/src/main/java/ru/vk/itmo/test/alenkovayulya/dao/MergingEntryIterator.java b/src/main/java/ru/vk/itmo/test/alenkovayulya/dao/MergingEntryIterator.java index 77e232a76..062cd2cb2 100644 --- a/src/main/java/ru/vk/itmo/test/alenkovayulya/dao/MergingEntryIterator.java +++ b/src/main/java/ru/vk/itmo/test/alenkovayulya/dao/MergingEntryIterator.java @@ -1,7 +1,5 @@ package ru.vk.itmo.test.alenkovayulya.dao; -import ru.vk.itmo.dao.Entry; - import java.lang.foreign.MemorySegment; import java.util.Iterator; import java.util.List; @@ -14,7 +12,7 @@ * * @author incubos */ -final class MergingEntryIterator implements Iterator> { +final class MergingEntryIterator implements Iterator> { private final Queue iterators; MergingEntryIterator(final List iterators) { @@ -29,13 +27,13 @@ public boolean hasNext() { } @Override - public Entry next() { + public EntryWithTimestamp next() { if (!hasNext()) { throw new NoSuchElementException(); } final WeightedPeekingEntryIterator top = iterators.remove(); - final Entry result = top.next(); + final EntryWithTimestamp result = top.next(); if (top.hasNext()) { // Not exhausted @@ -51,7 +49,7 @@ public Entry next() { } // Skip entries with the same key - final Entry entry = iterator.peek(); + final EntryWithTimestamp entry = iterator.peek(); if (MemorySegmentComparator.INSTANCE.compare(result.key(), entry.key()) != 0) { // Reached another key break; diff --git a/src/main/java/ru/vk/itmo/test/alenkovayulya/dao/ReferenceDao.java b/src/main/java/ru/vk/itmo/test/alenkovayulya/dao/ReferenceDao.java index 306816ba5..3291e7fe9 100644 --- a/src/main/java/ru/vk/itmo/test/alenkovayulya/dao/ReferenceDao.java +++ b/src/main/java/ru/vk/itmo/test/alenkovayulya/dao/ReferenceDao.java @@ -1,8 +1,6 @@ package ru.vk.itmo.test.alenkovayulya.dao; import ru.vk.itmo.dao.Config; -import ru.vk.itmo.dao.Dao; -import ru.vk.itmo.dao.Entry; import java.io.IOException; import java.lang.foreign.Arena; @@ -22,7 +20,7 @@ * * @author incubos */ -public class ReferenceDao implements Dao> { +public class ReferenceDao implements Dao> { private final Config config; private final Arena arena; @@ -63,23 +61,22 @@ public ReferenceDao(final Config config) throws IOException { } @Override - public Iterator> get( + public Iterator> get( final MemorySegment from, final MemorySegment to) { - return new LiveFilteringIterator( - tableSet.get( - from, - to)); + return tableSet.get( + from, + to); } @Override - public Entry get(final MemorySegment key) { + public EntryWithTimestamp get(final MemorySegment key) { // Without lock, just snapshot of table set return tableSet.get(key); } @Override - public void upsert(final Entry entry) { + public void upsert(final EntryWithTimestamp entry) { final boolean autoFlush; lock.readLock().lock(); try { @@ -89,7 +86,7 @@ public void upsert(final Entry entry) { } // Upsert - final Entry previous = tableSet.upsert(entry); + final EntryWithTimestamp previous = tableSet.upsert(entry); // Update size estimate final long size = tableSet.memTableSize.addAndGet(sizeOf(entry) - sizeOf(previous)); @@ -103,16 +100,16 @@ public void upsert(final Entry entry) { } } - private static long sizeOf(final Entry entry) { + private static long sizeOf(final EntryWithTimestamp entry) { if (entry == null) { return 0L; } if (entry.value() == null) { - return entry.key().byteSize(); + return entry.key().byteSize() + Long.BYTES; } - return entry.key().byteSize() + entry.value().byteSize(); + return entry.key().byteSize() + entry.value().byteSize() + Long.BYTES; } private void initiateFlush(final boolean auto) { @@ -200,8 +197,7 @@ public void compact() throws IOException { .write( config.basePath(), 0, - new LiveFilteringIterator( - currentTableSet.allSSTableEntries())); + currentTableSet.allSSTableEntries()); } catch (IOException e) { e.printStackTrace(); Runtime.getRuntime().halt(-3); diff --git a/src/main/java/ru/vk/itmo/test/alenkovayulya/dao/SSTable.java b/src/main/java/ru/vk/itmo/test/alenkovayulya/dao/SSTable.java index 91233ce1a..1f9db1b57 100644 --- a/src/main/java/ru/vk/itmo/test/alenkovayulya/dao/SSTable.java +++ b/src/main/java/ru/vk/itmo/test/alenkovayulya/dao/SSTable.java @@ -1,8 +1,5 @@ package ru.vk.itmo.test.alenkovayulya.dao; -import ru.vk.itmo.dao.BaseEntry; -import ru.vk.itmo.dao.Entry; - import java.lang.foreign.MemorySegment; import java.lang.foreign.ValueLayout; import java.util.Collections; @@ -54,7 +51,7 @@ private long entryBinarySearch(final MemorySegment key) { while (low <= high) { final long mid = (low + high) >>> 1; final long midEntryOffset = entryOffset(mid); - final long midKeyLength = getLength(midEntryOffset); + final long midKeyLength = getValue(midEntryOffset); final int compare = MemorySegmentComparator.compare( data, @@ -82,13 +79,13 @@ private long entryOffset(final long entry) { entry * Long.BYTES); } - private long getLength(final long offset) { + private long getValue(final long offset) { return data.get( ValueLayout.OfLong.JAVA_LONG_UNALIGNED, offset); } - Iterator> get( + Iterator> get( final MemorySegment from, final MemorySegment to) { assert from == null || to == null || MemorySegmentComparator.INSTANCE.compare(from, to) <= 0; @@ -134,7 +131,7 @@ Iterator> get( return new SliceIterator(fromOffset, toOffset); } - Entry get(final MemorySegment key) { + EntryWithTimestamp get(final MemorySegment key) { final long entry = entryBinarySearch(key); if (entry < 0) { return null; @@ -144,19 +141,23 @@ Entry get(final MemorySegment key) { long offset = entryOffset(entry); offset += Long.BYTES + key.byteSize(); // Extract value length - final long valueLength = getLength(offset); + final long valueLength = getValue(offset); if (valueLength == SSTables.TOMBSTONE_VALUE_LENGTH) { // Tombstone encountered - return new BaseEntry<>(key, null); + offset += Long.BYTES; + final long timestamp = getValue(offset); + return new BaseEntryWithTimestamp<>(key, null, timestamp); } else { // Get value offset += Long.BYTES; final MemorySegment value = data.asSlice(offset, valueLength); - return new BaseEntry<>(key, value); + offset += valueLength; + final long timestamp = getValue(offset); + return new BaseEntryWithTimestamp<>(key, value, timestamp); } } - private final class SliceIterator implements Iterator> { + private final class SliceIterator implements Iterator> { private long offset; private final long toOffset; @@ -173,13 +174,13 @@ public boolean hasNext() { } @Override - public Entry next() { + public EntryWithTimestamp next() { if (!hasNext()) { throw new NoSuchElementException(); } // Read key length - final long keyLength = getLength(offset); + final long keyLength = getValue(offset); offset += Long.BYTES; // Read key @@ -187,17 +188,21 @@ public Entry next() { offset += keyLength; // Read value length - final long valueLength = getLength(offset); + final long valueLength = getValue(offset); offset += Long.BYTES; // Read value if (valueLength == SSTables.TOMBSTONE_VALUE_LENGTH) { // Tombstone encountered - return new BaseEntry<>(key, null); + final long timestamp = getValue(offset); + offset += Long.BYTES; + return new BaseEntryWithTimestamp<>(key, null, timestamp); } else { final MemorySegment value = data.asSlice(offset, valueLength); offset += valueLength; - return new BaseEntry<>(key, value); + final long timestamp = getValue(offset); + offset += Long.BYTES; + return new BaseEntryWithTimestamp<>(key, value, timestamp); } } } diff --git a/src/main/java/ru/vk/itmo/test/alenkovayulya/dao/SSTableWriter.java b/src/main/java/ru/vk/itmo/test/alenkovayulya/dao/SSTableWriter.java index e2d828bd2..102e9da45 100644 --- a/src/main/java/ru/vk/itmo/test/alenkovayulya/dao/SSTableWriter.java +++ b/src/main/java/ru/vk/itmo/test/alenkovayulya/dao/SSTableWriter.java @@ -40,7 +40,7 @@ final class SSTableWriter { void write( final Path baseDir, final int sequence, - final Iterator> entries) throws IOException { + final Iterator> entries) throws IOException { // Write to temporary files final Path tempIndexName = SSTables.tempIndexName(baseDir, sequence); final Path tempDataName = SSTables.tempDataName(baseDir, sequence); @@ -71,7 +71,7 @@ void write( writeLong(entryOffset, index); // Then write the entry - final Entry entry = entries.next(); + final EntryWithTimestamp entry = entries.next(); entryOffset += writeEntry(entry, data); } } @@ -132,10 +132,11 @@ private void writeSegment( * @return written bytes */ private long writeEntry( - final Entry entry, + final EntryWithTimestamp entry, final OutputStream os) throws IOException { final MemorySegment key = entry.key(); final MemorySegment value = entry.value(); + final long timestamp = entry.timestamp(); long result = 0L; // Key size @@ -151,6 +152,10 @@ private long writeEntry( // Tombstone writeLong(SSTables.TOMBSTONE_VALUE_LENGTH, os); result += Long.BYTES; + + // Timestamp + writeLong(timestamp, os); + result += Long.BYTES; } else { // Value length writeLong(value.byteSize(), os); @@ -159,6 +164,10 @@ private long writeEntry( // Value writeSegment(value, os); result += value.byteSize(); + + // Timestamp + writeLong(timestamp, os); + result += Long.BYTES; } return result; diff --git a/src/main/java/ru/vk/itmo/test/alenkovayulya/dao/TableSet.java b/src/main/java/ru/vk/itmo/test/alenkovayulya/dao/TableSet.java index 1f8227824..dec62fbba 100644 --- a/src/main/java/ru/vk/itmo/test/alenkovayulya/dao/TableSet.java +++ b/src/main/java/ru/vk/itmo/test/alenkovayulya/dao/TableSet.java @@ -1,7 +1,5 @@ package ru.vk.itmo.test.alenkovayulya.dao; -import ru.vk.itmo.dao.Entry; - import java.lang.foreign.MemorySegment; import java.util.ArrayList; import java.util.Collections; @@ -98,14 +96,14 @@ TableSet compacted( newSsTables); } - Iterator> get( + Iterator> get( final MemorySegment from, final MemorySegment to) { final List iterators = new ArrayList<>(2 + ssTables.size()); // MemTable goes first - final Iterator> memTableIterator = + final Iterator> memTableIterator = memTable.get(from, to); if (memTableIterator.hasNext()) { iterators.add( @@ -116,7 +114,7 @@ Iterator> get( // Then goes flushing if (flushingTable != null) { - final Iterator> flushingIterator = + final Iterator> flushingIterator = flushingTable.get(from, to); if (flushingIterator.hasNext()) { iterators.add( @@ -129,7 +127,7 @@ Iterator> get( // Then go all the SSTables for (int i = 0; i < ssTables.size(); i++) { final SSTable ssTable = ssTables.get(i); - final Iterator> ssTableIterator = + final Iterator> ssTableIterator = ssTable.get(from, to); if (ssTableIterator.hasNext()) { iterators.add( @@ -146,22 +144,20 @@ Iterator> get( }; } - Entry get(final MemorySegment key) { + EntryWithTimestamp get(final MemorySegment key) { // Slightly optimized version not to pollute the heap // First check MemTable - Entry result = memTable.get(key); + EntryWithTimestamp result = memTable.get(key); if (result != null) { - // Transform tombstone - return swallowTombstone(result); + return result; } // Then check flushing if (flushingTable != null) { result = flushingTable.get(key); if (result != null) { - // Transform tombstone - return swallowTombstone(result); + return result; } } @@ -169,8 +165,7 @@ Entry get(final MemorySegment key) { for (final SSTable ssTable : ssTables) { result = ssTable.get(key); if (result != null) { - // Transform tombstone - return swallowTombstone(result); + return result; } } @@ -178,21 +173,17 @@ Entry get(final MemorySegment key) { return null; } - private static Entry swallowTombstone(final Entry entry) { - return entry.value() == null ? null : entry; - } - - Entry upsert(final Entry entry) { + EntryWithTimestamp upsert(final EntryWithTimestamp entry) { return memTable.upsert(entry); } - Iterator> allSSTableEntries() { + Iterator> allSSTableEntries() { final List iterators = new ArrayList<>(ssTables.size()); for (int i = 0; i < ssTables.size(); i++) { final SSTable ssTable = ssTables.get(i); - final Iterator> ssTableIterator = + final Iterator> ssTableIterator = ssTable.get(null, null); iterators.add( new WeightedPeekingEntryIterator( diff --git a/src/main/java/ru/vk/itmo/test/alenkovayulya/dao/WeightedPeekingEntryIterator.java b/src/main/java/ru/vk/itmo/test/alenkovayulya/dao/WeightedPeekingEntryIterator.java index 05b8d74ba..8ec58cbd4 100644 --- a/src/main/java/ru/vk/itmo/test/alenkovayulya/dao/WeightedPeekingEntryIterator.java +++ b/src/main/java/ru/vk/itmo/test/alenkovayulya/dao/WeightedPeekingEntryIterator.java @@ -1,7 +1,5 @@ package ru.vk.itmo.test.alenkovayulya.dao; -import ru.vk.itmo.dao.Entry; - import java.lang.foreign.MemorySegment; import java.util.Iterator; import java.util.NoSuchElementException; @@ -12,15 +10,15 @@ * @author incubos */ final class WeightedPeekingEntryIterator - implements Iterator>, + implements Iterator>, Comparable { private final int weight; - private final Iterator> delegate; - private Entry next; + private final Iterator> delegate; + private EntryWithTimestamp next; WeightedPeekingEntryIterator( final int weight, - final Iterator> delegate) { + final Iterator> delegate) { this.weight = weight; this.delegate = delegate; this.next = delegate.hasNext() ? delegate.next() : null; @@ -32,17 +30,17 @@ public boolean hasNext() { } @Override - public Entry next() { + public EntryWithTimestamp next() { if (!hasNext()) { throw new NoSuchElementException(); } - final Entry result = next; + final EntryWithTimestamp result = next; next = delegate.hasNext() ? delegate.next() : null; return result; } - Entry peek() { + EntryWithTimestamp peek() { if (!hasNext()) { throw new NoSuchElementException(); } diff --git a/src/main/java/ru/vk/itmo/test/alenkovayulya/reports/report_stage4.md b/src/main/java/ru/vk/itmo/test/alenkovayulya/reports/report_stage4.md new file mode 100644 index 000000000..422fb643e --- /dev/null +++ b/src/main/java/ru/vk/itmo/test/alenkovayulya/reports/report_stage4.md @@ -0,0 +1,129 @@ +### Репликация + +Основная идея данного этапа заключается в повышении отказоустойчивости за счет дублирования данных. +Чтобы это реализовать, мы ввели новые параметры ack - кол-во необходимых ответов от нод и from - количество нод, на которые мы отправляем запрос. +Результаты, полученные от нод, мы мержим. При возникновении конфликтов, решаем их, опираясь на timestamp, которую мы теперь тоже храним. + + +### Latency + +В дальнейших исследованиях будем использовать кластер из 3-ех нод с дефолтными значениями для ack/from равными 2/3 соответсвенно (так как по умолчанию: from - число нод в кластере, ack - кворум от числа нод в кластере) + +Последоватльныи регулированием нагрузки была определена точка разладки для PUT-запросов: + +``` +MacBook-Pro-Ulia:wrk2-arm yulalenk$ ./wrk -c 64 -d 20 -t 1 -L -R 2300 -s /Users/yulalenk/sem2/2024-highload-dht/src/main/java/ru/vk/itmo/test/alenkovayulya/lua/put.lua http://localhost:8080 + 50.000% 1.80ms + 75.000% 3.32ms + 90.000% 33.76ms + 99.000% 60.48ms + 99.900% 63.65ms + 99.990% 65.15ms + 99.999% 65.15ms +100.000% 65.15ms +``` + +Latency нереально сильно просела, теперь точка разладки для PUT запросов составляет всего 2300 rps. + +Для GET запросов была найдена следующая точка разладки: + +``` +./wrk -c 64 -d 30 -t 1 -L -R 2000 -s /Users/yulalenk/sem2/2024-highload-dht/src/main/java/ru/vk/itmo/test/alenkovayulya/lua/get.lua http://localhost:8080 +Running 30s test @ http://localhost:8080 + 1 threads and 64 connections + Thread calibration: mean lat.: 2.364ms, rate sampling interval: 10ms + Thread Stats Avg Stdev Max +/- Stdev + Latency 3.88ms 8.30ms 60.22ms 92.92% + Req/Sec 242.83 724.12 6.70k 89.10% + Latency Distribution (HdrHistogram - Recorded Latency) + 50.000% 1.61ms + 75.000% 2.31ms + 90.000% 4.50ms + 99.000% 45.50ms + 99.900% 55.20ms + 99.990% 60.26ms + 99.999% 60.26ms +100.000% 60.26ms +``` + +Из-за добавления реаликации производительность отностительно предыдущего этапа просела больше, чем в 10 раз. +При этом, чем больше в кластере будет нод, тем сильнее будет снижаться пропускная способность. + + + +### Профилирование + + +#### PUT, cpu + +![](../results_stage4/asprof-put-cpu.png) + +В целом, сильных отличий от профиля без реплицирования нет. +В процентном соотношении практически ничего не поменялось. +Добавились новые методы, но они встречаются в совсем небольшом количестве семплов, например: + +- checkReplicasResponsesNumber - 2.11% + +Стоит отметить, что обработка запроса на шарде, которая хранит нужные данные, занимает всего лишь 0.83%(handleInternalRequest), в то время как redirect на другую шарду съедает 12.28%(handleRedirect) + + +#### PUT, alloc + +![](../results_stage4/asprof-put-alloc.png) + +Сравнивая данный профиль с версией без репликации, можно заметить следующее: +в SelectorThread процент аллокаций увеличился. Это произошло из-за нового метода +resolveTimestamp (4.19%) для того, чтобы из заголовка ответа достать timestamp и далее производить сравнения +ответов разных нод. +Незначительные аллокации для методов: +checkReplicasResponsesNumber - 0.19% +handleInternalRequest - 0.61% , +handleRedirect - 54.38% + + +#### PUT, lock + +![](../results_stage4/asprof-put-lock.png) + +Заметно, что в новой версии с репликаций заметно увеличилось число локов при обработке запроса. +Можно попробовать от них избавиться, сделав сетевое взаимодействие узлов сделать асинхронным. + + +#### GET, cpu + +![](../results_stage4/asprof-get-cpu.png) + +В данном профиле отмечу, что процент сэмплов на проксированию увеличился на 2%, что, как мне кажется, связано с заполнением заголовка и проставления таймстемпа. + +Вновь появившиеся методы снова встречаются в совсем небольшом значении сэмлов. + +checkReplicasResponsesNumber - 2.39% +getResponseWithMaxTimestamp - 0.94% + + +#### GET, alloc + +![](../results_stage4/asprof-get-alloc.png) + +С точки зрения аллокаций, все абсолютно аналогично PUT-запросам. +checkReplicasResponsesNumber - 2.96% +getResponseWithMaxTimestamp - 2.63% + +Кроме того заметно, что увеличились аллокации в пуле воркеров, что связано с общением с другими нодами. + + +#### GET, lock + +![](../results_stage4/asprof-get-lock.png) + +По сравнения с предыдущей реализацией, появилось больше локов, связанных с общением нод. + +### Итог + +## Выводы и возможные улучшения + +С одной стороны, репликация позволяет нам быть готовым к отказам какой-либо ноды, так как благодаря дубликации мы не теряем доступ к данным, что хорошо. +С другой стороны, ради такой доступности мы очень сильно просядаем в производительности. + +Есть вариант попробовать сделать сетевое взаимодействие асинхронным и непоследовательным, так как сейчас нам приходится +ждать, когда каждая из нод получит,обработает запрос и ответит, что занимаем немало времени, которое можно было бы использовать с пользой, а не блокироваться. diff --git a/src/main/java/ru/vk/itmo/test/alenkovayulya/results_stage4/asprof-get-alloc.png b/src/main/java/ru/vk/itmo/test/alenkovayulya/results_stage4/asprof-get-alloc.png new file mode 100644 index 000000000..9aac29c80 Binary files /dev/null and b/src/main/java/ru/vk/itmo/test/alenkovayulya/results_stage4/asprof-get-alloc.png differ diff --git a/src/main/java/ru/vk/itmo/test/alenkovayulya/results_stage4/asprof-get-cpu.png b/src/main/java/ru/vk/itmo/test/alenkovayulya/results_stage4/asprof-get-cpu.png new file mode 100644 index 000000000..1fde519fd Binary files /dev/null and b/src/main/java/ru/vk/itmo/test/alenkovayulya/results_stage4/asprof-get-cpu.png differ diff --git a/src/main/java/ru/vk/itmo/test/alenkovayulya/results_stage4/asprof-get-lock.png b/src/main/java/ru/vk/itmo/test/alenkovayulya/results_stage4/asprof-get-lock.png new file mode 100644 index 000000000..88eddb323 Binary files /dev/null and b/src/main/java/ru/vk/itmo/test/alenkovayulya/results_stage4/asprof-get-lock.png differ diff --git a/src/main/java/ru/vk/itmo/test/alenkovayulya/results_stage4/asprof-put-alloc.png b/src/main/java/ru/vk/itmo/test/alenkovayulya/results_stage4/asprof-put-alloc.png new file mode 100644 index 000000000..d1d837a8a Binary files /dev/null and b/src/main/java/ru/vk/itmo/test/alenkovayulya/results_stage4/asprof-put-alloc.png differ diff --git a/src/main/java/ru/vk/itmo/test/alenkovayulya/results_stage4/asprof-put-cpu.png b/src/main/java/ru/vk/itmo/test/alenkovayulya/results_stage4/asprof-put-cpu.png new file mode 100644 index 000000000..ca6890f41 Binary files /dev/null and b/src/main/java/ru/vk/itmo/test/alenkovayulya/results_stage4/asprof-put-cpu.png differ diff --git a/src/main/java/ru/vk/itmo/test/alenkovayulya/results_stage4/asprof-put-lock.png b/src/main/java/ru/vk/itmo/test/alenkovayulya/results_stage4/asprof-put-lock.png new file mode 100644 index 000000000..493800930 Binary files /dev/null and b/src/main/java/ru/vk/itmo/test/alenkovayulya/results_stage4/asprof-put-lock.png differ diff --git a/src/main/java/ru/vk/itmo/test/alenkovayulya/results_stage4/html/asprof-get-alloc.html b/src/main/java/ru/vk/itmo/test/alenkovayulya/results_stage4/html/asprof-get-alloc.html new file mode 100644 index 000000000..170b9d624 --- /dev/null +++ b/src/main/java/ru/vk/itmo/test/alenkovayulya/results_stage4/html/asprof-get-alloc.html @@ -0,0 +1,2823 @@ + + + + + + + +

Allocation profile

+
  
+
Produced by async-profiler
+ +
+

+

Matched:

+ diff --git a/src/main/java/ru/vk/itmo/test/alenkovayulya/results_stage4/html/asprof-get-cpu.html b/src/main/java/ru/vk/itmo/test/alenkovayulya/results_stage4/html/asprof-get-cpu.html new file mode 100644 index 000000000..9540c75af --- /dev/null +++ b/src/main/java/ru/vk/itmo/test/alenkovayulya/results_stage4/html/asprof-get-cpu.html @@ -0,0 +1,2418 @@ + + + + + + + +

CPU profile

+
  
+
Produced by async-profiler
+ +
+

+

Matched:

+ diff --git a/src/main/java/ru/vk/itmo/test/alenkovayulya/results_stage4/html/asprof-get-lock.html b/src/main/java/ru/vk/itmo/test/alenkovayulya/results_stage4/html/asprof-get-lock.html new file mode 100644 index 000000000..ff715d3ad --- /dev/null +++ b/src/main/java/ru/vk/itmo/test/alenkovayulya/results_stage4/html/asprof-get-lock.html @@ -0,0 +1,746 @@ + + + + + + + +

Lock profile

+
  
+
Produced by async-profiler
+ +
+

+

Matched:

+ diff --git a/src/main/java/ru/vk/itmo/test/alenkovayulya/results_stage4/html/asprof-put-alloc.html b/src/main/java/ru/vk/itmo/test/alenkovayulya/results_stage4/html/asprof-put-alloc.html new file mode 100644 index 000000000..eab12e9f9 --- /dev/null +++ b/src/main/java/ru/vk/itmo/test/alenkovayulya/results_stage4/html/asprof-put-alloc.html @@ -0,0 +1,2924 @@ + + + + + + + +

Allocation profile

+
  
+
Produced by async-profiler
+ +
+

+

Matched:

+ diff --git a/src/main/java/ru/vk/itmo/test/alenkovayulya/results_stage4/html/asprof-put-cpu.html b/src/main/java/ru/vk/itmo/test/alenkovayulya/results_stage4/html/asprof-put-cpu.html new file mode 100644 index 000000000..ae4d51e1a --- /dev/null +++ b/src/main/java/ru/vk/itmo/test/alenkovayulya/results_stage4/html/asprof-put-cpu.html @@ -0,0 +1,2265 @@ + + + + + + + +

CPU profile

+
  
+
Produced by async-profiler
+ +
+

+

Matched:

+ diff --git a/src/main/java/ru/vk/itmo/test/alenkovayulya/results_stage4/html/asprof-put-lock.html b/src/main/java/ru/vk/itmo/test/alenkovayulya/results_stage4/html/asprof-put-lock.html new file mode 100644 index 000000000..05d340e3e --- /dev/null +++ b/src/main/java/ru/vk/itmo/test/alenkovayulya/results_stage4/html/asprof-put-lock.html @@ -0,0 +1,742 @@ + + + + + + + +

Lock profile

+
  
+
Produced by async-profiler
+ +
+

+

Matched:

+ diff --git a/src/main/java/ru/vk/itmo/test/alenkovayulya/results_stage4/wrk2_get.txt b/src/main/java/ru/vk/itmo/test/alenkovayulya/results_stage4/wrk2_get.txt new file mode 100644 index 000000000..aa0e359a6 --- /dev/null +++ b/src/main/java/ru/vk/itmo/test/alenkovayulya/results_stage4/wrk2_get.txt @@ -0,0 +1,518 @@ +MacBook-Pro-Ulia:wrk2-arm yulalenk$ ./wrk -c 64 -d 30 -t 1 -L -R 1500 -s /Users/yulalenk/sem2/2024-highload-dht/src/main/java/ru/vk/itmo/test/alenkovayulya/lua/get.lua http://localhost:8080 +Running 30s test @ http://localhost:8080 + 1 threads and 64 connections + Thread calibration: mean lat.: 2.223ms, rate sampling interval: 10ms + Thread Stats Avg Stdev Max +/- Stdev + Latency 2.74ms 3.82ms 27.78ms 92.50% + Req/Sec 41.80 249.86 2.09k 97.06% + Latency Distribution (HdrHistogram - Recorded Latency) + 50.000% 1.69ms + 75.000% 2.38ms + 90.000% 4.16ms + 99.000% 20.61ms + 99.900% 27.58ms + 99.990% 27.79ms + 99.999% 27.79ms +100.000% 27.79ms + + Detailed Percentile spectrum: + Value Percentile TotalCount 1/(1-Percentile) + + 0.280 0.000000 1 1.00 + 0.828 0.100000 75 1.11 + 1.076 0.200000 151 1.25 + 1.278 0.300000 226 1.43 + 1.417 0.400000 299 1.67 + 1.689 0.500000 374 2.00 + 1.821 0.550000 411 2.22 + 1.972 0.600000 449 2.50 + 2.103 0.650000 486 2.86 + 2.243 0.700000 523 3.33 + 2.383 0.750000 561 4.00 + 2.531 0.775000 579 4.44 + 2.691 0.800000 598 5.00 + 2.853 0.825000 618 5.71 + 3.135 0.850000 635 6.67 + 3.577 0.875000 654 8.00 + 3.857 0.887500 663 8.89 + 4.191 0.900000 673 10.00 + 5.119 0.912500 682 11.43 + 6.207 0.925000 691 13.33 + 8.167 0.937500 701 16.00 + 9.831 0.943750 705 17.78 + 11.335 0.950000 710 20.00 + 12.031 0.956250 715 22.86 + 13.175 0.962500 719 26.67 + 15.591 0.968750 724 32.00 + 16.783 0.971875 726 35.56 + 17.103 0.975000 729 40.00 + 17.615 0.978125 731 45.71 + 18.063 0.981250 733 53.33 + 19.471 0.984375 736 64.00 + 19.759 0.985938 737 71.11 + 20.031 0.987500 738 80.00 + 20.255 0.989062 739 91.43 + 20.607 0.990625 740 106.67 + 23.423 0.992188 742 128.00 + 23.423 0.992969 742 142.22 + 23.823 0.993750 743 160.00 + 23.823 0.994531 743 182.86 + 24.319 0.995313 744 213.33 + 26.719 0.996094 745 256.00 + 26.719 0.996484 745 284.44 + 26.719 0.996875 745 320.00 + 26.719 0.997266 745 365.71 + 27.583 0.997656 746 426.67 + 27.583 0.998047 746 512.00 + 27.583 0.998242 746 568.89 + 27.583 0.998437 746 640.00 + 27.583 0.998633 746 731.43 + 27.791 0.998828 747 853.33 + 27.791 1.000000 747 inf +#[Mean = 2.744, StdDeviation = 3.825] +#[Max = 27.776, Total count = 747] +#[Buckets = 27, SubBuckets = 2048] +---------------------------------------------------------- +MacBook-Pro-Ulia:wrk2-arm yulalenk$ ./wrk -c 64 -d 30 -t 1 -L -R 1600 -s /Users/yulalenk/sem2/2024-highload-dht/src/main/java/ru/vk/itmo/test/alenkovayulya/lua/get.lua http://localhost:8080 +Running 30s test @ http://localhost:8080 + 1 threads and 64 connections + Thread calibration: mean lat.: 2.776ms, rate sampling interval: 10ms + Thread Stats Avg Stdev Max +/- Stdev + Latency 2.20ms 2.87ms 39.17ms 95.61% + Req/Sec 464.55 801.76 7.22k 74.88% + Latency Distribution (HdrHistogram - Recorded Latency) + 50.000% 1.62ms + 75.000% 2.22ms + 90.000% 3.15ms + 99.000% 16.30ms + 99.900% 34.11ms + 99.990% 36.26ms + 99.999% 39.20ms +100.000% 39.20ms + + Detailed Percentile spectrum: + Value Percentile TotalCount 1/(1-Percentile) + + 0.339 0.000000 1 1.00 + 0.888 0.100000 835 1.11 + 1.091 0.200000 1670 1.25 + 1.266 0.300000 2506 1.43 + 1.430 0.400000 3342 1.67 + 1.619 0.500000 4174 2.00 + 1.709 0.550000 4595 2.22 + 1.814 0.600000 5009 2.50 + 1.938 0.650000 5426 2.86 + 2.065 0.700000 5847 3.33 + 2.221 0.750000 6266 4.00 + 2.303 0.775000 6469 4.44 + 2.387 0.800000 6681 5.00 + 2.483 0.825000 6891 5.71 + 2.619 0.850000 7096 6.67 + 2.847 0.875000 7305 8.00 + 3.007 0.887500 7408 8.89 + 3.147 0.900000 7512 10.00 + 3.411 0.912500 7616 11.43 + 3.815 0.925000 7721 13.33 + 4.243 0.937500 7825 16.00 + 4.475 0.943750 7879 17.78 + 4.743 0.950000 7929 20.00 + 5.115 0.956250 7981 22.86 + 5.875 0.962500 8034 26.67 + 6.903 0.968750 8086 32.00 + 7.403 0.971875 8112 35.56 + 8.199 0.975000 8140 40.00 + 9.135 0.978125 8164 45.71 + 10.119 0.981250 8191 53.33 + 11.111 0.984375 8216 64.00 + 12.711 0.985938 8230 71.11 + 14.023 0.987500 8242 80.00 + 15.391 0.989062 8255 91.43 + 17.567 0.990625 8268 106.67 + 20.703 0.992188 8281 128.00 + 21.423 0.992969 8288 142.22 + 22.687 0.993750 8294 160.00 + 24.767 0.994531 8301 182.86 + 25.503 0.995313 8307 213.33 + 26.463 0.996094 8314 256.00 + 26.607 0.996484 8317 284.44 + 27.503 0.996875 8320 320.00 + 29.503 0.997266 8324 365.71 + 30.287 0.997656 8327 426.67 + 31.391 0.998047 8330 512.00 + 31.903 0.998242 8332 568.89 + 31.983 0.998437 8333 640.00 + 32.543 0.998633 8335 731.43 + 33.151 0.998828 8337 853.33 + 34.111 0.999023 8338 1024.00 + 34.527 0.999121 8339 1137.78 + 34.591 0.999219 8340 1280.00 + 35.231 0.999316 8341 1462.86 + 35.327 0.999414 8342 1706.67 + 35.327 0.999512 8342 2048.00 + 35.711 0.999561 8343 2275.56 + 35.711 0.999609 8343 2560.00 + 36.063 0.999658 8344 2925.71 + 36.063 0.999707 8344 3413.33 + 36.063 0.999756 8344 4096.00 + 36.255 0.999780 8345 4551.11 + 36.255 0.999805 8345 5120.00 + 36.255 0.999829 8345 5851.43 + 36.255 0.999854 8345 6826.67 + 36.255 0.999878 8345 8192.00 + 39.199 0.999890 8346 9102.22 + 39.199 1.000000 8346 inf +#[Mean = 2.200, StdDeviation = 2.872] +#[Max = 39.168, Total count = 8346] +#[Buckets = 27, SubBuckets = 2048] +---------------------------------------------------------- + +MacBook-Pro-Ulia:wrk2-arm yulalenk$ ./wrk -c 64 -d 30 -t 1 -L -R 1800 -s /Users/yulalenk/sem2/2024-highload-dht/src/main/java/ru/vk/itmo/test/alenkovayulya/lua/get.lua http://localhost:8080 +Running 30s test @ http://localhost:8080 + 1 threads and 64 connections + Thread calibration: mean lat.: 2.455ms, rate sampling interval: 10ms + Thread Stats Avg Stdev Max +/- Stdev + Latency 2.43ms 4.17ms 43.52ms 94.76% + Req/Sec 351.26 793.45 8.22k 82.54% + Latency Distribution (HdrHistogram - Recorded Latency) + 50.000% 1.50ms + 75.000% 2.07ms + 90.000% 2.83ms + 99.000% 25.28ms + 99.900% 42.05ms + 99.990% 43.36ms + 99.999% 43.55ms +100.000% 43.55ms + + Detailed Percentile spectrum: + Value Percentile TotalCount 1/(1-Percentile) + + 0.364 0.000000 1 1.00 + 0.825 0.100000 634 1.11 + 1.007 0.200000 1266 1.25 + 1.173 0.300000 1895 1.43 + 1.340 0.400000 2534 1.67 + 1.501 0.500000 3161 2.00 + 1.590 0.550000 3474 2.22 + 1.691 0.600000 3791 2.50 + 1.801 0.650000 4109 2.86 + 1.921 0.700000 4422 3.33 + 2.069 0.750000 4738 4.00 + 2.141 0.775000 4895 4.44 + 2.233 0.800000 5053 5.00 + 2.331 0.825000 5212 5.71 + 2.449 0.850000 5370 6.67 + 2.613 0.875000 5529 8.00 + 2.727 0.887500 5607 8.89 + 2.839 0.900000 5686 10.00 + 3.031 0.912500 5766 11.43 + 3.425 0.925000 5843 13.33 + 4.583 0.937500 5922 16.00 + 5.887 0.943750 5961 17.78 + 7.391 0.950000 6001 20.00 + 8.695 0.956250 6040 22.86 + 10.679 0.962500 6080 26.67 + 12.647 0.968750 6119 32.00 + 14.431 0.971875 6139 35.56 + 15.631 0.975000 6159 40.00 + 16.847 0.978125 6178 45.71 + 18.879 0.981250 6198 53.33 + 21.151 0.984375 6218 64.00 + 22.335 0.985938 6228 71.11 + 23.807 0.987500 6238 80.00 + 24.687 0.989062 6247 91.43 + 25.743 0.990625 6257 106.67 + 26.895 0.992188 6267 128.00 + 27.535 0.992969 6272 142.22 + 28.639 0.993750 6277 160.00 + 29.807 0.994531 6282 182.86 + 31.327 0.995313 6287 213.33 + 32.079 0.996094 6292 256.00 + 34.623 0.996484 6294 284.44 + 36.959 0.996875 6297 320.00 + 37.439 0.997266 6299 365.71 + 37.951 0.997656 6302 426.67 + 39.679 0.998047 6304 512.00 + 39.711 0.998242 6305 568.89 + 40.799 0.998437 6307 640.00 + 40.863 0.998633 6308 731.43 + 41.503 0.998828 6309 853.33 + 42.047 0.999023 6310 1024.00 + 42.431 0.999121 6311 1137.78 + 43.103 0.999219 6312 1280.00 + 43.103 0.999316 6312 1462.86 + 43.263 0.999414 6313 1706.67 + 43.263 0.999512 6313 2048.00 + 43.359 0.999561 6315 2275.56 + 43.359 0.999609 6315 2560.00 + 43.359 0.999658 6315 2925.71 + 43.359 0.999707 6315 3413.33 + 43.359 0.999756 6315 4096.00 + 43.359 0.999780 6315 4551.11 + 43.359 0.999805 6315 5120.00 + 43.359 0.999829 6315 5851.43 + 43.551 0.999854 6316 6826.67 + 43.551 1.000000 6316 inf +#[Mean = 2.427, StdDeviation = 4.167] +#[Max = 43.520, Total count = 6316] +#[Buckets = 27, SubBuckets = 2048] +---------------------------------------------------------- + +MacBook-Pro-Ulia:wrk2-arm yulalenk$ ./wrk -c 64 -d 30 -t 1 -L -R 1900 -s /Users/yulalenk/sem2/2024-highload-dht/src/main/java/ru/vk/itmo/test/alenkovayulya/lua/get.lua http://localhost:8080 +Running 30s test @ http://localhost:8080 + 1 threads and 64 connections + Thread calibration: mean lat.: 91.774ms, rate sampling interval: 793ms + Thread Stats Avg Stdev Max +/- Stdev + Latency 3.59ms 7.05ms 51.94ms 93.11% + Req/Sec 216.16 593.52 2.00k 88.00% + Latency Distribution (HdrHistogram - Recorded Latency) + 50.000% 1.65ms + 75.000% 2.35ms + 90.000% 4.43ms + 99.000% 38.46ms + 99.900% 50.88ms + 99.990% 51.97ms + 99.999% 51.97ms +100.000% 51.97ms + + Detailed Percentile spectrum: + Value Percentile TotalCount 1/(1-Percentile) + + 0.263 0.000000 1 1.00 + 0.898 0.100000 431 1.11 + 1.096 0.200000 859 1.25 + 1.284 0.300000 1288 1.43 + 1.470 0.400000 1714 1.67 + 1.653 0.500000 2143 2.00 + 1.750 0.550000 2359 2.22 + 1.876 0.600000 2573 2.50 + 2.002 0.650000 2785 2.86 + 2.165 0.700000 2999 3.33 + 2.351 0.750000 3214 4.00 + 2.467 0.775000 3321 4.44 + 2.611 0.800000 3429 5.00 + 2.753 0.825000 3536 5.71 + 2.929 0.850000 3642 6.67 + 3.297 0.875000 3749 8.00 + 3.699 0.887500 3803 8.89 + 4.431 0.900000 3856 10.00 + 5.959 0.912500 3910 11.43 + 8.495 0.925000 3963 13.33 + 13.023 0.937500 4017 16.00 + 16.847 0.943750 4044 17.78 + 20.271 0.950000 4070 20.00 + 22.479 0.956250 4097 22.86 + 24.671 0.962500 4124 26.67 + 28.191 0.968750 4151 32.00 + 29.455 0.971875 4164 35.56 + 30.463 0.975000 4177 40.00 + 32.095 0.978125 4191 45.71 + 34.463 0.981250 4204 53.33 + 35.743 0.984375 4218 64.00 + 36.191 0.985938 4224 71.11 + 37.119 0.987500 4231 80.00 + 37.823 0.989062 4238 91.43 + 38.943 0.990625 4244 106.67 + 40.063 0.992188 4251 128.00 + 40.543 0.992969 4254 142.22 + 40.927 0.993750 4258 160.00 + 42.399 0.994531 4261 182.86 + 43.167 0.995313 4264 213.33 + 44.127 0.996094 4268 256.00 + 44.447 0.996484 4269 284.44 + 46.399 0.996875 4271 320.00 + 46.975 0.997266 4273 365.71 + 47.807 0.997656 4274 426.67 + 48.991 0.998047 4276 512.00 + 50.143 0.998242 4277 568.89 + 50.495 0.998437 4278 640.00 + 50.719 0.998633 4279 731.43 + 50.719 0.998828 4279 853.33 + 50.879 0.999023 4280 1024.00 + 51.103 0.999121 4281 1137.78 + 51.103 0.999219 4281 1280.00 + 51.423 0.999316 4282 1462.86 + 51.423 0.999414 4282 1706.67 + 51.423 0.999512 4282 2048.00 + 51.711 0.999561 4283 2275.56 + 51.711 0.999609 4283 2560.00 + 51.711 0.999658 4283 2925.71 + 51.711 0.999707 4283 3413.33 + 51.711 0.999756 4283 4096.00 + 51.967 0.999780 4284 4551.11 + 51.967 1.000000 4284 inf +#[Mean = 3.589, StdDeviation = 7.046] +#[Max = 51.936, Total count = 4284] +#[Buckets = 27, SubBuckets = 2048] +---------------------------------------------------------- + +MacBook-Pro-Ulia:wrk2-arm yulalenk$ ./wrk -c 64 -d 30 -t 1 -L -R 2000 -s /Users/yulalenk/sem2/2024-highload-dht/src/main/java/ru/vk/itmo/test/alenkovayulya/lua/get.lua http://localhost:8080 +Running 30s test @ http://localhost:8080 + 1 threads and 64 connections + Thread calibration: mean lat.: 2.364ms, rate sampling interval: 10ms + Thread Stats Avg Stdev Max +/- Stdev + Latency 3.88ms 8.30ms 60.22ms 92.92% + Req/Sec 242.83 724.12 6.70k 89.10% + Latency Distribution (HdrHistogram - Recorded Latency) + 50.000% 1.61ms + 75.000% 2.31ms + 90.000% 4.50ms + 99.000% 45.50ms + 99.900% 55.20ms + 99.990% 60.26ms + 99.999% 60.26ms +100.000% 60.26ms + + Detailed Percentile spectrum: + Value Percentile TotalCount 1/(1-Percentile) + + 0.323 0.000000 1 1.00 + 0.830 0.100000 435 1.11 + 1.029 0.200000 869 1.25 + 1.211 0.300000 1306 1.43 + 1.400 0.400000 1738 1.67 + 1.609 0.500000 2170 2.00 + 1.710 0.550000 2386 2.22 + 1.803 0.600000 2603 2.50 + 1.932 0.650000 2821 2.86 + 2.105 0.700000 3039 3.33 + 2.305 0.750000 3257 4.00 + 2.425 0.775000 3364 4.44 + 2.537 0.800000 3471 5.00 + 2.701 0.825000 3579 5.71 + 2.867 0.850000 3688 6.67 + 3.233 0.875000 3796 8.00 + 3.629 0.887500 3850 8.89 + 4.535 0.900000 3906 10.00 + 6.003 0.912500 3960 11.43 + 9.783 0.925000 4013 13.33 + 16.799 0.937500 4067 16.00 + 19.599 0.943750 4094 17.78 + 22.703 0.950000 4122 20.00 + 25.279 0.956250 4149 22.86 + 29.279 0.962500 4176 26.67 + 32.959 0.968750 4203 32.00 + 35.199 0.971875 4216 35.56 + 36.959 0.975000 4230 40.00 + 39.103 0.978125 4244 45.71 + 41.055 0.981250 4257 53.33 + 42.719 0.984375 4271 64.00 + 43.711 0.985938 4277 71.11 + 44.639 0.987500 4284 80.00 + 45.215 0.989062 4291 91.43 + 45.887 0.990625 4298 106.67 + 46.559 0.992188 4305 128.00 + 47.135 0.992969 4308 142.22 + 47.487 0.993750 4311 160.00 + 48.223 0.994531 4315 182.86 + 49.183 0.995313 4319 213.33 + 49.695 0.996094 4322 256.00 + 50.687 0.996484 4323 284.44 + 51.391 0.996875 4325 320.00 + 53.119 0.997266 4327 365.71 + 53.663 0.997656 4328 426.67 + 53.823 0.998047 4330 512.00 + 53.887 0.998242 4331 568.89 + 54.015 0.998437 4332 640.00 + 55.199 0.998633 4334 731.43 + 55.199 0.998828 4334 853.33 + 55.199 0.999023 4334 1024.00 + 55.263 0.999121 4335 1137.78 + 55.263 0.999219 4335 1280.00 + 56.799 0.999316 4336 1462.86 + 56.799 0.999414 4336 1706.67 + 56.799 0.999512 4336 2048.00 + 57.663 0.999561 4337 2275.56 + 57.663 0.999609 4337 2560.00 + 57.663 0.999658 4337 2925.71 + 57.663 0.999707 4337 3413.33 + 57.663 0.999756 4337 4096.00 + 60.255 0.999780 4338 4551.11 + 60.255 1.000000 4338 inf +#[Mean = 3.879, StdDeviation = 8.304] +#[Max = 60.224, Total count = 4338] +#[Buckets = 27, SubBuckets = 2048] +---------------------------------------------------------- + + +MacBook-Pro-Ulia:wrk2-arm yulalenk$ ./wrk -c 64 -d 30 -t 1 -L -R 2100 -s /Users/yulalenk/sem2/2024-highload-dht/src/main/java/ru/vk/itmo/test/alenkovayulya/lua/get.lua http://localhost:8080 +Running 30s test @ http://localhost:8080 + 1 threads and 64 connections + Thread calibration: mean lat.: 427.846ms, rate sampling interval: 2807ms + Thread Stats Avg Stdev Max +/- Stdev + Latency 44.48ms 90.10ms 353.54ms 84.98% + Req/Sec 178.14 436.36 1.25k 85.71% + Latency Distribution (HdrHistogram - Recorded Latency) + 50.000% 1.87ms + 75.000% 15.03ms + 90.000% 206.85ms + 99.000% 339.71ms + 99.900% 353.02ms + 99.990% 353.79ms + 99.999% 353.79ms +100.000% 353.79ms + + Detailed Percentile spectrum: + Value Percentile TotalCount 1/(1-Percentile) + + 0.285 0.000000 1 1.00 + 0.895 0.100000 352 1.11 + 1.121 0.200000 703 1.25 + 1.346 0.300000 1051 1.43 + 1.589 0.400000 1402 1.67 + 1.871 0.500000 1751 2.00 + 2.045 0.550000 1926 2.22 + 2.303 0.600000 2101 2.50 + 2.613 0.650000 2276 2.86 + 3.645 0.700000 2451 3.33 + 15.031 0.750000 2626 4.00 + 29.791 0.775000 2714 4.44 + 57.951 0.800000 2801 5.00 + 96.255 0.825000 2889 5.71 + 135.039 0.850000 2977 6.67 + 169.215 0.875000 3064 8.00 + 189.567 0.887500 3109 8.89 + 206.847 0.900000 3151 10.00 + 224.767 0.912500 3195 11.43 + 245.503 0.925000 3239 13.33 + 262.399 0.937500 3283 16.00 + 273.407 0.943750 3305 17.78 + 281.343 0.950000 3327 20.00 + 290.559 0.956250 3348 22.86 + 300.799 0.962500 3370 26.67 + 307.967 0.968750 3392 32.00 + 314.367 0.971875 3403 35.56 + 318.975 0.975000 3414 40.00 + 324.351 0.978125 3425 45.71 + 326.911 0.981250 3436 53.33 + 329.983 0.984375 3447 64.00 + 333.055 0.985938 3453 71.11 + 334.847 0.987500 3458 80.00 + 337.407 0.989062 3464 91.43 + 341.503 0.990625 3469 106.67 + 342.783 0.992188 3474 128.00 + 344.063 0.992969 3477 142.22 + 345.599 0.993750 3480 160.00 + 346.367 0.994531 3482 182.86 + 348.671 0.995313 3485 213.33 + 349.439 0.996094 3488 256.00 + 350.719 0.996484 3489 284.44 + 351.487 0.996875 3491 320.00 + 351.743 0.997266 3494 365.71 + 351.743 0.997656 3494 426.67 + 352.511 0.998047 3495 512.00 + 352.511 0.998242 3495 568.89 + 352.767 0.998437 3496 640.00 + 353.023 0.998633 3498 731.43 + 353.023 0.998828 3498 853.33 + 353.023 0.999023 3498 1024.00 + 353.023 0.999121 3498 1137.78 + 353.535 0.999219 3499 1280.00 + 353.535 0.999316 3499 1462.86 + 353.535 0.999414 3499 1706.67 + 353.791 0.999512 3501 2048.00 + 353.791 1.000000 3501 inf +#[Mean = 44.484, StdDeviation = 90.098] +#[Max = 353.536, Total count = 3501] +#[Buckets = 27, SubBuckets = 2048] +---------------------------------------------------------- + diff --git a/src/main/java/ru/vk/itmo/test/alenkovayulya/results_stage4/wrk2_put.txt b/src/main/java/ru/vk/itmo/test/alenkovayulya/results_stage4/wrk2_put.txt new file mode 100644 index 000000000..54e566a6b --- /dev/null +++ b/src/main/java/ru/vk/itmo/test/alenkovayulya/results_stage4/wrk2_put.txt @@ -0,0 +1,347 @@ +MacBook-Pro-Ulia:wrk2-arm yulalenk$ ./wrk -c 64 -d 20 -t 1 -L -R 1000 -s /Users/yulalenk/sem2/2024-highload-dht/src/main/java/ru/vk/itmo/test/alenkovayulya/lua/put.lua http://localhost:8080 +Running 20s test @ http://localhost:8080 + 1 threads and 64 connections + Thread calibration: mean lat.: 2.052ms, rate sampling interval: 10ms + Thread Stats Avg Stdev Max +/- Stdev + Latency 2.36ms 2.91ms 32.83ms 94.77% + Req/Sec 1.06k 317.45 4.33k 89.24% + Latency Distribution (HdrHistogram - Recorded Latency) + 50.000% 1.69ms + 75.000% 2.29ms + 90.000% 3.28ms + 99.000% 18.75ms + 99.900% 27.60ms + 99.990% 32.16ms + 99.999% 32.86ms +100.000% 32.86ms + + Detailed Percentile spectrum: + Value Percentile TotalCount 1/(1-Percentile) + + 0.264 0.000000 1 1.00 + 0.968 0.100000 971 1.11 + 1.160 0.200000 1936 1.25 + 1.337 0.300000 2908 1.43 + 1.507 0.400000 3877 1.67 + 1.686 0.500000 4845 2.00 + 1.775 0.550000 5325 2.22 + 1.876 0.600000 5812 2.50 + 1.994 0.650000 6292 2.86 + 2.129 0.700000 6780 3.33 + 2.289 0.750000 7264 4.00 + 2.375 0.775000 7507 4.44 + 2.477 0.800000 7748 5.00 + 2.595 0.825000 7988 5.71 + 2.763 0.850000 8230 6.67 + 2.955 0.875000 8471 8.00 + 3.077 0.887500 8591 8.89 + 3.281 0.900000 8714 10.00 + 3.541 0.912500 8833 11.43 + 3.889 0.925000 8954 13.33 + 4.491 0.937500 9077 16.00 + 4.975 0.943750 9136 17.78 + 5.535 0.950000 9197 20.00 + 6.483 0.956250 9257 22.86 + 7.955 0.962500 9317 26.67 + 9.639 0.968750 9378 32.00 + 10.703 0.971875 9408 35.56 + 11.719 0.975000 9438 40.00 + 12.639 0.978125 9469 45.71 + 14.023 0.981250 9499 53.33 + 15.287 0.984375 9529 64.00 + 16.095 0.985938 9544 71.11 + 17.071 0.987500 9559 80.00 + 18.255 0.989062 9575 91.43 + 19.167 0.990625 9590 106.67 + 19.919 0.992188 9605 128.00 + 20.399 0.992969 9613 142.22 + 21.071 0.993750 9620 160.00 + 21.919 0.994531 9628 182.86 + 22.255 0.995313 9635 213.33 + 22.975 0.996094 9643 256.00 + 23.167 0.996484 9646 284.44 + 23.583 0.996875 9650 320.00 + 24.063 0.997266 9654 365.71 + 24.591 0.997656 9658 426.67 + 25.263 0.998047 9662 512.00 + 25.535 0.998242 9663 568.89 + 25.871 0.998437 9665 640.00 + 26.895 0.998633 9668 731.43 + 27.471 0.998828 9669 853.33 + 27.871 0.999023 9671 1024.00 + 28.095 0.999121 9672 1137.78 + 28.799 0.999219 9673 1280.00 + 28.831 0.999316 9674 1462.86 + 28.975 0.999414 9675 1706.67 + 29.503 0.999512 9676 2048.00 + 29.503 0.999561 9676 2275.56 + 30.879 0.999609 9677 2560.00 + 30.879 0.999658 9677 2925.71 + 31.359 0.999707 9678 3413.33 + 31.359 0.999756 9678 4096.00 + 31.359 0.999780 9678 4551.11 + 32.159 0.999805 9679 5120.00 + 32.159 0.999829 9679 5851.43 + 32.159 0.999854 9679 6826.67 + 32.159 0.999878 9679 8192.00 + 32.159 0.999890 9679 9102.22 + 32.863 0.999902 9680 10240.00 + 32.863 1.000000 9680 inf +#[Mean = 2.357, StdDeviation = 2.912] +#[Max = 32.832, Total count = 9680] +#[Buckets = 27, SubBuckets = 2048] +---------------------------------------------------------- + + +MacBook-Pro-Ulia:wrk2-arm yulalenk$ ./wrk -c 64 -d 20 -t 1 -L -R 2000 -s /Users/yulalenk/sem2/2024-highload-dht/src/main/java/ru/vk/itmo/test/alenkovayulya/lua/put.lua http://localhost:8080 +Running 20s test @ http://localhost:8080 + 1 threads and 64 connections + Thread calibration: mean lat.: 2.810ms, rate sampling interval: 10ms + Thread Stats Avg Stdev Max +/- Stdev + Latency 3.20ms 6.99ms 57.41ms 94.57% + Req/Sec 461.72 0.94k 9.44k 79.51% + Latency Distribution (HdrHistogram - Recorded Latency) + 50.000% 1.53ms + 75.000% 2.14ms + 90.000% 3.03ms + 99.000% 42.34ms + 99.900% 53.44ms + 99.990% 57.44ms + 99.999% 57.44ms +100.000% 57.44ms + + Detailed Percentile spectrum: + Value Percentile TotalCount 1/(1-Percentile) + + 0.342 0.000000 1 1.00 + 0.851 0.100000 415 1.11 + 1.037 0.200000 830 1.25 + 1.191 0.300000 1244 1.43 + 1.356 0.400000 1661 1.67 + 1.531 0.500000 2074 2.00 + 1.628 0.550000 2280 2.22 + 1.740 0.600000 2488 2.50 + 1.860 0.650000 2694 2.86 + 1.988 0.700000 2902 3.33 + 2.139 0.750000 3108 4.00 + 2.229 0.775000 3212 4.44 + 2.327 0.800000 3317 5.00 + 2.455 0.825000 3419 5.71 + 2.595 0.850000 3523 6.67 + 2.763 0.875000 3627 8.00 + 2.875 0.887500 3678 8.89 + 3.033 0.900000 3731 10.00 + 3.289 0.912500 3782 11.43 + 3.823 0.925000 3834 13.33 + 6.655 0.937500 3885 16.00 + 9.167 0.943750 3911 17.78 + 13.167 0.950000 3937 20.00 + 17.951 0.956250 3963 22.86 + 21.647 0.962500 3989 26.67 + 25.711 0.968750 4015 32.00 + 27.583 0.971875 4028 35.56 + 29.839 0.975000 4041 40.00 + 31.391 0.978125 4054 45.71 + 33.471 0.981250 4067 53.33 + 36.255 0.984375 4080 64.00 + 38.335 0.985938 4086 71.11 + 40.031 0.987500 4093 80.00 + 41.567 0.989062 4099 91.43 + 43.167 0.990625 4106 106.67 + 45.055 0.992188 4112 128.00 + 46.079 0.992969 4115 142.22 + 46.751 0.993750 4119 160.00 + 47.967 0.994531 4122 182.86 + 48.447 0.995313 4125 213.33 + 49.599 0.996094 4128 256.00 + 49.983 0.996484 4130 284.44 + 50.911 0.996875 4132 320.00 + 51.039 0.997266 4133 365.71 + 51.359 0.997656 4135 426.67 + 51.455 0.998047 4136 512.00 + 52.031 0.998242 4137 568.89 + 53.055 0.998437 4138 640.00 + 53.087 0.998633 4139 731.43 + 53.439 0.998828 4140 853.33 + 53.439 0.999023 4140 1024.00 + 55.103 0.999121 4141 1137.78 + 55.103 0.999219 4141 1280.00 + 55.327 0.999316 4142 1462.86 + 55.327 0.999414 4142 1706.67 + 55.327 0.999512 4142 2048.00 + 56.319 0.999561 4143 2275.56 + 56.319 0.999609 4143 2560.00 + 56.319 0.999658 4143 2925.71 + 56.319 0.999707 4143 3413.33 + 56.319 0.999756 4143 4096.00 + 57.439 0.999780 4144 4551.11 + 57.439 1.000000 4144 inf +#[Mean = 3.196, StdDeviation = 6.995] +#[Max = 57.408, Total count = 4144] +#[Buckets = 27, SubBuckets = 2048] +---------------------------------------------------------- + +MacBook-Pro-Ulia:wrk2-arm yulalenk$ ./wrk -c 64 -d 20 -t 1 -L -R 2300 -s /Users/yulalenk/sem2/2024-highload-dht/src/main/java/ru/vk/itmo/test/alenkovayulya/lua/put.lua http://localhost:8080 +Running 20s test @ http://localhost:8080 + 1 threads and 64 connections + Thread calibration: mean lat.: 3.310ms, rate sampling interval: 10ms + Thread Stats Avg Stdev Max +/- Stdev + Latency 8.29ms 14.47ms 65.12ms 85.34% + Req/Sec 123.28 630.90 9.55k 95.01% + Latency Distribution (HdrHistogram - Recorded Latency) + 50.000% 1.80ms + 75.000% 3.32ms + 90.000% 33.76ms + 99.000% 60.48ms + 99.900% 63.65ms + 99.990% 65.15ms + 99.999% 65.15ms +100.000% 65.15ms + + Detailed Percentile spectrum: + Value Percentile TotalCount 1/(1-Percentile) + + 0.378 0.000000 1 1.00 + 0.851 0.100000 110 1.11 + 1.121 0.200000 220 1.25 + 1.337 0.300000 330 1.43 + 1.544 0.400000 440 1.67 + 1.805 0.500000 550 2.00 + 1.915 0.550000 604 2.22 + 2.109 0.600000 659 2.50 + 2.313 0.650000 714 2.86 + 2.625 0.700000 769 3.33 + 3.317 0.750000 824 4.00 + 5.383 0.775000 851 4.44 + 10.831 0.800000 879 5.00 + 15.855 0.825000 906 5.71 + 22.383 0.850000 934 6.67 + 27.967 0.875000 961 8.00 + 30.623 0.887500 975 8.89 + 33.823 0.900000 989 10.00 + 37.183 0.912500 1002 11.43 + 38.623 0.925000 1016 13.33 + 41.151 0.937500 1030 16.00 + 42.271 0.943750 1037 17.78 + 43.903 0.950000 1044 20.00 + 45.439 0.956250 1050 22.86 + 47.231 0.962500 1057 26.67 + 49.151 0.968750 1064 32.00 + 51.295 0.971875 1068 35.56 + 53.343 0.975000 1071 40.00 + 54.175 0.978125 1074 45.71 + 55.583 0.981250 1078 53.33 + 57.951 0.984375 1081 64.00 + 58.847 0.985938 1083 71.11 + 60.319 0.987500 1085 80.00 + 60.351 0.989062 1086 91.43 + 60.895 0.990625 1088 106.67 + 61.183 0.992188 1090 128.00 + 61.343 0.992969 1091 142.22 + 61.759 0.993750 1092 160.00 + 61.759 0.994531 1092 182.86 + 62.047 0.995313 1093 213.33 + 62.079 0.996094 1094 256.00 + 62.111 0.996484 1095 284.44 + 62.111 0.996875 1095 320.00 + 62.111 0.997266 1095 365.71 + 63.039 0.997656 1096 426.67 + 63.039 0.998047 1096 512.00 + 63.647 0.998242 1097 568.89 + 63.647 0.998437 1097 640.00 + 63.647 0.998633 1097 731.43 + 63.647 0.998828 1097 853.33 + 63.647 0.999023 1097 1024.00 + 65.151 0.999121 1098 1137.78 + 65.151 1.000000 1098 inf +#[Mean = 8.289, StdDeviation = 14.467] +#[Max = 65.120, Total count = 1098] +#[Buckets = 27, SubBuckets = 2048] +---------------------------------------------------------- + + +MacBook-Pro-Ulia:wrk2-arm yulalenk$ ./wrk -c 64 -d 20 -t 1 -L -R 2500 -s /Users/yulalenk/sem2/2024-highload-dht/src/main/java/ru/vk/itmo/test/alenkovayulya/lua/put.lua http://localhost:8080 +Running 20s test @ http://localhost:8080 + 1 threads and 64 connections + Thread calibration: mean lat.: 114.079ms, rate sampling interval: 1102ms + Thread Stats Avg Stdev Max +/- Stdev + Latency 1.70s 443.71ms 2.19s 88.83% + Req/Sec 376.33 1.06k 3.39k 88.89% + Latency Distribution (HdrHistogram - Recorded Latency) + 50.000% 1.78s + 75.000% 1.98s + 90.000% 2.09s + 99.000% 2.17s + 99.900% 2.19s + 99.990% 2.19s + 99.999% 2.19s +100.000% 2.19s + + Detailed Percentile spectrum: + Value Percentile TotalCount 1/(1-Percentile) + + 0.425 0.000000 1 1.00 + 1487.871 0.100000 376 1.11 + 1551.359 0.200000 747 1.25 + 1629.183 0.300000 1120 1.43 + 1707.007 0.400000 1495 1.67 + 1784.831 0.500000 1868 2.00 + 1821.695 0.550000 2056 2.22 + 1860.607 0.600000 2244 2.50 + 1898.495 0.650000 2428 2.86 + 1938.431 0.700000 2615 3.33 + 1976.319 0.750000 2807 4.00 + 1994.751 0.775000 2895 4.44 + 2015.231 0.800000 2993 5.00 + 2033.663 0.825000 3083 5.71 + 2053.119 0.850000 3179 6.67 + 2071.551 0.875000 3271 8.00 + 2080.767 0.887500 3315 8.89 + 2091.007 0.900000 3367 10.00 + 2101.247 0.912500 3411 11.43 + 2111.487 0.925000 3464 13.33 + 2119.679 0.937500 3510 16.00 + 2123.775 0.943750 3524 17.78 + 2129.919 0.950000 3552 20.00 + 2134.015 0.956250 3571 22.86 + 2142.207 0.962500 3598 26.67 + 2148.351 0.968750 3622 32.00 + 2150.399 0.971875 3631 35.56 + 2154.495 0.975000 3641 40.00 + 2156.543 0.978125 3654 45.71 + 2160.639 0.981250 3667 53.33 + 2162.687 0.984375 3675 64.00 + 2164.735 0.985938 3684 71.11 + 2166.783 0.987500 3689 80.00 + 2168.831 0.989062 3697 91.43 + 2170.879 0.990625 3702 106.67 + 2172.927 0.992188 3707 128.00 + 2172.927 0.992969 3707 142.22 + 2174.975 0.993750 3712 160.00 + 2177.023 0.994531 3716 182.86 + 2177.023 0.995313 3716 213.33 + 2179.071 0.996094 3719 256.00 + 2181.119 0.996484 3720 284.44 + 2183.167 0.996875 3725 320.00 + 2183.167 0.997266 3725 365.71 + 2183.167 0.997656 3725 426.67 + 2185.215 0.998047 3727 512.00 + 2185.215 0.998242 3727 568.89 + 2187.263 0.998437 3731 640.00 + 2187.263 0.998633 3731 731.43 + 2187.263 0.998828 3731 853.33 + 2187.263 0.999023 3731 1024.00 + 2187.263 0.999121 3731 1137.78 + 2187.263 0.999219 3731 1280.00 + 2187.263 0.999316 3731 1462.86 + 2187.263 0.999414 3731 1706.67 + 2189.311 0.999512 3733 2048.00 + 2189.311 1.000000 3733 inf +#[Mean = 1701.778, StdDeviation = 443.705] +#[Max = 2187.264, Total count = 3733] +#[Buckets = 27, SubBuckets = 2048] +---------------------------------------------------------- + + + + diff --git a/src/main/java/ru/vk/itmo/test/alenkovayulya/results_stage5/asprof-get-alloc.png b/src/main/java/ru/vk/itmo/test/alenkovayulya/results_stage5/asprof-get-alloc.png new file mode 100644 index 000000000..78799bf51 Binary files /dev/null and b/src/main/java/ru/vk/itmo/test/alenkovayulya/results_stage5/asprof-get-alloc.png differ diff --git a/src/main/java/ru/vk/itmo/test/alenkovayulya/results_stage5/asprof-get-cpu.png b/src/main/java/ru/vk/itmo/test/alenkovayulya/results_stage5/asprof-get-cpu.png new file mode 100644 index 000000000..4316bdc5f Binary files /dev/null and b/src/main/java/ru/vk/itmo/test/alenkovayulya/results_stage5/asprof-get-cpu.png differ diff --git a/src/main/java/ru/vk/itmo/test/alenkovayulya/results_stage5/asprof-get-lock.png b/src/main/java/ru/vk/itmo/test/alenkovayulya/results_stage5/asprof-get-lock.png new file mode 100644 index 000000000..e8c60f5c6 Binary files /dev/null and b/src/main/java/ru/vk/itmo/test/alenkovayulya/results_stage5/asprof-get-lock.png differ diff --git a/src/main/java/ru/vk/itmo/test/alenkovayulya/results_stage5/asprof-put-alloc.png b/src/main/java/ru/vk/itmo/test/alenkovayulya/results_stage5/asprof-put-alloc.png new file mode 100644 index 000000000..0b5d86723 Binary files /dev/null and b/src/main/java/ru/vk/itmo/test/alenkovayulya/results_stage5/asprof-put-alloc.png differ diff --git a/src/main/java/ru/vk/itmo/test/alenkovayulya/results_stage5/asprof-put-cpu.png b/src/main/java/ru/vk/itmo/test/alenkovayulya/results_stage5/asprof-put-cpu.png new file mode 100644 index 000000000..6021bd3a9 Binary files /dev/null and b/src/main/java/ru/vk/itmo/test/alenkovayulya/results_stage5/asprof-put-cpu.png differ diff --git a/src/main/java/ru/vk/itmo/test/alenkovayulya/results_stage5/asprof-put-lock.png b/src/main/java/ru/vk/itmo/test/alenkovayulya/results_stage5/asprof-put-lock.png new file mode 100644 index 000000000..6ea6526fd Binary files /dev/null and b/src/main/java/ru/vk/itmo/test/alenkovayulya/results_stage5/asprof-put-lock.png differ diff --git a/src/main/java/ru/vk/itmo/test/alenkovayulya/results_stage5/html/asprof-get-alloc.html b/src/main/java/ru/vk/itmo/test/alenkovayulya/results_stage5/html/asprof-get-alloc.html new file mode 100644 index 000000000..c18da602b --- /dev/null +++ b/src/main/java/ru/vk/itmo/test/alenkovayulya/results_stage5/html/asprof-get-alloc.html @@ -0,0 +1,3464 @@ + + + + + + + +

Allocation profile

+
  
+
Produced by async-profiler
+ +
+

+

Matched:

+ diff --git a/src/main/java/ru/vk/itmo/test/alenkovayulya/results_stage5/html/asprof-get-cpu.html b/src/main/java/ru/vk/itmo/test/alenkovayulya/results_stage5/html/asprof-get-cpu.html new file mode 100644 index 000000000..6d38fad19 --- /dev/null +++ b/src/main/java/ru/vk/itmo/test/alenkovayulya/results_stage5/html/asprof-get-cpu.html @@ -0,0 +1,2883 @@ + + + + + + + +

CPU profile

+
  
+
Produced by async-profiler
+ +
+

+

Matched:

+ diff --git a/src/main/java/ru/vk/itmo/test/alenkovayulya/results_stage5/html/asprof-get-lock.html b/src/main/java/ru/vk/itmo/test/alenkovayulya/results_stage5/html/asprof-get-lock.html new file mode 100644 index 000000000..bed89f9df --- /dev/null +++ b/src/main/java/ru/vk/itmo/test/alenkovayulya/results_stage5/html/asprof-get-lock.html @@ -0,0 +1,872 @@ + + + + + + + +

Lock profile

+
  
+
Produced by async-profiler
+ +
+

+

Matched:

+ diff --git a/src/main/java/ru/vk/itmo/test/alenkovayulya/results_stage5/html/asprof-put-alloc.html b/src/main/java/ru/vk/itmo/test/alenkovayulya/results_stage5/html/asprof-put-alloc.html new file mode 100644 index 000000000..ba2a256b5 --- /dev/null +++ b/src/main/java/ru/vk/itmo/test/alenkovayulya/results_stage5/html/asprof-put-alloc.html @@ -0,0 +1,3437 @@ + + + + + + + +

Allocation profile

+
  
+
Produced by async-profiler
+ +
+

+

Matched:

+ diff --git a/src/main/java/ru/vk/itmo/test/alenkovayulya/results_stage5/html/asprof-put-cpu.html b/src/main/java/ru/vk/itmo/test/alenkovayulya/results_stage5/html/asprof-put-cpu.html new file mode 100644 index 000000000..9dec540b4 --- /dev/null +++ b/src/main/java/ru/vk/itmo/test/alenkovayulya/results_stage5/html/asprof-put-cpu.html @@ -0,0 +1,3270 @@ +put-alloc.html + + + + + + +

CPU profile

+
  
+
Produced by async-profiler
+ +
+

+

Matched:

+ diff --git a/src/main/java/ru/vk/itmo/test/alenkovayulya/results_stage5/html/asprof-put-lock.html b/src/main/java/ru/vk/itmo/test/alenkovayulya/results_stage5/html/asprof-put-lock.html new file mode 100644 index 000000000..36fdbf4c7 --- /dev/null +++ b/src/main/java/ru/vk/itmo/test/alenkovayulya/results_stage5/html/asprof-put-lock.html @@ -0,0 +1,1017 @@ + + + + + + + +

Lock profile

+
  
+
Produced by async-profiler
+ +
+

+

Matched:

+ diff --git a/src/main/java/ru/vk/itmo/test/alenkovayulya/results_stage5/wrk2_get.txt b/src/main/java/ru/vk/itmo/test/alenkovayulya/results_stage5/wrk2_get.txt new file mode 100644 index 000000000..eefd88bcf --- /dev/null +++ b/src/main/java/ru/vk/itmo/test/alenkovayulya/results_stage5/wrk2_get.txt @@ -0,0 +1,340 @@ +MacBook-Pro-Ulia:wrk2-arm yulalenk$ ./wrk -c 64 -d 30 -t 1 -L -R 5000 -s /Users/yulalenk/sem2/2024-highload-dht/src/main/java/ru/vk/itmo/test/alenkovayulya/lua/get.lua http://localhost:8080 +Running 30s test @ http://localhost:8080 + 1 threads and 64 connections + Thread calibration: mean lat.: 1.556ms, rate sampling interval: 10ms + Thread Stats Avg Stdev Max +/- Stdev + Latency 1.55ms 0.95ms 12.30ms 85.64% + Req/Sec 5.27k 650.72 11.00k 83.20% + Latency Distribution (HdrHistogram - Recorded Latency) + 50.000% 1.35ms + 75.000% 1.88ms + 90.000% 2.43ms + 99.000% 5.65ms + 99.900% 8.60ms + 99.990% 10.94ms + 99.999% 12.27ms +100.000% 12.31ms + + Detailed Percentile spectrum: + Value Percentile TotalCount 1/(1-Percentile) + + 0.252 0.000000 1 1.00 + 0.704 0.100000 9869 1.11 + 0.881 0.200000 19710 1.25 + 1.038 0.300000 29571 1.43 + 1.187 0.400000 39361 1.67 + 1.346 0.500000 49256 2.00 + 1.430 0.550000 54148 2.22 + 1.525 0.600000 59086 2.50 + 1.631 0.650000 63960 2.86 + 1.749 0.700000 68908 3.33 + 1.878 0.750000 73833 4.00 + 1.943 0.775000 76294 4.44 + 2.014 0.800000 78726 5.00 + 2.091 0.825000 81208 5.71 + 2.179 0.850000 83669 6.67 + 2.289 0.875000 86143 8.00 + 2.351 0.887500 87352 8.89 + 2.429 0.900000 88570 10.00 + 2.521 0.912500 89790 11.43 + 2.633 0.925000 91023 13.33 + 2.791 0.937500 92251 16.00 + 2.889 0.943750 92875 17.78 + 3.019 0.950000 93493 20.00 + 3.189 0.956250 94099 22.86 + 3.415 0.962500 94712 26.67 + 3.715 0.968750 95327 32.00 + 3.907 0.971875 95634 35.56 + 4.111 0.975000 95942 40.00 + 4.347 0.978125 96248 45.71 + 4.595 0.981250 96558 53.33 + 4.915 0.984375 96863 64.00 + 5.091 0.985938 97019 71.11 + 5.299 0.987500 97170 80.00 + 5.503 0.989062 97327 91.43 + 5.767 0.990625 97479 106.67 + 6.091 0.992188 97635 128.00 + 6.267 0.992969 97709 142.22 + 6.431 0.993750 97785 160.00 + 6.599 0.994531 97864 182.86 + 6.807 0.995313 97939 213.33 + 7.023 0.996094 98016 256.00 + 7.207 0.996484 98055 284.44 + 7.355 0.996875 98093 320.00 + 7.531 0.997266 98131 365.71 + 7.719 0.997656 98170 426.67 + 7.943 0.998047 98208 512.00 + 8.099 0.998242 98228 568.89 + 8.207 0.998437 98247 640.00 + 8.295 0.998633 98266 731.43 + 8.479 0.998828 98285 853.33 + 8.607 0.999023 98304 1024.00 + 8.695 0.999121 98314 1137.78 + 8.831 0.999219 98324 1280.00 + 8.983 0.999316 98333 1462.86 + 9.127 0.999414 98343 1706.67 + 9.295 0.999512 98352 2048.00 + 9.399 0.999561 98357 2275.56 + 9.551 0.999609 98362 2560.00 + 9.919 0.999658 98367 2925.71 + 10.023 0.999707 98372 3413.33 + 10.223 0.999756 98376 4096.00 + 10.319 0.999780 98379 4551.11 + 10.343 0.999805 98381 5120.00 + 10.551 0.999829 98384 5851.43 + 10.639 0.999854 98386 6826.67 + 10.863 0.999878 98388 8192.00 + 10.943 0.999890 98390 9102.22 + 10.983 0.999902 98391 10240.00 + 10.999 0.999915 98392 11702.86 + 11.407 0.999927 98393 13653.33 + 11.423 0.999939 98394 16384.00 + 11.535 0.999945 98395 18204.44 + 11.623 0.999951 98396 20480.00 + 11.623 0.999957 98396 23405.71 + 11.935 0.999963 98397 27306.67 + 11.935 0.999969 98397 32768.00 + 12.095 0.999973 98398 36408.89 + 12.095 0.999976 98398 40960.00 + 12.095 0.999979 98398 46811.43 + 12.271 0.999982 98399 54613.33 + 12.271 0.999985 98399 65536.00 + 12.271 0.999986 98399 72817.78 + 12.271 0.999988 98399 81920.00 + 12.271 0.999989 98399 93622.86 + 12.311 0.999991 98400 109226.67 + 12.311 1.000000 98400 inf +#[Mean = 1.546, StdDeviation = 0.951] +#[Max = 12.304, Total count = 98400] +#[Buckets = 27, SubBuckets = 2048] +---------------------------------------------------------- + +MacBook-Pro-Ulia:wrk2-arm yulalenk$ ./wrk -c 64 -d 30 -t 1 -L -R 8000 -s /Users/yulalenk/sem2/2024-highload-dht/src/main/java/ru/vk/itmo/test/alenkovayulya/lua/get.lua http://localhost:8080 +Running 30s test @ http://localhost:8080 + 1 threads and 64 connections + Thread calibration: mean lat.: 2.019ms, rate sampling interval: 10ms + Thread Stats Avg Stdev Max +/- Stdev + Latency 1.85ms 1.27ms 32.19ms 89.26% + Req/Sec 8.47k 1.09k 14.67k 80.08% + Latency Distribution (HdrHistogram - Recorded Latency) + 50.000% 1.60ms + 75.000% 2.23ms + 90.000% 3.01ms + 99.000% 6.43ms + 99.900% 16.41ms + 99.990% 23.26ms + 99.999% 27.97ms +100.000% 32.21ms + + Detailed Percentile spectrum: + Value Percentile TotalCount 1/(1-Percentile) + + 0.270 0.000000 1 1.00 + 0.823 0.100000 15781 1.11 + 1.052 0.200000 31516 1.25 + 1.254 0.300000 47294 1.43 + 1.428 0.400000 63026 1.67 + 1.601 0.500000 78723 2.00 + 1.695 0.550000 86618 2.22 + 1.801 0.600000 94546 2.50 + 1.920 0.650000 102365 2.86 + 2.063 0.700000 110309 3.33 + 2.229 0.750000 118165 4.00 + 2.321 0.775000 122037 4.44 + 2.423 0.800000 125960 5.00 + 2.541 0.825000 129922 5.71 + 2.675 0.850000 133886 6.67 + 2.823 0.875000 137786 8.00 + 2.911 0.887500 139741 8.89 + 3.011 0.900000 141739 10.00 + 3.117 0.912500 143675 11.43 + 3.233 0.925000 145657 13.33 + 3.363 0.937500 147612 16.00 + 3.441 0.943750 148606 17.78 + 3.529 0.950000 149594 20.00 + 3.637 0.956250 150567 22.86 + 3.803 0.962500 151547 26.67 + 4.055 0.968750 152526 32.00 + 4.227 0.971875 153025 35.56 + 4.419 0.975000 153514 40.00 + 4.667 0.978125 154006 45.71 + 4.967 0.981250 154496 53.33 + 5.379 0.984375 154988 64.00 + 5.615 0.985938 155232 71.11 + 5.899 0.987500 155478 80.00 + 6.219 0.989062 155725 91.43 + 6.611 0.990625 155970 106.67 + 7.075 0.992188 156217 128.00 + 7.359 0.992969 156340 142.22 + 7.647 0.993750 156462 160.00 + 8.095 0.994531 156586 182.86 + 8.503 0.995313 156708 213.33 + 9.215 0.996094 156833 256.00 + 9.623 0.996484 156893 284.44 + 10.191 0.996875 156954 320.00 + 10.855 0.997266 157016 365.71 + 11.711 0.997656 157077 426.67 + 12.759 0.998047 157139 512.00 + 13.527 0.998242 157170 568.89 + 13.943 0.998437 157200 640.00 + 14.711 0.998633 157231 731.43 + 15.487 0.998828 157263 853.33 + 16.575 0.999023 157294 1024.00 + 17.279 0.999121 157308 1137.78 + 17.951 0.999219 157323 1280.00 + 18.367 0.999316 157339 1462.86 + 18.751 0.999414 157354 1706.67 + 19.375 0.999512 157370 2048.00 + 19.551 0.999561 157377 2275.56 + 20.015 0.999609 157385 2560.00 + 20.463 0.999658 157393 2925.71 + 21.039 0.999707 157400 3413.33 + 21.279 0.999756 157408 4096.00 + 21.423 0.999780 157412 4551.11 + 21.519 0.999805 157416 5120.00 + 22.079 0.999829 157420 5851.43 + 22.223 0.999854 157423 6826.67 + 22.831 0.999878 157427 8192.00 + 23.167 0.999890 157429 9102.22 + 23.359 0.999902 157431 10240.00 + 23.887 0.999915 157433 11702.86 + 24.287 0.999927 157435 13653.33 + 24.463 0.999939 157437 16384.00 + 24.575 0.999945 157438 18204.44 + 24.591 0.999951 157439 20480.00 + 24.671 0.999957 157440 23405.71 + 25.615 0.999963 157441 27306.67 + 25.711 0.999969 157442 32768.00 + 25.711 0.999973 157442 36408.89 + 26.319 0.999976 157443 40960.00 + 26.319 0.999979 157443 46811.43 + 27.967 0.999982 157444 54613.33 + 27.967 0.999985 157444 65536.00 + 27.967 0.999986 157444 72817.78 + 28.015 0.999988 157445 81920.00 + 28.015 0.999989 157445 93622.86 + 28.015 0.999991 157445 109226.67 + 28.015 0.999992 157445 131072.00 + 28.015 0.999993 157445 145635.56 + 32.207 0.999994 157446 163840.00 + 32.207 1.000000 157446 inf +#[Mean = 1.854, StdDeviation = 1.271] +#[Max = 32.192, Total count = 157446] +#[Buckets = 27, SubBuckets = 2048] +---------------------------------------------------------- + +MacBook-Pro-Ulia:wrk2-arm yulalenk$ ./wrk -c 64 -d 30 -t 1 -L -R 10000 -s /Users/yulalenk/sem2/2024-highload-dht/src/main/java/ru/vk/itmo/test/alenkovayulya/lua/get.lua http://localhost:8080 +Running 30s test @ http://localhost:8080 + 1 threads and 64 connections + Thread calibration: mean lat.: 71.319ms, rate sampling interval: 627ms + Thread Stats Avg Stdev Max +/- Stdev + Latency 2.80ms 4.02ms 95.17ms 95.85% + Req/Sec 10.02k 97.62 10.51k 93.55% + Latency Distribution (HdrHistogram - Recorded Latency) + 50.000% 1.97ms + 75.000% 2.77ms + 90.000% 4.17ms + 99.000% 23.98ms + 99.900% 51.87ms + 99.990% 85.25ms + 99.999% 93.18ms +100.000% 95.23ms + + Detailed Percentile spectrum: + Value Percentile TotalCount 1/(1-Percentile) + + 0.307 0.000000 1 1.00 + 1.075 0.100000 19781 1.11 + 1.337 0.200000 39487 1.25 + 1.555 0.300000 59144 1.43 + 1.757 0.400000 78900 1.67 + 1.972 0.500000 98625 2.00 + 2.089 0.550000 108531 2.22 + 2.217 0.600000 118312 2.50 + 2.365 0.650000 128137 2.86 + 2.543 0.700000 138028 3.33 + 2.769 0.750000 147839 4.00 + 2.909 0.775000 152816 4.44 + 3.073 0.800000 157703 5.00 + 3.263 0.825000 162648 5.71 + 3.481 0.850000 167574 6.67 + 3.755 0.875000 172476 8.00 + 3.939 0.887500 174949 8.89 + 4.175 0.900000 177423 10.00 + 4.467 0.912500 179889 11.43 + 4.843 0.925000 182344 13.33 + 5.383 0.937500 184800 16.00 + 5.735 0.943750 186032 17.78 + 6.127 0.950000 187257 20.00 + 6.603 0.956250 188492 22.86 + 7.307 0.962500 189722 26.67 + 8.311 0.968750 190954 32.00 + 9.039 0.971875 191575 35.56 + 10.039 0.975000 192188 40.00 + 11.575 0.978125 192801 45.71 + 13.871 0.981250 193416 53.33 + 17.263 0.984375 194033 64.00 + 19.167 0.985938 194340 71.11 + 21.119 0.987500 194647 80.00 + 22.911 0.989062 194956 91.43 + 24.639 0.990625 195267 106.67 + 26.239 0.992188 195571 128.00 + 27.119 0.992969 195726 142.22 + 27.951 0.993750 195879 160.00 + 28.847 0.994531 196034 182.86 + 29.855 0.995313 196189 213.33 + 31.071 0.996094 196343 256.00 + 31.839 0.996484 196418 284.44 + 33.151 0.996875 196497 320.00 + 34.111 0.997266 196572 365.71 + 35.487 0.997656 196649 426.67 + 37.791 0.998047 196726 512.00 + 39.423 0.998242 196764 568.89 + 42.591 0.998437 196804 640.00 + 45.695 0.998633 196841 731.43 + 48.319 0.998828 196881 853.33 + 52.287 0.999023 196918 1024.00 + 53.759 0.999121 196937 1137.78 + 56.063 0.999219 196957 1280.00 + 58.495 0.999316 196978 1462.86 + 59.327 0.999414 196995 1706.67 + 61.823 0.999512 197014 2048.00 + 62.719 0.999561 197024 2275.56 + 64.351 0.999609 197034 2560.00 + 67.775 0.999658 197043 2925.71 + 71.359 0.999707 197053 3413.33 + 75.071 0.999756 197062 4096.00 + 76.991 0.999780 197067 4551.11 + 79.487 0.999805 197072 5120.00 + 81.663 0.999829 197077 5851.43 + 83.263 0.999854 197082 6826.67 + 84.415 0.999878 197086 8192.00 + 85.183 0.999890 197089 9102.22 + 85.375 0.999902 197091 10240.00 + 86.015 0.999915 197094 11702.86 + 87.359 0.999927 197096 13653.33 + 88.447 0.999939 197098 16384.00 + 88.895 0.999945 197100 18204.44 + 89.279 0.999951 197101 20480.00 + 89.791 0.999957 197102 23405.71 + 90.303 0.999963 197103 27306.67 + 91.135 0.999969 197104 32768.00 + 91.583 0.999973 197105 36408.89 + 92.799 0.999976 197106 40960.00 + 92.799 0.999979 197106 46811.43 + 92.991 0.999982 197107 54613.33 + 92.991 0.999985 197107 65536.00 + 93.183 0.999986 197108 72817.78 + 93.183 0.999988 197108 81920.00 + 93.183 0.999989 197108 93622.86 + 93.759 0.999991 197109 109226.67 + 93.759 0.999992 197109 131072.00 + 93.759 0.999993 197109 145635.56 + 93.759 0.999994 197109 163840.00 + 93.759 0.999995 197109 187245.71 + 95.231 0.999995 197110 218453.33 + 95.231 1.000000 197110 inf +#[Mean = 2.796, StdDeviation = 4.016] +#[Max = 95.168, Total count = 197110] +#[Buckets = 27, SubBuckets = 2048] +---------------------------------------------------------- diff --git a/src/main/java/ru/vk/itmo/test/alenkovayulya/results_stage5/wrk2_put.txt b/src/main/java/ru/vk/itmo/test/alenkovayulya/results_stage5/wrk2_put.txt new file mode 100644 index 000000000..c0dc1d578 --- /dev/null +++ b/src/main/java/ru/vk/itmo/test/alenkovayulya/results_stage5/wrk2_put.txt @@ -0,0 +1,435 @@ +MacBook-Pro-Ulia:wrk2-arm yulalenk$ ./wrk -c 64 -d 20 -t 1 -L -R 5000 -s /Users/yulalenk/sem2/2024-highload-dht/src/main/java/ru/vk/itmo/test/alenkovayulya/lua/put.lua http://localhost:8080 +Running 20s test @ http://localhost:8080 + 1 threads and 64 connections + Thread calibration: mean lat.: 1.803ms, rate sampling interval: 10ms + Thread Stats Avg Stdev Max +/- Stdev + Latency 1.66ms 1.28ms 19.98ms 93.92% + Req/Sec 5.26k 848.73 13.55k 88.40% + Latency Distribution (HdrHistogram - Recorded Latency) + 50.000% 1.40ms + 75.000% 1.96ms + 90.000% 2.53ms + 99.000% 7.10ms + 99.900% 15.59ms + 99.990% 19.04ms + 99.999% 20.00ms +100.000% 20.00ms + + Detailed Percentile spectrum: + Value Percentile TotalCount 1/(1-Percentile) + + 0.290 0.000000 1 1.00 + 0.738 0.100000 4840 1.11 + 0.921 0.200000 9696 1.25 + 1.080 0.300000 14524 1.43 + 1.233 0.400000 19364 1.67 + 1.400 0.500000 24220 2.00 + 1.487 0.550000 26628 2.22 + 1.588 0.600000 29041 2.50 + 1.699 0.650000 31468 2.86 + 1.824 0.700000 33894 3.33 + 1.956 0.750000 36306 4.00 + 2.029 0.775000 37514 4.44 + 2.105 0.800000 38743 5.00 + 2.185 0.825000 39961 5.71 + 2.275 0.850000 41140 6.67 + 2.389 0.875000 42361 8.00 + 2.457 0.887500 42957 8.89 + 2.533 0.900000 43571 10.00 + 2.629 0.912500 44171 11.43 + 2.741 0.925000 44771 13.33 + 2.903 0.937500 45374 16.00 + 3.005 0.943750 45681 17.78 + 3.151 0.950000 45984 20.00 + 3.355 0.956250 46282 22.86 + 3.627 0.962500 46584 26.67 + 4.029 0.968750 46886 32.00 + 4.331 0.971875 47037 35.56 + 4.623 0.975000 47189 40.00 + 4.935 0.978125 47340 45.71 + 5.379 0.981250 47492 53.33 + 5.807 0.984375 47642 64.00 + 6.107 0.985938 47718 71.11 + 6.407 0.987500 47795 80.00 + 6.811 0.989062 47869 91.43 + 7.295 0.990625 47946 106.67 + 7.955 0.992188 48020 128.00 + 8.367 0.992969 48059 142.22 + 8.839 0.993750 48096 160.00 + 9.399 0.994531 48136 182.86 + 9.975 0.995313 48172 213.33 + 10.655 0.996094 48209 256.00 + 11.271 0.996484 48228 284.44 + 11.863 0.996875 48247 320.00 + 12.471 0.997266 48266 365.71 + 13.135 0.997656 48286 426.67 + 13.807 0.998047 48304 512.00 + 14.143 0.998242 48313 568.89 + 14.415 0.998437 48323 640.00 + 14.687 0.998633 48332 731.43 + 15.335 0.998828 48342 853.33 + 15.631 0.999023 48351 1024.00 + 15.943 0.999121 48356 1137.78 + 16.127 0.999219 48361 1280.00 + 16.311 0.999316 48365 1462.86 + 16.687 0.999414 48370 1706.67 + 16.847 0.999512 48375 2048.00 + 16.895 0.999561 48378 2275.56 + 17.055 0.999609 48380 2560.00 + 17.167 0.999658 48382 2925.71 + 17.231 0.999707 48384 3413.33 + 17.551 0.999756 48387 4096.00 + 17.583 0.999780 48388 4551.11 + 17.951 0.999805 48389 5120.00 + 18.271 0.999829 48390 5851.43 + 18.367 0.999854 48391 6826.67 + 19.039 0.999878 48393 8192.00 + 19.039 0.999890 48393 9102.22 + 19.327 0.999902 48394 10240.00 + 19.327 0.999915 48394 11702.86 + 19.343 0.999927 48395 13653.33 + 19.503 0.999939 48396 16384.00 + 19.503 0.999945 48396 18204.44 + 19.503 0.999951 48396 20480.00 + 19.503 0.999957 48396 23405.71 + 19.871 0.999963 48397 27306.67 + 19.871 0.999969 48397 32768.00 + 19.871 0.999973 48397 36408.89 + 19.871 0.999976 48397 40960.00 + 19.871 0.999979 48397 46811.43 + 19.999 0.999982 48398 54613.33 + 19.999 1.000000 48398 inf +#[Mean = 1.658, StdDeviation = 1.284] +#[Max = 19.984, Total count = 48398] +#[Buckets = 27, SubBuckets = 2048] +---------------------------------------------------------- + +MacBook-Pro-Ulia:wrk2-arm yulalenk$ ./wrk -c 64 -d 20 -t 1 -L -R 10000 -s /Users/yulalenk/sem2/2024-highload-dht/src/main/java/ru/vk/itmo/test/alenkovayulya/lua/put.lua http://localhost:8080 +Running 20s test @ http://localhost:8080 + 1 threads and 64 connections + Thread calibration: mean lat.: 2.858ms, rate sampling interval: 10ms + Thread Stats Avg Stdev Max +/- Stdev + Latency 2.97ms 3.11ms 29.87ms 90.63% + Req/Sec 10.55k 1.72k 15.50k 81.15% + Latency Distribution (HdrHistogram - Recorded Latency) + 50.000% 1.99ms + 75.000% 2.82ms + 90.000% 5.69ms + 99.000% 16.88ms + 99.900% 22.32ms + 99.990% 25.89ms + 99.999% 29.50ms +100.000% 29.89ms + + Detailed Percentile spectrum: + Value Percentile TotalCount 1/(1-Percentile) + + 0.394 0.000000 1 1.00 + 1.112 0.100000 9669 1.11 + 1.373 0.200000 19342 1.25 + 1.585 0.300000 29055 1.43 + 1.782 0.400000 38697 1.67 + 1.993 0.500000 48344 2.00 + 2.113 0.550000 53174 2.22 + 2.247 0.600000 58033 2.50 + 2.403 0.650000 62881 2.86 + 2.581 0.700000 67708 3.33 + 2.823 0.750000 72493 4.00 + 2.993 0.775000 74925 4.44 + 3.207 0.800000 77327 5.00 + 3.477 0.825000 79750 5.71 + 3.859 0.850000 82163 6.67 + 4.523 0.875000 84578 8.00 + 5.047 0.887500 85779 8.89 + 5.691 0.900000 86993 10.00 + 6.475 0.912500 88196 11.43 + 7.443 0.925000 89407 13.33 + 8.783 0.937500 90612 16.00 + 9.519 0.943750 91219 17.78 + 10.287 0.950000 91824 20.00 + 11.119 0.956250 92430 22.86 + 11.943 0.962500 93028 26.67 + 12.807 0.968750 93636 32.00 + 13.271 0.971875 93935 35.56 + 13.743 0.975000 94237 40.00 + 14.239 0.978125 94541 45.71 + 14.775 0.981250 94840 53.33 + 15.415 0.984375 95144 64.00 + 15.767 0.985938 95295 71.11 + 16.135 0.987500 95444 80.00 + 16.623 0.989062 95600 91.43 + 17.103 0.990625 95749 106.67 + 17.599 0.992188 95900 128.00 + 17.919 0.992969 95976 142.22 + 18.255 0.993750 96050 160.00 + 18.591 0.994531 96126 182.86 + 19.055 0.995313 96200 213.33 + 19.359 0.996094 96276 256.00 + 19.615 0.996484 96314 284.44 + 19.855 0.996875 96350 320.00 + 20.159 0.997266 96389 365.71 + 20.543 0.997656 96426 426.67 + 20.847 0.998047 96467 512.00 + 20.991 0.998242 96483 568.89 + 21.231 0.998437 96503 640.00 + 21.487 0.998633 96520 731.43 + 21.903 0.998828 96541 853.33 + 22.415 0.999023 96559 1024.00 + 22.575 0.999121 96568 1137.78 + 22.799 0.999219 96577 1280.00 + 23.071 0.999316 96586 1462.86 + 23.263 0.999414 96596 1706.67 + 23.551 0.999512 96605 2048.00 + 23.823 0.999561 96611 2275.56 + 23.983 0.999609 96616 2560.00 + 24.319 0.999658 96619 2925.71 + 24.511 0.999707 96624 3413.33 + 24.655 0.999756 96629 4096.00 + 24.687 0.999780 96632 4551.11 + 24.751 0.999805 96634 5120.00 + 24.895 0.999829 96636 5851.43 + 25.263 0.999854 96638 6826.67 + 25.535 0.999878 96641 8192.00 + 25.887 0.999890 96642 9102.22 + 25.935 0.999902 96643 10240.00 + 25.983 0.999915 96644 11702.86 + 26.991 0.999927 96645 13653.33 + 27.615 0.999939 96647 16384.00 + 27.615 0.999945 96647 18204.44 + 28.159 0.999951 96648 20480.00 + 28.159 0.999957 96648 23405.71 + 28.559 0.999963 96649 27306.67 + 29.263 0.999969 96650 32768.00 + 29.263 0.999973 96650 36408.89 + 29.263 0.999976 96650 40960.00 + 29.263 0.999979 96650 46811.43 + 29.503 0.999982 96651 54613.33 + 29.503 0.999985 96651 65536.00 + 29.503 0.999986 96651 72817.78 + 29.503 0.999988 96651 81920.00 + 29.503 0.999989 96651 93622.86 + 29.887 0.999991 96652 109226.67 + 29.887 1.000000 96652 inf +#[Mean = 2.965, StdDeviation = 3.112] +#[Max = 29.872, Total count = 96652] +#[Buckets = 27, SubBuckets = 2048] +---------------------------------------------------------- + +MacBook-Pro-Ulia:wrk2-arm yulalenk$ ./wrk -c 64 -d 20 -t 1 -L -R 12000 -s /Users/yulalenk/sem2/2024-highload-dht/src/main/java/ru/vk/itmo/test/alenkovayulya/lua/put.lua http://localhost:8080 +Running 20s test @ http://localhost:8080 + 1 threads and 64 connections + Thread calibration: mean lat.: 8.907ms, rate sampling interval: 42ms + Thread Stats Avg Stdev Max +/- Stdev + Latency 7.92ms 6.93ms 50.08ms 83.18% + Req/Sec 11.81k 1.08k 15.52k 80.87% + Latency Distribution (HdrHistogram - Recorded Latency) + 50.000% 5.24ms + 75.000% 11.53ms + 90.000% 17.60ms + 99.000% 31.63ms + 99.900% 42.66ms + 99.990% 47.30ms + 99.999% 49.82ms +100.000% 50.11ms + + Detailed Percentile spectrum: + Value Percentile TotalCount 1/(1-Percentile) + + 0.411 0.000000 1 1.00 + 1.915 0.100000 11296 1.11 + 2.481 0.200000 22637 1.25 + 3.097 0.300000 33891 1.43 + 3.953 0.400000 45185 1.67 + 5.235 0.500000 56489 2.00 + 6.039 0.550000 62139 2.22 + 7.027 0.600000 67782 2.50 + 8.231 0.650000 73459 2.86 + 9.767 0.700000 79072 3.33 + 11.527 0.750000 84718 4.00 + 12.487 0.775000 87555 4.44 + 13.407 0.800000 90385 5.00 + 14.295 0.825000 93194 5.71 + 15.239 0.850000 96021 6.67 + 16.343 0.875000 98854 8.00 + 16.911 0.887500 100253 8.89 + 17.599 0.900000 101661 10.00 + 18.351 0.912500 103085 11.43 + 19.215 0.925000 104488 13.33 + 20.335 0.937500 105905 16.00 + 20.975 0.943750 106613 17.78 + 21.695 0.950000 107311 20.00 + 22.511 0.956250 108015 22.86 + 23.375 0.962500 108721 26.67 + 24.495 0.968750 109431 32.00 + 25.103 0.971875 109781 35.56 + 25.807 0.975000 110136 40.00 + 26.703 0.978125 110493 45.71 + 27.647 0.981250 110839 53.33 + 28.847 0.984375 111192 64.00 + 29.519 0.985938 111367 71.11 + 30.287 0.987500 111545 80.00 + 31.039 0.989062 111724 91.43 + 32.111 0.990625 111901 106.67 + 33.151 0.992188 112078 128.00 + 33.727 0.992969 112162 142.22 + 34.399 0.993750 112250 160.00 + 35.103 0.994531 112339 182.86 + 35.775 0.995313 112426 213.33 + 36.927 0.996094 112515 256.00 + 37.471 0.996484 112560 284.44 + 38.079 0.996875 112604 320.00 + 38.751 0.997266 112648 365.71 + 39.423 0.997656 112692 426.67 + 40.159 0.998047 112735 512.00 + 40.639 0.998242 112757 568.89 + 41.279 0.998437 112779 640.00 + 41.791 0.998633 112801 731.43 + 42.207 0.998828 112824 853.33 + 42.687 0.999023 112846 1024.00 + 42.975 0.999121 112856 1137.78 + 43.231 0.999219 112867 1280.00 + 43.615 0.999316 112881 1462.86 + 43.839 0.999414 112890 1706.67 + 44.191 0.999512 112900 2048.00 + 44.511 0.999561 112906 2275.56 + 44.703 0.999609 112911 2560.00 + 45.055 0.999658 112918 2925.71 + 45.151 0.999707 112922 3413.33 + 45.535 0.999756 112928 4096.00 + 45.727 0.999780 112931 4551.11 + 45.823 0.999805 112933 5120.00 + 46.207 0.999829 112936 5851.43 + 46.623 0.999854 112939 6826.67 + 46.911 0.999878 112942 8192.00 + 47.263 0.999890 112943 9102.22 + 47.295 0.999902 112944 10240.00 + 48.031 0.999915 112946 11702.86 + 48.255 0.999927 112947 13653.33 + 48.671 0.999939 112949 16384.00 + 48.671 0.999945 112949 18204.44 + 48.735 0.999951 112950 20480.00 + 48.863 0.999957 112951 23405.71 + 48.863 0.999963 112951 27306.67 + 49.503 0.999969 112952 32768.00 + 49.503 0.999973 112952 36408.89 + 49.791 0.999976 112953 40960.00 + 49.791 0.999979 112953 46811.43 + 49.791 0.999982 112953 54613.33 + 49.823 0.999985 112954 65536.00 + 49.823 0.999986 112954 72817.78 + 49.823 0.999988 112954 81920.00 + 49.823 0.999989 112954 93622.86 + 49.823 0.999991 112954 109226.67 + 50.111 0.999992 112955 131072.00 + 50.111 1.000000 112955 inf +#[Mean = 7.924, StdDeviation = 6.933] +#[Max = 50.080, Total count = 112955] +#[Buckets = 27, SubBuckets = 2048] +---------------------------------------------------------- + +MacBook-Pro-Ulia:wrk2-arm yulalenk$ ./wrk -c 64 -d 20 -t 1 -L -R 15000 -s /Users/yulalenk/sem2/2024-highload-dht/src/main/java/ru/vk/itmo/test/alenkovayulya/lua/put.lua http://localhost:8080 +Running 20s test @ http://localhost:8080 + 1 threads and 64 connections + Thread calibration: mean lat.: 942.439ms, rate sampling interval: 3555ms + Thread Stats Avg Stdev Max +/- Stdev + Latency 3.13s 675.89ms 4.48s 57.75% + Req/Sec 11.44k 352.00 11.79k 50.00% + Latency Distribution (HdrHistogram - Recorded Latency) + 50.000% 3.10s + 75.000% 3.75s + 90.000% 4.11s + 99.000% 4.35s + 99.900% 4.42s + 99.990% 4.46s + 99.999% 4.49s +100.000% 4.49s + + Detailed Percentile spectrum: + Value Percentile TotalCount 1/(1-Percentile) + + 1904.639 0.000000 1 1.00 + 2265.087 0.100000 11114 1.11 + 2463.743 0.200000 22148 1.25 + 2627.583 0.300000 33203 1.43 + 2836.479 0.400000 44306 1.67 + 3096.575 0.500000 55383 2.00 + 3186.687 0.550000 60917 2.22 + 3278.847 0.600000 66369 2.50 + 3397.631 0.650000 71938 2.86 + 3614.719 0.700000 77486 3.33 + 3749.887 0.750000 82967 4.00 + 3811.327 0.775000 85763 4.44 + 3872.767 0.800000 88562 5.00 + 3936.255 0.825000 91306 5.71 + 3991.551 0.850000 94028 6.67 + 4052.991 0.875000 96858 8.00 + 4083.711 0.887500 98171 8.89 + 4114.431 0.900000 99571 10.00 + 4145.151 0.912500 100959 11.43 + 4173.823 0.925000 102325 13.33 + 4202.495 0.937500 103775 16.00 + 4214.783 0.943750 104445 17.78 + 4231.167 0.950000 105294 20.00 + 4243.455 0.956250 105972 22.86 + 4255.743 0.962500 106499 26.67 + 4272.127 0.968750 107229 32.00 + 4280.319 0.971875 107572 35.56 + 4288.511 0.975000 107872 40.00 + 4300.799 0.978125 108303 45.71 + 4308.991 0.981250 108603 53.33 + 4321.279 0.984375 108997 64.00 + 4325.375 0.985938 109137 71.11 + 4333.567 0.987500 109328 80.00 + 4341.759 0.989062 109502 91.43 + 4345.855 0.990625 109595 106.67 + 4354.047 0.992188 109772 128.00 + 4358.143 0.992969 109845 142.22 + 4362.239 0.993750 109921 160.00 + 4370.431 0.994531 110077 182.86 + 4374.527 0.995313 110141 213.33 + 4378.623 0.996094 110196 256.00 + 4382.719 0.996484 110244 284.44 + 4386.815 0.996875 110281 320.00 + 4390.911 0.997266 110327 365.71 + 4395.007 0.997656 110358 426.67 + 4403.199 0.998047 110423 512.00 + 4403.199 0.998242 110423 568.89 + 4407.295 0.998437 110453 640.00 + 4411.391 0.998633 110478 731.43 + 4415.487 0.998828 110499 853.33 + 4419.583 0.999023 110516 1024.00 + 4419.583 0.999121 110516 1137.78 + 4423.679 0.999219 110529 1280.00 + 4427.775 0.999316 110540 1462.86 + 4435.967 0.999414 110560 1706.67 + 4435.967 0.999512 110560 2048.00 + 4440.063 0.999561 110569 2275.56 + 4440.063 0.999609 110569 2560.00 + 4444.159 0.999658 110582 2925.71 + 4444.159 0.999707 110582 3413.33 + 4448.255 0.999756 110589 4096.00 + 4448.255 0.999780 110589 4551.11 + 4452.351 0.999805 110591 5120.00 + 4456.447 0.999829 110595 5851.43 + 4456.447 0.999854 110595 6826.67 + 4464.639 0.999878 110601 8192.00 + 4464.639 0.999890 110601 9102.22 + 4464.639 0.999902 110601 10240.00 + 4468.735 0.999915 110603 11702.86 + 4468.735 0.999927 110603 13653.33 + 4472.831 0.999939 110605 16384.00 + 4472.831 0.999945 110605 18204.44 + 4476.927 0.999951 110608 20480.00 + 4476.927 0.999957 110608 23405.71 + 4476.927 0.999963 110608 27306.67 + 4476.927 0.999969 110608 32768.00 + 4476.927 0.999973 110608 36408.89 + 4481.023 0.999976 110609 40960.00 + 4481.023 0.999979 110609 46811.43 + 4481.023 0.999982 110609 54613.33 + 4485.119 0.999985 110611 65536.00 + 4485.119 1.000000 110611 inf +#[Mean = 3133.208, StdDeviation = 675.893] +#[Max = 4481.024, Total count = 110611] +#[Buckets = 27, SubBuckets = 2048] +---------------------------------------------------------- \ No newline at end of file