diff --git a/src/main/java/ru/vk/itmo/test/proninvalentin/MemorySegmentFactory.java b/src/main/java/ru/vk/itmo/test/proninvalentin/MemorySegmentFactory.java new file mode 100644 index 000000000..70fbae787 --- /dev/null +++ b/src/main/java/ru/vk/itmo/test/proninvalentin/MemorySegmentFactory.java @@ -0,0 +1,44 @@ +package ru.vk.itmo.test.proninvalentin; + +import ru.vk.itmo.dao.BaseEntry; +import ru.vk.itmo.dao.Entry; + +import java.lang.foreign.MemorySegment; +import java.lang.foreign.ValueLayout; +import java.nio.charset.StandardCharsets; + +public class MemorySegmentFactory { + public byte[] toByteArray(MemorySegment data) { + if (data == null) { + throw new IllegalArgumentException(); + } + + return data.toArray(ValueLayout.JAVA_BYTE); + } + + public MemorySegment fromString(String data) { + return data == null + ? null + : MemorySegment.ofArray(data.getBytes(StandardCharsets.UTF_8)); + } + + public Entry toMemorySegment(String key, String value) { + if (key == null || value == null) { + throw new IllegalArgumentException(); + } + + MemorySegment msKey = fromString(key); + MemorySegment msValue = fromString(value); + return new BaseEntry<>(msKey, msValue); + } + + public Entry toDeletedMemorySegment(String key) { + if (key == null) { + throw new IllegalArgumentException(); + } + + MemorySegment msKey = fromString(key); + return new BaseEntry<>(msKey, null); + } +} + diff --git a/src/main/java/ru/vk/itmo/test/proninvalentin/Server.java b/src/main/java/ru/vk/itmo/test/proninvalentin/Server.java new file mode 100644 index 000000000..4061fc045 --- /dev/null +++ b/src/main/java/ru/vk/itmo/test/proninvalentin/Server.java @@ -0,0 +1,143 @@ +package ru.vk.itmo.test.proninvalentin; + +import one.nio.http.HttpException; +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.reference.dao.ReferenceDao; + +import java.io.IOException; +import java.lang.foreign.MemorySegment; +import java.util.Set; + +public class Server extends HttpServer { + private final Dao> dao; + private final MemorySegmentFactory msFactory; + private static final Logger logger = LoggerFactory.getLogger(Server.class); + private static final Set SUPPORTED_HTTP_METHODS = Set.of( + Request.METHOD_GET, + Request.METHOD_PUT, + Request.METHOD_DELETE + ); + + public Server(ServiceConfig config, ReferenceDao dao) throws IOException { + super(createServerConfig(config)); + + this.dao = dao; + this.msFactory = new MemorySegmentFactory(); + } + + private static HttpServerConfig createServerConfig(ServiceConfig serviceConfig) { + HttpServerConfig serverConfig = new HttpServerConfig(); + AcceptorConfig acceptorConfig = new AcceptorConfig(); + acceptorConfig.port = serviceConfig.selfPort(); + acceptorConfig.reusePort = true; + + serverConfig.acceptors = new AcceptorConfig[]{acceptorConfig}; + serverConfig.closeSessions = true; + return serverConfig; + } + + @Override + public void handleDefault(Request request, HttpSession session) throws IOException { + int httpMethod = request.getMethod(); + Response response = isSupportedMethod(httpMethod) + ? new Response(Response.BAD_REQUEST, Response.EMPTY) + : new Response(Response.METHOD_NOT_ALLOWED, Response.EMPTY); + session.sendResponse(response); + } + + private boolean isSupportedMethod(int httpMethod) { + return SUPPORTED_HTTP_METHODS.contains(httpMethod); + } + + @Override + public void handleRequest(Request request, HttpSession session) { + try { + super.handleRequest(request, session); + } catch (Exception e) { + logger.error("Error while processing request", e); + + String responseCode = e.getClass() == HttpException.class + ? Response.BAD_REQUEST + : Response.INTERNAL_ERROR; + sendResponse(session, new Response(responseCode, Response.EMPTY)); + } + } + + private static void sendResponse(HttpSession session, Response response) { + try { + session.sendResponse(response); + } catch (IOException e) { + logger.error("Error while sending response", e); + } + } + + @Override + public synchronized void stop() { + super.stop(); + } + + // region Handlers + + @Path("/v0/entity") + @RequestMethod(Request.METHOD_PUT) + public Response upsert(@Param(value = "id", required = true) String id, Request request) { + if (isNullOrEmpty(id) || request.getBody() == null) { + return new Response(Response.BAD_REQUEST, Response.EMPTY); + } + + MemorySegment key = msFactory.fromString(id); + MemorySegment value = MemorySegment.ofArray(request.getBody()); + dao.upsert(new BaseEntry<>(key, value)); + return new Response(Response.CREATED, Response.EMPTY); + } + + @Path("/v0/entity") + @RequestMethod(Request.METHOD_GET) + public Response get(@Param(required = true, value = "id") String id) { + if (isNullOrEmpty(id)) { + return new Response(Response.BAD_REQUEST, Response.EMPTY); + } + + MemorySegment key = msFactory.fromString(id); + + Entry entry = dao.get(key); + if (entry == null) { + return new Response(Response.NOT_FOUND, Response.EMPTY); + } + + byte[] value = msFactory.toByteArray(entry.value()); + return Response.ok(value); + } + + @Path("/v0/entity") + @RequestMethod(Request.METHOD_DELETE) + public Response delete(@Param(required = true, value = "id") String id) { + if (isNullOrEmpty(id)) { + return new Response(Response.BAD_REQUEST, Response.EMPTY); + } + + Entry deletedMemorySegment = msFactory.toDeletedMemorySegment(id); + dao.upsert(deletedMemorySegment); + return new Response(Response.ACCEPTED, Response.EMPTY); + } + + private boolean isNullOrEmpty(String str) { + return str == null || str.isEmpty(); + } + + // endregion +} diff --git a/src/main/java/ru/vk/itmo/test/proninvalentin/ServiceImpl.java b/src/main/java/ru/vk/itmo/test/proninvalentin/ServiceImpl.java new file mode 100644 index 000000000..f9ab6e4ba --- /dev/null +++ b/src/main/java/ru/vk/itmo/test/proninvalentin/ServiceImpl.java @@ -0,0 +1,51 @@ +package ru.vk.itmo.test.proninvalentin; + +import ru.vk.itmo.Service; +import ru.vk.itmo.ServiceConfig; +import ru.vk.itmo.dao.Config; +import ru.vk.itmo.test.ServiceFactory; +import ru.vk.itmo.test.reference.dao.ReferenceDao; + +import java.io.IOException; +import java.io.UncheckedIOException; +import java.util.concurrent.CompletableFuture; + +public class ServiceImpl implements Service { + private final Config daoConfig; + private final ServiceConfig config; + private ReferenceDao dao; + private Server server; + + public ServiceImpl(ServiceConfig config) throws IOException { + int flushThresholdBytes = 1 << 27; // 128 MB + this.config = config; + this.daoConfig = new Config(config.workingDir(), flushThresholdBytes); + } + + @Override + public CompletableFuture start() throws IOException { + dao = new ReferenceDao(daoConfig); + server = new Server(config, dao); + server.start(); + return CompletableFuture.completedFuture(null); + } + + @Override + public CompletableFuture stop() throws IOException { + server.stop(); + dao.close(); + return CompletableFuture.completedFuture(null); + } + + @ServiceFactory(stage = 1) + public static class Factory implements ServiceFactory.Factory { + @Override + public Service create(ServiceConfig config) { + try { + return new ServiceImpl(config); + } catch (IOException e) { + throw new UncheckedIOException(e); + } + } + } +} diff --git a/src/main/java/ru/vk/itmo/test/proninvalentin/StartServer.java b/src/main/java/ru/vk/itmo/test/proninvalentin/StartServer.java new file mode 100644 index 000000000..31611211d --- /dev/null +++ b/src/main/java/ru/vk/itmo/test/proninvalentin/StartServer.java @@ -0,0 +1,34 @@ +package ru.vk.itmo.test.proninvalentin; + +import ru.vk.itmo.ServiceConfig; +import ru.vk.itmo.dao.Config; +import ru.vk.itmo.test.reference.dao.ReferenceDao; + +import java.io.IOException; +import java.nio.file.Files; +import java.nio.file.Path; +import java.util.List; + +public final class StartServer { + private StartServer() { + // Suppress warning + } + + public static void main(String[] args) throws IOException { + String url = "http://localhost"; + int port = 8080; + int flushThresholdBytes = 1 << 27; // 128 MB + Path profilingDataPath = Path.of( + "/Users/valentinpronin/IdeaProjects/2024-highload-dht/" + + "src/main/java/ru/vk/itmo/test/" + + "proninvalentin/server_profiling_data"); + Files.createDirectories(profilingDataPath); + + Config daoConfig = new Config(profilingDataPath, flushThresholdBytes); + ServiceConfig serviceConfig = new ServiceConfig(port, url, List.of(url), profilingDataPath); + ReferenceDao referenceDao = new ReferenceDao(daoConfig); + + Server server = new Server(serviceConfig, referenceDao); + server.start(); + } +} diff --git a/src/main/java/ru/vk/itmo/test/proninvalentin/lua_scripts/get.lua b/src/main/java/ru/vk/itmo/test/proninvalentin/lua_scripts/get.lua new file mode 100644 index 000000000..82a6c117b --- /dev/null +++ b/src/main/java/ru/vk/itmo/test/proninvalentin/lua_scripts/get.lua @@ -0,0 +1,6 @@ +function request() + id = math.random(1, 300000) + path = "/v0/entity?id=" .. id + method = "GET" + return wrk.format(method, path, body) +end \ No newline at end of file diff --git a/src/main/java/ru/vk/itmo/test/proninvalentin/lua_scripts/put.lua b/src/main/java/ru/vk/itmo/test/proninvalentin/lua_scripts/put.lua new file mode 100644 index 000000000..818b121fb --- /dev/null +++ b/src/main/java/ru/vk/itmo/test/proninvalentin/lua_scripts/put.lua @@ -0,0 +1,9 @@ +id = 0 + +function request() + body = string.rep("random_value", 100) + method = "PUT" + id = id + 1 + path = "/v0/entity?id=" .. id + return wrk.format(method, path, headers, body) +end \ No newline at end of file diff --git a/src/main/java/ru/vk/itmo/test/proninvalentin/reports/stage1/aprof/get/alloc/alloc-get-20000.png b/src/main/java/ru/vk/itmo/test/proninvalentin/reports/stage1/aprof/get/alloc/alloc-get-20000.png new file mode 100644 index 000000000..bb4ee2bbc Binary files /dev/null and b/src/main/java/ru/vk/itmo/test/proninvalentin/reports/stage1/aprof/get/alloc/alloc-get-20000.png differ diff --git a/src/main/java/ru/vk/itmo/test/proninvalentin/reports/stage1/aprof/get/alloc/alloc-get-25000.png b/src/main/java/ru/vk/itmo/test/proninvalentin/reports/stage1/aprof/get/alloc/alloc-get-25000.png new file mode 100644 index 000000000..276afa8da Binary files /dev/null and b/src/main/java/ru/vk/itmo/test/proninvalentin/reports/stage1/aprof/get/alloc/alloc-get-25000.png differ diff --git a/src/main/java/ru/vk/itmo/test/proninvalentin/reports/stage1/aprof/get/alloc/profile-alloc-get-25000.html b/src/main/java/ru/vk/itmo/test/proninvalentin/reports/stage1/aprof/get/alloc/profile-alloc-get-25000.html new file mode 100644 index 000000000..75f3069a7 --- /dev/null +++ b/src/main/java/ru/vk/itmo/test/proninvalentin/reports/stage1/aprof/get/alloc/profile-alloc-get-25000.html @@ -0,0 +1,445 @@ + + + + + + + +

Flame Graph

+
  
+
Produced by async-profiler
+ +
+

+

Matched:

+ diff --git a/src/main/java/ru/vk/itmo/test/proninvalentin/reports/stage1/aprof/get/alloc/profile-alloc-put-20000.html b/src/main/java/ru/vk/itmo/test/proninvalentin/reports/stage1/aprof/get/alloc/profile-alloc-put-20000.html new file mode 100644 index 000000000..ecf6a0ecc --- /dev/null +++ b/src/main/java/ru/vk/itmo/test/proninvalentin/reports/stage1/aprof/get/alloc/profile-alloc-put-20000.html @@ -0,0 +1,468 @@ + + + + + + + +

Flame Graph

+
  
+
Produced by async-profiler
+ +
+

+

Matched:

+ diff --git a/src/main/java/ru/vk/itmo/test/proninvalentin/reports/stage1/aprof/get/cpu/cpu-get-20000.png b/src/main/java/ru/vk/itmo/test/proninvalentin/reports/stage1/aprof/get/cpu/cpu-get-20000.png new file mode 100644 index 000000000..9a872a621 Binary files /dev/null and b/src/main/java/ru/vk/itmo/test/proninvalentin/reports/stage1/aprof/get/cpu/cpu-get-20000.png differ diff --git a/src/main/java/ru/vk/itmo/test/proninvalentin/reports/stage1/aprof/get/cpu/cpu-get-25000.png b/src/main/java/ru/vk/itmo/test/proninvalentin/reports/stage1/aprof/get/cpu/cpu-get-25000.png new file mode 100644 index 000000000..107f27042 Binary files /dev/null and b/src/main/java/ru/vk/itmo/test/proninvalentin/reports/stage1/aprof/get/cpu/cpu-get-25000.png differ diff --git a/src/main/java/ru/vk/itmo/test/proninvalentin/reports/stage1/aprof/get/cpu/profile-cpu-get-25000.html b/src/main/java/ru/vk/itmo/test/proninvalentin/reports/stage1/aprof/get/cpu/profile-cpu-get-25000.html new file mode 100644 index 000000000..5fb1eced4 --- /dev/null +++ b/src/main/java/ru/vk/itmo/test/proninvalentin/reports/stage1/aprof/get/cpu/profile-cpu-get-25000.html @@ -0,0 +1,1127 @@ + + + + + + + +

Flame Graph

+
  
+
Produced by async-profiler
+ +
+

+

Matched:

+ diff --git a/src/main/java/ru/vk/itmo/test/proninvalentin/reports/stage1/aprof/get/cpu/profile-cpu-put-20000.html b/src/main/java/ru/vk/itmo/test/proninvalentin/reports/stage1/aprof/get/cpu/profile-cpu-put-20000.html new file mode 100644 index 000000000..ac78b32ca --- /dev/null +++ b/src/main/java/ru/vk/itmo/test/proninvalentin/reports/stage1/aprof/get/cpu/profile-cpu-put-20000.html @@ -0,0 +1,1000 @@ + + + + + + + +

Flame Graph

+
  
+
Produced by async-profiler
+ +
+

+

Matched:

+ diff --git a/src/main/java/ru/vk/itmo/test/proninvalentin/reports/stage1/aprof/put/alloc/alloc-put-10000.png b/src/main/java/ru/vk/itmo/test/proninvalentin/reports/stage1/aprof/put/alloc/alloc-put-10000.png new file mode 100644 index 000000000..076321866 Binary files /dev/null and b/src/main/java/ru/vk/itmo/test/proninvalentin/reports/stage1/aprof/put/alloc/alloc-put-10000.png differ diff --git a/src/main/java/ru/vk/itmo/test/proninvalentin/reports/stage1/aprof/put/alloc/alloc-put-30000.png b/src/main/java/ru/vk/itmo/test/proninvalentin/reports/stage1/aprof/put/alloc/alloc-put-30000.png new file mode 100644 index 000000000..d80fc97cb Binary files /dev/null and b/src/main/java/ru/vk/itmo/test/proninvalentin/reports/stage1/aprof/put/alloc/alloc-put-30000.png differ diff --git a/src/main/java/ru/vk/itmo/test/proninvalentin/reports/stage1/aprof/put/alloc/alloc-put-45000.png b/src/main/java/ru/vk/itmo/test/proninvalentin/reports/stage1/aprof/put/alloc/alloc-put-45000.png new file mode 100644 index 000000000..3c184f47c Binary files /dev/null and b/src/main/java/ru/vk/itmo/test/proninvalentin/reports/stage1/aprof/put/alloc/alloc-put-45000.png differ diff --git a/src/main/java/ru/vk/itmo/test/proninvalentin/reports/stage1/aprof/put/alloc/profile-alloc-put-10000.html b/src/main/java/ru/vk/itmo/test/proninvalentin/reports/stage1/aprof/put/alloc/profile-alloc-put-10000.html new file mode 100644 index 000000000..d15686a68 --- /dev/null +++ b/src/main/java/ru/vk/itmo/test/proninvalentin/reports/stage1/aprof/put/alloc/profile-alloc-put-10000.html @@ -0,0 +1,558 @@ + + + + + + + +

Flame Graph

+
  
+
Produced by async-profiler
+ +
+

+

Matched:

+ diff --git a/src/main/java/ru/vk/itmo/test/proninvalentin/reports/stage1/aprof/put/alloc/profile-alloc-put-20000.html b/src/main/java/ru/vk/itmo/test/proninvalentin/reports/stage1/aprof/put/alloc/profile-alloc-put-20000.html new file mode 100644 index 000000000..c989fd52c --- /dev/null +++ b/src/main/java/ru/vk/itmo/test/proninvalentin/reports/stage1/aprof/put/alloc/profile-alloc-put-20000.html @@ -0,0 +1,521 @@ + + + + + + + +

Flame Graph

+
  
+
Produced by async-profiler
+ +
+

+

Matched:

+ diff --git a/src/main/java/ru/vk/itmo/test/proninvalentin/reports/stage1/aprof/put/alloc/profile-alloc-put-30000.html b/src/main/java/ru/vk/itmo/test/proninvalentin/reports/stage1/aprof/put/alloc/profile-alloc-put-30000.html new file mode 100644 index 000000000..8c0f4d04e --- /dev/null +++ b/src/main/java/ru/vk/itmo/test/proninvalentin/reports/stage1/aprof/put/alloc/profile-alloc-put-30000.html @@ -0,0 +1,493 @@ + + + + + + + +

Flame Graph

+
  
+
Produced by async-profiler
+ +
+

+

Matched:

+ diff --git a/src/main/java/ru/vk/itmo/test/proninvalentin/reports/stage1/aprof/put/alloc/profile-alloc-put-45000.html b/src/main/java/ru/vk/itmo/test/proninvalentin/reports/stage1/aprof/put/alloc/profile-alloc-put-45000.html new file mode 100644 index 000000000..469cbc328 --- /dev/null +++ b/src/main/java/ru/vk/itmo/test/proninvalentin/reports/stage1/aprof/put/alloc/profile-alloc-put-45000.html @@ -0,0 +1,496 @@ + + + + + + + +

Flame Graph

+
  
+
Produced by async-profiler
+ +
+

+

Matched:

+ diff --git a/src/main/java/ru/vk/itmo/test/proninvalentin/reports/stage1/aprof/put/alloc/profile-alloc-put-heated-10000.html b/src/main/java/ru/vk/itmo/test/proninvalentin/reports/stage1/aprof/put/alloc/profile-alloc-put-heated-10000.html new file mode 100644 index 000000000..3815a9cf7 --- /dev/null +++ b/src/main/java/ru/vk/itmo/test/proninvalentin/reports/stage1/aprof/put/alloc/profile-alloc-put-heated-10000.html @@ -0,0 +1,499 @@ + + + + + + + +

Flame Graph

+
  
+
Produced by async-profiler
+ +
+

+

Matched:

+ diff --git a/src/main/java/ru/vk/itmo/test/proninvalentin/reports/stage1/aprof/put/cpu/cpu-put-10000.png b/src/main/java/ru/vk/itmo/test/proninvalentin/reports/stage1/aprof/put/cpu/cpu-put-10000.png new file mode 100644 index 000000000..ee9756162 Binary files /dev/null and b/src/main/java/ru/vk/itmo/test/proninvalentin/reports/stage1/aprof/put/cpu/cpu-put-10000.png differ diff --git a/src/main/java/ru/vk/itmo/test/proninvalentin/reports/stage1/aprof/put/cpu/cpu-put-30000.png b/src/main/java/ru/vk/itmo/test/proninvalentin/reports/stage1/aprof/put/cpu/cpu-put-30000.png new file mode 100644 index 000000000..4b374fd8f Binary files /dev/null and b/src/main/java/ru/vk/itmo/test/proninvalentin/reports/stage1/aprof/put/cpu/cpu-put-30000.png differ diff --git a/src/main/java/ru/vk/itmo/test/proninvalentin/reports/stage1/aprof/put/cpu/cpu-put-45000.png b/src/main/java/ru/vk/itmo/test/proninvalentin/reports/stage1/aprof/put/cpu/cpu-put-45000.png new file mode 100644 index 000000000..2bfae4367 Binary files /dev/null and b/src/main/java/ru/vk/itmo/test/proninvalentin/reports/stage1/aprof/put/cpu/cpu-put-45000.png differ diff --git a/src/main/java/ru/vk/itmo/test/proninvalentin/reports/stage1/aprof/put/cpu/cpu-put-heated-10000.png b/src/main/java/ru/vk/itmo/test/proninvalentin/reports/stage1/aprof/put/cpu/cpu-put-heated-10000.png new file mode 100644 index 000000000..841cb681f Binary files /dev/null and b/src/main/java/ru/vk/itmo/test/proninvalentin/reports/stage1/aprof/put/cpu/cpu-put-heated-10000.png differ diff --git a/src/main/java/ru/vk/itmo/test/proninvalentin/reports/stage1/aprof/put/cpu/profile-cpu-put-10000.html b/src/main/java/ru/vk/itmo/test/proninvalentin/reports/stage1/aprof/put/cpu/profile-cpu-put-10000.html new file mode 100644 index 000000000..e0e43b734 --- /dev/null +++ b/src/main/java/ru/vk/itmo/test/proninvalentin/reports/stage1/aprof/put/cpu/profile-cpu-put-10000.html @@ -0,0 +1,1816 @@ + + + + + + + +

Flame Graph

+
  
+
Produced by async-profiler
+ +
+

+

Matched:

+ diff --git a/src/main/java/ru/vk/itmo/test/proninvalentin/reports/stage1/aprof/put/cpu/profile-cpu-put-20000.html b/src/main/java/ru/vk/itmo/test/proninvalentin/reports/stage1/aprof/put/cpu/profile-cpu-put-20000.html new file mode 100644 index 000000000..049a7011e --- /dev/null +++ b/src/main/java/ru/vk/itmo/test/proninvalentin/reports/stage1/aprof/put/cpu/profile-cpu-put-20000.html @@ -0,0 +1,1495 @@ + + + + + + + +

Flame Graph

+
  
+
Produced by async-profiler
+ +
+

+

Matched:

+ diff --git a/src/main/java/ru/vk/itmo/test/proninvalentin/reports/stage1/aprof/put/cpu/profile-cpu-put-30000.html b/src/main/java/ru/vk/itmo/test/proninvalentin/reports/stage1/aprof/put/cpu/profile-cpu-put-30000.html new file mode 100644 index 000000000..ef736a498 --- /dev/null +++ b/src/main/java/ru/vk/itmo/test/proninvalentin/reports/stage1/aprof/put/cpu/profile-cpu-put-30000.html @@ -0,0 +1,1552 @@ + + + + + + + +

Flame Graph

+
  
+
Produced by async-profiler
+ +
+

+

Matched:

+ diff --git a/src/main/java/ru/vk/itmo/test/proninvalentin/reports/stage1/aprof/put/cpu/profile-cpu-put-45000.html b/src/main/java/ru/vk/itmo/test/proninvalentin/reports/stage1/aprof/put/cpu/profile-cpu-put-45000.html new file mode 100644 index 000000000..b5449226c --- /dev/null +++ b/src/main/java/ru/vk/itmo/test/proninvalentin/reports/stage1/aprof/put/cpu/profile-cpu-put-45000.html @@ -0,0 +1,1465 @@ + + + + + + + +

Flame Graph

+
  
+
Produced by async-profiler
+ +
+

+

Matched:

+ diff --git a/src/main/java/ru/vk/itmo/test/proninvalentin/reports/stage1/aprof/put/cpu/profile-cpu-put-heated-10000.html b/src/main/java/ru/vk/itmo/test/proninvalentin/reports/stage1/aprof/put/cpu/profile-cpu-put-heated-10000.html new file mode 100644 index 000000000..3241286a6 --- /dev/null +++ b/src/main/java/ru/vk/itmo/test/proninvalentin/reports/stage1/aprof/put/cpu/profile-cpu-put-heated-10000.html @@ -0,0 +1,1549 @@ + + + + + + + +

Flame Graph

+
  
+
Produced by async-profiler
+ +
+

+

Matched:

+ diff --git a/src/main/java/ru/vk/itmo/test/proninvalentin/reports/stage1/report.md b/src/main/java/ru/vk/itmo/test/proninvalentin/reports/stage1/report.md new file mode 100644 index 000000000..51f222643 --- /dev/null +++ b/src/main/java/ru/vk/itmo/test/proninvalentin/reports/stage1/report.md @@ -0,0 +1,213 @@ +## PUT 10K RPS без прогрева сервера: + +Первым делом определим точку разладки нашего сервера. +В качестве запросов будем слать GET, запросы идут в пустую бд с только что запущенным сервером. + +### Перцентили: +``` + 50.000% 664.00us + 75.000% 0.95ms + 90.000% 1.13ms + 99.000% 2.00ms + 99.900% 10.98ms + 99.990% 24.13ms + 99.999% 25.09ms +100.000% 25.25ms +``` + +Видно, что время обработки запроса далеко от критичного, хотя тут конечно стоит смотреть на конкретный SLA у сервиса + +### CPU Flame Graph +![cpu-put-10000.png](aprof%2Fput%2Fcpu%2Fcpu-put-10000.png) + +На графике видно, что мы тратим на поллинг запросов 57% всего времени, думаю это из-за недостаточного количества самих запросов) +Обработка запроса занимает 31% + +На чтение из сокета уходит 16% от работы всего приложения + +3% на вставку в lsm и 9% на отправку ответа, думаю это не в последнюю очередь из-за скорости работы диска + +8% ушло на работу GC, компиляцию и прочие необходимые процессы, т.к. сервер не прогрет + +### ALLOC Flame Graph + +![alloc-put-10000.png](aprof%2Fput%2Falloc%2Falloc-put-10000.png) + +51% занимает парсинг тела запроса, если нырнуть в код one nio, то можно увидеть, что мы копируем тело запроса, аллоцируя память под массив байтов для него + +Часть памяти уходит на то, чтобы аллоцировать пустой Response со статусом Accepted. + +Подумал, что можно завести константное поле для него, но видно это будет уже на 30K RPS + +Также память выделяется в основном на конвертацию в MemorySegment + +## PUT 10K RPS с прогревом сервера: + +Сейчас в бд уже присутствует 1.5 гб данных + сервер не перезапускался после предыдущих замеров + +В процессе работы я заметил, что при вставке записей с одинаковым ключом, размер папки с данными не уменьшается. + +Причиной того является то, что в референсной реализации DAO не используется процесс compact +(сама реализация написана, но нигде нету ее вызова. + +Думаю необходимо добавить триггер при флаше на проверку размера директории и в случае превышения определенного порога, начинать процесс сжатия) + +По перцентилям ничего особо не поменялось - сервер продолжает справляться с нагрузкой, правда чуть шустрее, но я не думаю, что это из прогрева, т.к. при повторных запусках иногда сервер с прогревом справляется и чуть хуже. + +### Перцентили: +``` + 50.000% 659.00us + 75.000% 0.95ms + 90.000% 1.12ms + 99.000% 1.72ms + 99.900% 9.99ms + 99.990% 14.73ms + 99.999% 16.46ms +100.000% 16.77ms +``` + +### CPU Flame Graph + +![cpu-put-heated-10000.png](aprof%2Fput%2Fcpu%2Fcpu-put-heated-10000.png) + +На удивление, ничего толком и не поменялось, возможно, дело в том, что у меня выставлен трешхолд для флаша в 128 мб и вся работа происходит в памяти. + +По аллокациям тоже ничего не поменялось + +## PUT 20K RPS: + +### Перцентили: +``` + 50.000% 1.10ms + 75.000% 1.76ms + 90.000% 2.32ms + 99.000% 4.15ms + 99.900% 9.66ms + 99.990% 28.99ms + 99.999% 30.22ms +100.000% 30.35ms +``` + +Абсолютно идентичная ситуация, что и раньше, единственное, что время ответа увеличилось в два раза в редких ситуациях + +## PUT 30K RPS: + +Здесь и далее размер вставляемых элементов уменьшен в 10 раз, чтобы не переполнить диск + +### Перцентили: +``` + 50.000% 628.00us + 75.000% 0.93ms + 90.000% 1.11ms + 99.000% 8.65ms + 99.900% 35.13ms + 99.990% 62.40ms + 99.999% 65.09ms +100.000% 65.38ms +``` + +Видно, что серверу немного плохеет - подходим к точке разладки + +### CPU Flame Graph + +![cpu-put-30000.png](aprof%2Fput%2Fcpu%2Fcpu-put-30000.png) + +По CPU все ровно также, однако поллинг занимает в два раза меньше общего времени - 27%. +Предполагаю, что теперь сервер не успевает также быстро обрабатывать запросы как и раньше + +При добавлении констант для отправки ответа (ранее я заметил, что можно вместо создания одинаковых объектов для возвращения ответа с пустым телом сохранить их в память и каждый раз отдавать один и тот же объект) wrk почему-то начинает сбрасывать соединения с нашим сервером из-за чего появляется большое количество ошибок. + +Поэтому от мемоизации ответов было решено отказаться + +### Alloc Flame Graph + +![alloc-put-30000.png](aprof%2Fput%2Falloc%2Falloc-put-30000.png) + +## PUT 45K RPS: + +Заметна точка разладки + +### Перцентили: +``` + 50.000% 926.21ms + 75.000% 1.61s + 90.000% 1.76s + 99.000% 1.83s + 99.900% 1.83s + 99.990% 1.83s + 99.999% 1.83s +100.000% 1.83s +``` + +Можно сказать, что каждый пользователь будет получать ответ за 2 секунды + +### CPU Flame Graph + +![cpu-put-45000.png](aprof%2Fput%2Fcpu%2Fcpu-put-45000.png) + +### Alloc Flame Graph + +![alloc-put-45000.png](aprof%2Fput%2Falloc%2Falloc-put-45000.png) + +При этом графики особо ничем не отличаются от предыдущего пункта + +## GET 20K RPS 3GB DB: + +### Перцентили: +``` + 50.000% 616.00us + 75.000% 0.91ms + 90.000% 1.08ms + 99.000% 2.07ms + 99.900% 25.47ms + 99.990% 44.26ms + 99.999% 45.60ms +100.000% 45.73ms +``` + +### CPU Flame Graph + +![cpu-get-20000.png](aprof%2Fget%2Fcpu%2Fcpu-get-20000.png) + +Ситуация идентична PUT запросам: +* Обработка запроса (62%) +* Поллинг (16%) +* Запись в сокет (12%) +* Чтение из сокета (6%) + +Однако теперь основные затраты уходят на обработку самого запроса, связываю это со случайным доступом, тк в Lua скрипте я указываю случайный идентификатор записи. + +### Alloc Flame Graph + +![alloc-get-20000.png](aprof%2Fget%2Falloc%2Falloc-get-20000.png) + +Ситуация изменилась, т.к. теперь мы не читаем и пишем в бд, возвращая response с пустым телом, а читаем из бд, выделяя память в основном под ответ и перевод MemorySegment'a в byte array. +## GET 25K RPS 3GB DB: + +### Перцентили: +``` + 50.000% 0.92ms + 75.000% 472.83ms + 90.000% 2.46s + 99.000% 4.50s + 99.900% 4.64s + 99.990% 4.65s + 99.999% 4.65s +100.000% 4.65s +``` +### CPU Flame Graph + +![cpu-get-25000.png](aprof%2Fget%2Fcpu%2Fcpu-get-25000.png) + +### Alloc Flame Graph + +![alloc-get-25000.png](aprof%2Fget%2Falloc%2Falloc-get-25000.png) + +Ситуация идентичная, однако по перцентилям видна деградация работы сервиса + +# Возможные оптимизации + +* Включить compaction, чтобы, ускорить поиск и уменьшить объем занимаемой памяти +* Для поиска можно прикрутить фильтр блума, что в совокупности с большим трешхолдом может значительно ускорить поиск +* Хорошо бы иметь возможность получить id ввиде набор байт, чтобы не тратить память на перевод строки +* Также имеет смысл рассмотреть добавление кеша, если мы знаем, что обладаем горячими ключами \ No newline at end of file diff --git a/src/main/java/ru/vk/itmo/test/proninvalentin/reports/stage1/wrk/get/get-20000rps.txt b/src/main/java/ru/vk/itmo/test/proninvalentin/reports/stage1/wrk/get/get-20000rps.txt new file mode 100644 index 000000000..a61ff49fe --- /dev/null +++ b/src/main/java/ru/vk/itmo/test/proninvalentin/reports/stage1/wrk/get/get-20000rps.txt @@ -0,0 +1,132 @@ +wrk -d 2m -t 1 -c 1 -R 20000 -s get.lua -L http://localhost:8080/v0/entry +Running 2m test @ http://localhost:8080/v0/entry + 1 threads and 1 connections + Thread calibration: mean lat.: 1.057ms, rate sampling interval: 10ms + Thread Stats Avg Stdev Max +/- Stdev + Latency 693.76us 1.36ms 45.70ms 98.99% + Req/Sec 21.12k 1.77k 31.22k 67.93% + Latency Distribution (HdrHistogram - Recorded Latency) + 50.000% 616.00us + 75.000% 0.91ms + 90.000% 1.08ms + 99.000% 2.07ms + 99.900% 25.47ms + 99.990% 44.26ms + 99.999% 45.60ms +100.000% 45.73ms + + Detailed Percentile spectrum: + Value Percentile TotalCount 1/(1-Percentile) + + 0.026 0.000000 14 1.00 + 0.153 0.100000 220665 1.11 + 0.269 0.200000 441453 1.25 + 0.384 0.300000 660911 1.43 + 0.500 0.400000 881260 1.67 + 0.616 0.500000 1100698 2.00 + 0.674 0.550000 1210609 2.22 + 0.732 0.600000 1320487 2.50 + 0.790 0.650000 1430614 2.86 + 0.848 0.700000 1540906 3.33 + 0.906 0.750000 1651501 4.00 + 0.934 0.775000 1704927 4.44 + 0.963 0.800000 1760148 5.00 + 0.992 0.825000 1815403 5.71 + 1.021 0.850000 1870602 6.67 + 1.050 0.875000 1925968 8.00 + 1.064 0.887500 1952646 8.89 + 1.079 0.900000 1981086 10.00 + 1.093 0.912500 2007783 11.43 + 1.108 0.925000 2036134 13.33 + 1.123 0.937500 2064216 16.00 + 1.130 0.943750 2077399 17.78 + 1.137 0.950000 2090535 20.00 + 1.144 0.956250 2103762 22.86 + 1.152 0.962500 2119003 26.67 + 1.159 0.968750 2132416 32.00 + 1.162 0.971875 2138223 35.56 + 1.166 0.975000 2145826 40.00 + 1.170 0.978125 2152659 45.71 + 1.176 0.981250 2159119 53.33 + 1.269 0.984375 2165541 64.00 + 1.426 0.985938 2168972 71.11 + 1.640 0.987500 2172404 80.00 + 1.895 0.989062 2175850 91.43 + 2.207 0.990625 2179300 106.67 + 2.569 0.992188 2182722 128.00 + 2.793 0.992969 2184435 142.22 + 3.047 0.993750 2186151 160.00 + 3.381 0.994531 2187874 182.86 + 3.843 0.995313 2189588 213.33 + 4.839 0.996094 2191308 256.00 + 5.591 0.996484 2192169 284.44 + 6.583 0.996875 2193027 320.00 + 9.567 0.997266 2193886 365.71 + 11.199 0.997656 2194747 426.67 + 13.463 0.998047 2195608 512.00 + 14.351 0.998242 2196032 568.89 + 15.135 0.998437 2196468 640.00 + 15.807 0.998633 2196893 731.43 + 21.183 0.998828 2197321 853.33 + 25.935 0.999023 2197752 1024.00 + 28.431 0.999121 2197966 1137.78 + 30.575 0.999219 2198182 1280.00 + 32.959 0.999316 2198398 1462.86 + 35.263 0.999414 2198611 1706.67 + 37.599 0.999512 2198825 2048.00 + 38.527 0.999561 2198952 2275.56 + 38.815 0.999609 2199043 2560.00 + 39.487 0.999658 2199150 2925.71 + 40.639 0.999707 2199259 3413.33 + 41.567 0.999756 2199362 4096.00 + 42.143 0.999780 2199417 4551.11 + 42.719 0.999805 2199472 5120.00 + 43.263 0.999829 2199525 5851.43 + 43.679 0.999854 2199580 6826.67 + 43.967 0.999878 2199637 8192.00 + 44.095 0.999890 2199663 9102.22 + 44.319 0.999902 2199685 10240.00 + 44.543 0.999915 2199714 11702.86 + 44.735 0.999927 2199738 13653.33 + 45.055 0.999939 2199766 16384.00 + 45.151 0.999945 2199784 18204.44 + 45.183 0.999951 2199792 20480.00 + 45.279 0.999957 2199811 23405.71 + 45.343 0.999963 2199826 27306.67 + 45.407 0.999969 2199834 32768.00 + 45.471 0.999973 2199841 36408.89 + 45.503 0.999976 2199846 40960.00 + 45.535 0.999979 2199853 46811.43 + 45.567 0.999982 2199863 54613.33 + 45.599 0.999985 2199877 65536.00 + 45.599 0.999986 2199877 72817.78 + 45.599 0.999988 2199877 81920.00 + 45.599 0.999989 2199877 93622.86 + 45.631 0.999991 2199889 109226.67 + 45.631 0.999992 2199889 131072.00 + 45.631 0.999993 2199889 145635.56 + 45.631 0.999994 2199889 163840.00 + 45.631 0.999995 2199889 187245.71 + 45.631 0.999995 2199889 218453.33 + 45.663 0.999996 2199891 262144.00 + 45.695 0.999997 2199897 291271.11 + 45.695 0.999997 2199897 327680.00 + 45.695 0.999997 2199897 374491.43 + 45.695 0.999998 2199897 436906.67 + 45.695 0.999998 2199897 524288.00 + 45.695 0.999998 2199897 582542.22 + 45.695 0.999998 2199897 655360.00 + 45.695 0.999999 2199897 748982.86 + 45.695 0.999999 2199897 873813.33 + 45.695 0.999999 2199897 1048576.00 + 45.727 0.999999 2199899 1165084.44 + 45.727 1.000000 2199899 inf +#[Mean = 0.694, StdDeviation = 1.365] +#[Max = 45.696, Total count = 2199899] +#[Buckets = 27, SubBuckets = 2048] +---------------------------------------------------------- + 2399980 requests in 2.00m, 2.83GB read + Non-2xx or 3xx responses: 8 +Requests/sec: 19999.85 +Transfer/sec: 24.13MB +v \ No newline at end of file diff --git a/src/main/java/ru/vk/itmo/test/proninvalentin/reports/stage1/wrk/get/get-25000rps.txt b/src/main/java/ru/vk/itmo/test/proninvalentin/reports/stage1/wrk/get/get-25000rps.txt new file mode 100644 index 000000000..4825602a7 --- /dev/null +++ b/src/main/java/ru/vk/itmo/test/proninvalentin/reports/stage1/wrk/get/get-25000rps.txt @@ -0,0 +1,108 @@ +wrk -d 2m -t 1 -c 1 -R 25000 -s get.lua -L http://localhost:8080/v0/entry +Running 2m test @ http://localhost:8080/v0/entry + 1 threads and 1 connections + Thread calibration: mean lat.: 3668.263ms, rate sampling interval: 9363ms + Thread Stats Avg Stdev Max +/- Stdev + Latency 573.49ms 1.15s 4.65s 86.15% + Req/Sec 26.13k 1.93k 30.92k 81.82% + Latency Distribution (HdrHistogram - Recorded Latency) + 50.000% 0.92ms + 75.000% 472.83ms + 90.000% 2.46s + 99.000% 4.50s + 99.900% 4.64s + 99.990% 4.65s + 99.999% 4.65s +100.000% 4.65s + + Detailed Percentile spectrum: + Value Percentile TotalCount 1/(1-Percentile) + + 0.026 0.000000 2 1.00 + 0.217 0.100000 287697 1.11 + 0.392 0.200000 573530 1.25 + 0.567 0.300000 860674 1.43 + 0.742 0.400000 1147872 1.67 + 0.917 0.500000 1433514 2.00 + 1.004 0.550000 1576535 2.22 + 1.092 0.600000 1720687 2.50 + 1.179 0.650000 1863620 2.86 + 54.303 0.700000 2006302 3.33 + 472.831 0.750000 2149592 4.00 + 742.911 0.775000 2221343 4.44 + 1000.959 0.800000 2292885 5.00 + 1269.759 0.825000 2364565 5.71 + 1557.503 0.850000 2436192 6.67 + 1965.055 0.875000 2507891 8.00 + 2209.791 0.887500 2543766 8.89 + 2459.647 0.900000 2579557 10.00 + 2734.079 0.912500 2615369 11.43 + 3039.231 0.925000 2651192 13.33 + 3344.383 0.937500 2686965 16.00 + 3500.031 0.943750 2704947 17.78 + 3653.631 0.950000 2722877 20.00 + 3790.847 0.956250 2740909 22.86 + 3932.159 0.962500 2758861 26.67 + 4061.183 0.968750 2776807 32.00 + 4120.575 0.971875 2785496 35.56 + 4190.207 0.975000 2794748 40.00 + 4255.743 0.978125 2803601 45.71 + 4325.375 0.981250 2812877 53.33 + 4390.911 0.984375 2821700 64.00 + 4423.679 0.985938 2826054 71.11 + 4456.447 0.987500 2830444 80.00 + 4485.119 0.989062 2834885 91.43 + 4513.791 0.990625 2839550 106.67 + 4538.367 0.992188 2843939 128.00 + 4554.751 0.992969 2846481 142.22 + 4567.039 0.993750 2848366 160.00 + 4583.423 0.994531 2850930 182.86 + 4595.711 0.995313 2853235 213.33 + 4607.999 0.996094 2855040 256.00 + 4616.191 0.996484 2856920 284.44 + 4620.287 0.996875 2857496 320.00 + 4624.383 0.997266 2858277 365.71 + 4632.575 0.997656 2859847 426.67 + 4636.671 0.998047 2861343 512.00 + 4636.671 0.998242 2861343 568.89 + 4640.767 0.998437 2862448 640.00 + 4640.767 0.998633 2862448 731.43 + 4644.863 0.998828 2864349 853.33 + 4644.863 0.999023 2864349 1024.00 + 4644.863 0.999121 2864349 1137.78 + 4644.863 0.999219 2864349 1280.00 + 4644.863 0.999316 2864349 1462.86 + 4648.959 0.999414 2866024 1706.67 + 4648.959 0.999512 2866024 2048.00 + 4648.959 0.999561 2866024 2275.56 + 4648.959 0.999609 2866024 2560.00 + 4648.959 0.999658 2866024 2925.71 + 4648.959 0.999707 2866024 3413.33 + 4648.959 0.999756 2866024 4096.00 + 4648.959 0.999780 2866024 4551.11 + 4648.959 0.999805 2866024 5120.00 + 4648.959 0.999829 2866024 5851.43 + 4648.959 0.999854 2866024 6826.67 + 4648.959 0.999878 2866024 8192.00 + 4648.959 0.999890 2866024 9102.22 + 4648.959 0.999902 2866024 10240.00 + 4648.959 0.999915 2866024 11702.86 + 4648.959 0.999927 2866024 13653.33 + 4648.959 0.999939 2866024 16384.00 + 4648.959 0.999945 2866024 18204.44 + 4648.959 0.999951 2866024 20480.00 + 4648.959 0.999957 2866024 23405.71 + 4648.959 0.999963 2866024 27306.67 + 4648.959 0.999969 2866024 32768.00 + 4648.959 0.999973 2866024 36408.89 + 4648.959 0.999976 2866024 40960.00 + 4653.055 0.999979 2866092 46811.43 + 4653.055 1.000000 2866092 inf +#[Mean = 573.488, StdDeviation = 1154.763] +#[Max = 4648.960, Total count = 2866092] +#[Buckets = 27, SubBuckets = 2048] +---------------------------------------------------------- + 2999980 requests in 2.00m, 3.53GB read + Non-2xx or 3xx responses: 8 +Requests/sec: 24999.72 +Transfer/sec: 30.16MB \ No newline at end of file diff --git a/src/main/java/ru/vk/itmo/test/proninvalentin/reports/stage1/wrk/put/put_10000rps.txt b/src/main/java/ru/vk/itmo/test/proninvalentin/reports/stage1/wrk/put/put_10000rps.txt new file mode 100644 index 000000000..d602d7a34 --- /dev/null +++ b/src/main/java/ru/vk/itmo/test/proninvalentin/reports/stage1/wrk/put/put_10000rps.txt @@ -0,0 +1,130 @@ +wrk -d 2m -t 1 -c 1 -R 10000 -s put.lua -L http://localhost:8080/v0/entry +Running 2m test @ http://localhost:8080/v0/entry + 1 threads and 1 connections + Thread calibration: mean lat.: 1.029ms, rate sampling interval: 10ms + Thread Stats Avg Stdev Max +/- Stdev + Latency 704.86us 718.62us 25.23ms 98.22% + Req/Sec 10.57k 0.85k 29.80k 77.88% + Latency Distribution (HdrHistogram - Recorded Latency) + 50.000% 664.00us + 75.000% 0.95ms + 90.000% 1.13ms + 99.000% 2.00ms + 99.900% 10.98ms + 99.990% 24.13ms + 99.999% 25.09ms +100.000% 25.25ms + + Detailed Percentile spectrum: + Value Percentile TotalCount 1/(1-Percentile) + + 0.020 0.000000 2 1.00 + 0.193 0.100000 110366 1.11 + 0.312 0.200000 220370 1.25 + 0.430 0.300000 330068 1.43 + 0.548 0.400000 440573 1.67 + 0.664 0.500000 550035 2.00 + 0.723 0.550000 605770 2.22 + 0.781 0.600000 660837 2.50 + 0.839 0.650000 715611 2.86 + 0.897 0.700000 770128 3.33 + 0.955 0.750000 825043 4.00 + 0.984 0.775000 852586 4.44 + 1.013 0.800000 880122 5.00 + 1.042 0.825000 907573 5.71 + 1.071 0.850000 935086 6.67 + 1.100 0.875000 962678 8.00 + 1.115 0.887500 977095 8.89 + 1.129 0.900000 990592 10.00 + 1.143 0.912500 1003973 11.43 + 1.158 0.925000 1018414 13.33 + 1.172 0.937500 1031647 16.00 + 1.179 0.943750 1038320 17.78 + 1.187 0.950000 1045791 20.00 + 1.194 0.956250 1052502 22.86 + 1.201 0.962500 1058956 26.67 + 1.209 0.968750 1065729 32.00 + 1.214 0.971875 1069336 35.56 + 1.220 0.975000 1072540 40.00 + 1.236 0.978125 1075925 45.71 + 1.361 0.981250 1079339 53.33 + 1.569 0.984375 1082773 64.00 + 1.685 0.985938 1084491 71.11 + 1.801 0.987500 1086207 80.00 + 1.924 0.989062 1087928 91.43 + 2.051 0.990625 1089652 106.67 + 2.179 0.992188 1091369 128.00 + 2.283 0.992969 1092221 142.22 + 2.545 0.993750 1093089 160.00 + 2.881 0.994531 1093940 182.86 + 3.403 0.995313 1094800 213.33 + 4.075 0.996094 1095659 256.00 + 4.459 0.996484 1096092 284.44 + 4.763 0.996875 1096519 320.00 + 5.247 0.997266 1096948 365.71 + 5.879 0.997656 1097378 426.67 + 6.827 0.998047 1097807 512.00 + 7.199 0.998242 1098024 568.89 + 7.899 0.998437 1098237 640.00 + 9.215 0.998633 1098452 731.43 + 10.399 0.998828 1098666 853.33 + 11.135 0.999023 1098882 1024.00 + 11.543 0.999121 1098989 1137.78 + 12.119 0.999219 1099096 1280.00 + 12.527 0.999316 1099204 1462.86 + 13.119 0.999414 1099312 1706.67 + 15.063 0.999512 1099418 2048.00 + 16.751 0.999561 1099472 2275.56 + 18.015 0.999609 1099526 2560.00 + 18.767 0.999658 1099580 2925.71 + 19.231 0.999707 1099633 3413.33 + 20.607 0.999756 1099687 4096.00 + 21.455 0.999780 1099715 4551.11 + 22.287 0.999805 1099741 5120.00 + 22.927 0.999829 1099768 5851.43 + 23.423 0.999854 1099795 6826.67 + 23.807 0.999878 1099821 8192.00 + 24.031 0.999890 1099837 9102.22 + 24.159 0.999902 1099849 10240.00 + 24.239 0.999915 1099862 11702.86 + 24.335 0.999927 1099877 13653.33 + 24.399 0.999939 1099889 16384.00 + 24.447 0.999945 1099899 18204.44 + 24.543 0.999951 1099902 20480.00 + 24.623 0.999957 1099909 23405.71 + 24.719 0.999963 1099916 27306.67 + 24.783 0.999969 1099922 32768.00 + 24.847 0.999973 1099926 36408.89 + 24.895 0.999976 1099929 40960.00 + 24.943 0.999979 1099933 46811.43 + 24.975 0.999982 1099935 54613.33 + 25.023 0.999985 1099939 65536.00 + 25.039 0.999986 1099940 72817.78 + 25.071 0.999988 1099942 81920.00 + 25.087 0.999989 1099944 93622.86 + 25.119 0.999991 1099945 109226.67 + 25.151 0.999992 1099948 131072.00 + 25.151 0.999993 1099948 145635.56 + 25.167 0.999994 1099949 163840.00 + 25.183 0.999995 1099950 187245.71 + 25.183 0.999995 1099950 218453.33 + 25.199 0.999996 1099951 262144.00 + 25.215 0.999997 1099952 291271.11 + 25.215 0.999997 1099952 327680.00 + 25.231 0.999997 1099954 374491.43 + 25.231 0.999998 1099954 436906.67 + 25.231 0.999998 1099954 524288.00 + 25.231 0.999998 1099954 582542.22 + 25.231 0.999998 1099954 655360.00 + 25.231 0.999999 1099954 748982.86 + 25.231 0.999999 1099954 873813.33 + 25.231 0.999999 1099954 1048576.00 + 25.247 0.999999 1099955 1165084.44 + 25.247 1.000000 1099955 inf +#[Mean = 0.705, StdDeviation = 0.719] +#[Max = 25.232, Total count = 1099955] +#[Buckets = 27, SubBuckets = 2048] +---------------------------------------------------------- + 1199998 requests in 2.00m, 76.68MB read +Requests/sec: 9999.89 +Transfer/sec: 654.29KB \ No newline at end of file diff --git a/src/main/java/ru/vk/itmo/test/proninvalentin/reports/stage1/wrk/put/put_20000rps.txt b/src/main/java/ru/vk/itmo/test/proninvalentin/reports/stage1/wrk/put/put_20000rps.txt new file mode 100644 index 000000000..f660a8f9c --- /dev/null +++ b/src/main/java/ru/vk/itmo/test/proninvalentin/reports/stage1/wrk/put/put_20000rps.txt @@ -0,0 +1,125 @@ +wrk -d 2m -t 1 -c 1 -R 20000 -s put.lua -L http://localhost:8080/v0/entry +Running 2m test @ http://localhost:8080/v0/entry + 1 threads and 1 connections + Thread calibration: mean lat.: 1.717ms, rate sampling interval: 10ms + Thread Stats Avg Stdev Max +/- Stdev + Latency 1.28ms 1.06ms 30.34ms 81.97% + Req/Sec 21.13k 2.95k 49.78k 73.92% + Latency Distribution (HdrHistogram - Recorded Latency) + 50.000% 1.10ms + 75.000% 1.76ms + 90.000% 2.32ms + 99.000% 4.15ms + 99.900% 9.66ms + 99.990% 28.99ms + 99.999% 30.22ms +100.000% 30.35ms + + Detailed Percentile spectrum: + Value Percentile TotalCount 1/(1-Percentile) + + 0.016 0.000000 1 1.00 + 0.256 0.100000 220644 1.11 + 0.482 0.200000 440291 1.25 + 0.702 0.300000 660858 1.43 + 0.911 0.400000 880688 1.67 + 1.098 0.500000 1100271 2.00 + 1.183 0.550000 1210469 2.22 + 1.328 0.600000 1320219 2.50 + 1.472 0.650000 1430298 2.86 + 1.618 0.700000 1540610 3.33 + 1.765 0.750000 1650204 4.00 + 1.840 0.775000 1705189 4.44 + 1.917 0.800000 1760533 5.00 + 1.995 0.825000 1815129 5.71 + 2.077 0.850000 1870432 6.67 + 2.165 0.875000 1925207 8.00 + 2.217 0.887500 1952666 8.89 + 2.317 0.900000 1980169 10.00 + 2.455 0.912500 2007474 11.43 + 2.609 0.925000 2034965 13.33 + 2.773 0.937500 2062435 16.00 + 2.863 0.943750 2076411 17.78 + 2.957 0.950000 2089979 20.00 + 3.061 0.956250 2103859 22.86 + 3.175 0.962500 2117594 26.67 + 3.301 0.968750 2131192 32.00 + 3.375 0.971875 2138086 35.56 + 3.461 0.975000 2144979 40.00 + 3.565 0.978125 2151833 45.71 + 3.691 0.981250 2158715 53.33 + 3.835 0.984375 2165607 64.00 + 3.913 0.985938 2169009 71.11 + 3.997 0.987500 2172434 80.00 + 4.091 0.989062 2175911 91.43 + 4.195 0.990625 2179356 106.67 + 4.315 0.992188 2182812 128.00 + 4.391 0.992969 2184488 142.22 + 4.495 0.993750 2186185 160.00 + 4.823 0.994531 2187896 182.86 + 5.451 0.995313 2189607 213.33 + 6.223 0.996094 2191332 256.00 + 6.663 0.996484 2192184 284.44 + 7.079 0.996875 2193048 320.00 + 7.455 0.997266 2193903 365.71 + 7.863 0.997656 2194764 426.67 + 8.311 0.998047 2195637 512.00 + 8.551 0.998242 2196050 568.89 + 8.799 0.998437 2196483 640.00 + 9.103 0.998633 2196915 731.43 + 9.375 0.998828 2197339 853.33 + 9.711 0.999023 2197772 1024.00 + 9.951 0.999121 2197991 1137.78 + 10.215 0.999219 2198199 1280.00 + 10.591 0.999316 2198415 1462.86 + 11.399 0.999414 2198628 1706.67 + 12.807 0.999512 2198843 2048.00 + 13.975 0.999561 2198952 2275.56 + 15.055 0.999609 2199058 2560.00 + 16.039 0.999658 2199166 2925.71 + 18.015 0.999707 2199273 3413.33 + 21.055 0.999756 2199380 4096.00 + 22.607 0.999780 2199434 4551.11 + 24.127 0.999805 2199488 5120.00 + 25.647 0.999829 2199542 5851.43 + 27.103 0.999854 2199595 6826.67 + 28.591 0.999878 2199649 8192.00 + 28.847 0.999890 2199679 9102.22 + 29.055 0.999902 2199704 10240.00 + 29.199 0.999915 2199731 11702.86 + 29.359 0.999927 2199756 13653.33 + 29.519 0.999939 2199785 16384.00 + 29.599 0.999945 2199798 18204.44 + 29.711 0.999951 2199812 20480.00 + 29.775 0.999957 2199826 23405.71 + 29.855 0.999963 2199838 27306.67 + 29.951 0.999969 2199852 32768.00 + 29.983 0.999973 2199857 36408.89 + 30.031 0.999976 2199866 40960.00 + 30.063 0.999979 2199872 46811.43 + 30.095 0.999982 2199877 54613.33 + 30.143 0.999985 2199884 65536.00 + 30.175 0.999986 2199889 72817.78 + 30.191 0.999988 2199891 81920.00 + 30.223 0.999989 2199895 93622.86 + 30.239 0.999991 2199898 109226.67 + 30.255 0.999992 2199901 131072.00 + 30.271 0.999993 2199902 145635.56 + 30.287 0.999994 2199905 163840.00 + 30.303 0.999995 2199907 187245.71 + 30.303 0.999995 2199907 218453.33 + 30.319 0.999996 2199909 262144.00 + 30.335 0.999997 2199913 291271.11 + 30.335 0.999997 2199913 327680.00 + 30.335 0.999997 2199913 374491.43 + 30.335 0.999998 2199913 436906.67 + 30.335 0.999998 2199913 524288.00 + 30.351 0.999998 2199917 582542.22 + 30.351 1.000000 2199917 inf +#[Mean = 1.278, StdDeviation = 1.061] +#[Max = 30.336, Total count = 2199917] +#[Buckets = 27, SubBuckets = 2048] +---------------------------------------------------------- + 2399971 requests in 2.00m, 153.35MB read +Requests/sec: 19999.77 +Transfer/sec: 1.28MB \ No newline at end of file diff --git a/src/main/java/ru/vk/itmo/test/proninvalentin/reports/stage1/wrk/put/put_30000rps.txt b/src/main/java/ru/vk/itmo/test/proninvalentin/reports/stage1/wrk/put/put_30000rps.txt new file mode 100644 index 000000000..2cdc12749 --- /dev/null +++ b/src/main/java/ru/vk/itmo/test/proninvalentin/reports/stage1/wrk/put/put_30000rps.txt @@ -0,0 +1,133 @@ +wrk -d 2m -t 1 -c 1 -R 30000 -s put.lua -L http://localhost:8080/v0/entry +Running 2m test @ http://localhost:8080/v0/entry + 1 threads and 1 connections + Thread calibration: mean lat.: 2.656ms, rate sampling interval: 10ms + Thread Stats Avg Stdev Max +/- Stdev + Latency 0.88ms 2.34ms 65.34ms 97.90% + Req/Sec 31.72k 3.62k 53.67k 84.17% + Latency Distribution (HdrHistogram - Recorded Latency) + 50.000% 628.00us + 75.000% 0.93ms + 90.000% 1.11ms + 99.000% 8.65ms + 99.900% 35.13ms + 99.990% 62.40ms + 99.999% 65.09ms +100.000% 65.38ms + + Detailed Percentile spectrum: + Value Percentile TotalCount 1/(1-Percentile) + + 0.015 0.000000 1 1.00 + 0.146 0.100000 331085 1.11 + 0.268 0.200000 661751 1.25 + 0.389 0.300000 992069 1.43 + 0.509 0.400000 1321404 1.67 + 0.628 0.500000 1650287 2.00 + 0.688 0.550000 1816599 2.22 + 0.747 0.600000 1980206 2.50 + 0.807 0.650000 2146349 2.86 + 0.866 0.700000 2309751 3.33 + 0.926 0.750000 2476330 4.00 + 0.956 0.775000 2559444 4.44 + 0.985 0.800000 2639664 5.00 + 1.015 0.825000 2722376 5.71 + 1.045 0.850000 2805126 6.67 + 1.075 0.875000 2887281 8.00 + 1.091 0.887500 2930819 8.89 + 1.106 0.900000 2971590 10.00 + 1.121 0.912500 3012162 11.43 + 1.136 0.925000 3052419 13.33 + 1.152 0.937500 3095157 16.00 + 1.170 0.943750 3114053 17.78 + 1.413 0.950000 3134436 20.00 + 1.723 0.956250 3155030 22.86 + 2.041 0.962500 3175685 26.67 + 2.377 0.968750 3196289 32.00 + 2.573 0.971875 3206658 35.56 + 2.805 0.975000 3216942 40.00 + 3.111 0.978125 3227223 45.71 + 3.669 0.981250 3237526 53.33 + 4.323 0.984375 3247838 64.00 + 4.675 0.985938 3253006 71.11 + 5.307 0.987500 3258132 80.00 + 7.371 0.989062 3263284 91.43 + 9.583 0.990625 3268443 106.67 + 11.887 0.992188 3273603 128.00 + 13.055 0.992969 3276180 142.22 + 14.311 0.993750 3278748 160.00 + 15.639 0.994531 3281324 182.86 + 17.103 0.995313 3283925 213.33 + 18.799 0.996094 3286494 256.00 + 19.839 0.996484 3287767 284.44 + 20.815 0.996875 3289060 320.00 + 22.031 0.997266 3290353 365.71 + 23.487 0.997656 3291635 426.67 + 25.407 0.998047 3292926 512.00 + 26.671 0.998242 3293570 568.89 + 28.671 0.998437 3294215 640.00 + 30.719 0.998633 3294858 731.43 + 32.191 0.998828 3295502 853.33 + 35.519 0.999023 3296147 1024.00 + 37.023 0.999121 3296469 1137.78 + 38.431 0.999219 3296796 1280.00 + 41.727 0.999316 3297111 1462.86 + 45.503 0.999414 3297433 1706.67 + 49.599 0.999512 3297757 2048.00 + 51.423 0.999561 3297919 2275.56 + 53.055 0.999609 3298082 2560.00 + 54.911 0.999658 3298239 2925.71 + 56.767 0.999707 3298401 3413.33 + 58.015 0.999756 3298563 4096.00 + 58.783 0.999780 3298645 4551.11 + 59.551 0.999805 3298722 5120.00 + 60.351 0.999829 3298803 5851.43 + 61.183 0.999854 3298884 6826.67 + 61.919 0.999878 3298965 8192.00 + 62.271 0.999890 3299015 9102.22 + 62.495 0.999902 3299046 10240.00 + 62.879 0.999915 3299088 11702.86 + 63.231 0.999927 3299125 13653.33 + 63.615 0.999939 3299166 16384.00 + 63.807 0.999945 3299187 18204.44 + 63.999 0.999951 3299207 20480.00 + 64.191 0.999957 3299229 23405.71 + 64.351 0.999963 3299247 27306.67 + 64.543 0.999969 3299268 32768.00 + 64.639 0.999973 3299279 36408.89 + 64.703 0.999976 3299288 40960.00 + 64.799 0.999979 3299298 46811.43 + 64.863 0.999982 3299306 54613.33 + 64.959 0.999985 3299318 65536.00 + 64.991 0.999986 3299321 72817.78 + 65.055 0.999988 3299331 81920.00 + 65.055 0.999989 3299331 93622.86 + 65.087 0.999991 3299336 109226.67 + 65.151 0.999992 3299343 131072.00 + 65.183 0.999993 3299347 145635.56 + 65.183 0.999994 3299347 163840.00 + 65.215 0.999995 3299349 187245.71 + 65.247 0.999995 3299353 218453.33 + 65.279 0.999996 3299357 262144.00 + 65.279 0.999997 3299357 291271.11 + 65.279 0.999997 3299357 327680.00 + 65.311 0.999997 3299360 374491.43 + 65.311 0.999998 3299360 436906.67 + 65.311 0.999998 3299360 524288.00 + 65.343 0.999998 3299364 582542.22 + 65.343 0.999998 3299364 655360.00 + 65.343 0.999999 3299364 748982.86 + 65.343 0.999999 3299364 873813.33 + 65.343 0.999999 3299364 1048576.00 + 65.343 0.999999 3299364 1165084.44 + 65.343 0.999999 3299364 1310720.00 + 65.343 0.999999 3299364 1497965.71 + 65.375 0.999999 3299366 1747626.67 + 65.375 1.000000 3299366 inf +#[Mean = 0.884, StdDeviation = 2.339] +#[Max = 65.344, Total count = 3299366] +#[Buckets = 27, SubBuckets = 2048] +---------------------------------------------------------- + 3599491 requests in 2.00m, 229.99MB read +Requests/sec: 29995.82 +Transfer/sec: 1.92MB \ No newline at end of file diff --git a/src/main/java/ru/vk/itmo/test/proninvalentin/reports/stage1/wrk/put/put_45000rps.txt b/src/main/java/ru/vk/itmo/test/proninvalentin/reports/stage1/wrk/put/put_45000rps.txt new file mode 100644 index 000000000..f868c321e --- /dev/null +++ b/src/main/java/ru/vk/itmo/test/proninvalentin/reports/stage1/wrk/put/put_45000rps.txt @@ -0,0 +1,118 @@ +lua_scripts % wrk -d 2m -t 1 -c 1 -R 45000 -s put.lua -L http://localhost:8080/v0/entry +Running 2m test @ http://localhost:8080/v0/entry + 1 threads and 1 connections + Thread calibration: mean lat.: 27.143ms, rate sampling interval: 192ms + Thread Stats Avg Stdev Max +/- Stdev + Latency 2.80ms 8.13ms 72.32ms 93.27% + Req/Sec 45.12k 1.42k 49.12k 86.54% + Latency Distribution (HdrHistogram - Recorded Latency) + 50.000% 702.00us + 75.000% 1.03ms + 90.000% 5.60ms + 99.000% 48.35ms + 99.900% 68.22ms + 99.990% 71.94ms + 99.999% 72.32ms +100.000% 72.38ms + + Detailed Percentile spectrum: + Value Percentile TotalCount 1/(1-Percentile) + + 0.014 0.000000 4 1.00 + 0.164 0.100000 495119 1.11 + 0.300 0.200000 991243 1.25 + 0.436 0.300000 1488065 1.43 + 0.569 0.400000 1982991 1.67 + 0.702 0.500000 2476863 2.00 + 0.768 0.550000 2722987 2.22 + 0.836 0.600000 2971619 2.50 + 0.903 0.650000 3220156 2.86 + 0.969 0.700000 3466292 3.33 + 1.035 0.750000 3714455 4.00 + 1.068 0.775000 3838441 4.44 + 1.101 0.800000 3963568 5.00 + 1.133 0.825000 4083783 5.71 + 1.185 0.850000 4207744 6.67 + 2.681 0.875000 4331156 8.00 + 3.785 0.887500 4392919 8.89 + 5.603 0.900000 4454845 10.00 + 7.723 0.912500 4516713 11.43 + 9.735 0.925000 4578754 13.33 + 11.783 0.937500 4640621 16.00 + 13.079 0.943750 4671336 17.78 + 14.679 0.950000 4702378 20.00 + 16.047 0.956250 4733211 22.86 + 18.895 0.962500 4764162 26.67 + 23.615 0.968750 4795071 32.00 + 25.871 0.971875 4810548 35.56 + 29.087 0.975000 4826111 40.00 + 32.399 0.978125 4841510 45.71 + 34.943 0.981250 4857122 53.33 + 40.415 0.984375 4872474 64.00 + 42.943 0.985938 4880222 71.11 + 45.375 0.987500 4887924 80.00 + 47.391 0.989062 4895617 91.43 + 49.567 0.990625 4903397 106.67 + 52.575 0.992188 4911110 128.00 + 54.111 0.992969 4914951 142.22 + 55.807 0.993750 4918872 160.00 + 57.791 0.994531 4922685 182.86 + 59.615 0.995313 4926562 213.33 + 61.471 0.996094 4930495 256.00 + 62.303 0.996484 4932384 284.44 + 62.975 0.996875 4934363 320.00 + 63.743 0.997266 4936321 365.71 + 64.607 0.997656 4938195 426.67 + 65.727 0.998047 4940105 512.00 + 66.303 0.998242 4941051 568.89 + 66.879 0.998437 4942100 640.00 + 67.327 0.998633 4943070 731.43 + 67.839 0.998828 4943996 853.33 + 68.223 0.999023 4944939 1024.00 + 68.351 0.999121 4945507 1137.78 + 68.543 0.999219 4945947 1280.00 + 68.927 0.999316 4946405 1462.86 + 69.375 0.999414 4946888 1706.67 + 69.887 0.999512 4947377 2048.00 + 70.527 0.999561 4947578 2275.56 + 70.783 0.999609 4947817 2560.00 + 71.039 0.999658 4948067 2925.71 + 71.295 0.999707 4948302 3413.33 + 71.551 0.999756 4948599 4096.00 + 71.615 0.999780 4948721 4551.11 + 71.679 0.999805 4948834 5120.00 + 71.743 0.999829 4948927 5851.43 + 71.871 0.999854 4949130 6826.67 + 71.935 0.999878 4949287 8192.00 + 71.935 0.999890 4949287 9102.22 + 71.935 0.999902 4949287 10240.00 + 71.999 0.999915 4949387 11702.86 + 72.063 0.999927 4949478 13653.33 + 72.063 0.999939 4949478 16384.00 + 72.127 0.999945 4949527 18204.44 + 72.127 0.999951 4949527 20480.00 + 72.191 0.999957 4949608 23405.71 + 72.191 0.999963 4949608 27306.67 + 72.191 0.999969 4949608 32768.00 + 72.255 0.999973 4949672 36408.89 + 72.255 0.999976 4949672 40960.00 + 72.255 0.999979 4949672 46811.43 + 72.255 0.999982 4949672 54613.33 + 72.319 0.999985 4949724 65536.00 + 72.319 0.999986 4949724 72817.78 + 72.319 0.999988 4949724 81920.00 + 72.319 0.999989 4949724 93622.86 + 72.319 0.999991 4949724 109226.67 + 72.319 0.999992 4949724 131072.00 + 72.319 0.999993 4949724 145635.56 + 72.319 0.999994 4949724 163840.00 + 72.319 0.999995 4949724 187245.71 + 72.383 0.999995 4949750 218453.33 + 72.383 1.000000 4949750 inf +#[Mean = 2.801, StdDeviation = 8.128] +#[Max = 72.320, Total count = 4949750] +#[Buckets = 27, SubBuckets = 2048] +---------------------------------------------------------- + 5399941 requests in 2.00m, 345.04MB read +Requests/sec: 44999.55 +Transfer/sec: 2.88MB \ No newline at end of file diff --git a/src/main/java/ru/vk/itmo/test/proninvalentin/reports/stage1/wrk/put/put_48000rps.txt b/src/main/java/ru/vk/itmo/test/proninvalentin/reports/stage1/wrk/put/put_48000rps.txt new file mode 100644 index 000000000..680485018 --- /dev/null +++ b/src/main/java/ru/vk/itmo/test/proninvalentin/reports/stage1/wrk/put/put_48000rps.txt @@ -0,0 +1,103 @@ +wrk -d 2m -t 1 -c 1 -R 48000 -s put.lua -L http://localhost:8080/v0/entry +Running 2m test @ http://localhost:8080/v0/entry + 1 threads and 1 connections + Thread calibration: mean lat.: 191.535ms, rate sampling interval: 563ms + Thread Stats Avg Stdev Max +/- Stdev + Latency 1.12s 477.88ms 1.83s 55.98% + Req/Sec 47.38k 1.90k 49.25k 94.36% + Latency Distribution (HdrHistogram - Recorded Latency) + 50.000% 926.21ms + 75.000% 1.61s + 90.000% 1.76s + 99.000% 1.83s + 99.900% 1.83s + 99.990% 1.83s + 99.999% 1.83s +100.000% 1.83s + + Detailed Percentile spectrum: + Value Percentile TotalCount 1/(1-Percentile) + + 298.751 0.000000 14 1.00 + 466.943 0.100000 525015 1.11 + 691.711 0.200000 1043562 1.25 + 798.207 0.300000 1576985 1.43 + 842.751 0.400000 2083462 1.67 + 926.207 0.500000 2607273 2.00 + 1176.575 0.550000 2863576 2.22 + 1359.871 0.600000 3130564 2.50 + 1440.767 0.650000 3398093 2.86 + 1539.071 0.700000 3655228 3.33 + 1613.823 0.750000 3912793 4.00 + 1641.471 0.775000 4054595 4.44 + 1651.711 0.800000 4174806 5.00 + 1673.215 0.825000 4297819 5.71 + 1716.223 0.850000 4435301 6.67 + 1745.919 0.875000 4566374 8.00 + 1747.967 0.887500 4628254 8.89 + 1758.207 0.900000 4687654 10.00 + 1789.951 0.912500 4761391 11.43 + 1791.999 0.925000 4819545 13.33 + 1795.071 0.937500 4885838 16.00 + 1804.287 0.943750 4921828 17.78 + 1807.359 0.950000 4964950 20.00 + 1809.407 0.956250 4983411 22.86 + 1814.527 0.962500 5016877 26.67 + 1816.575 0.968750 5046348 32.00 + 1818.623 0.971875 5080481 35.56 + 1818.623 0.975000 5080481 40.00 + 1819.647 0.978125 5120198 45.71 + 1819.647 0.981250 5120198 53.33 + 1820.671 0.984375 5129911 64.00 + 1821.695 0.985938 5135651 71.11 + 1826.815 0.987500 5141562 80.00 + 1828.863 0.989062 5149967 91.43 + 1829.887 0.990625 5180305 106.67 + 1829.887 0.992188 5180305 128.00 + 1829.887 0.992969 5180305 142.22 + 1829.887 0.993750 5180305 160.00 + 1829.887 0.994531 5180305 182.86 + 1830.911 0.995313 5206226 213.33 + 1830.911 0.996094 5206226 256.00 + 1830.911 0.996484 5206226 284.44 + 1830.911 0.996875 5206226 320.00 + 1830.911 0.997266 5206226 365.71 + 1830.911 0.997656 5206226 426.67 + 1830.911 0.998047 5206226 512.00 + 1830.911 0.998242 5206226 568.89 + 1830.911 0.998437 5206226 640.00 + 1830.911 0.998633 5206226 731.43 + 1830.911 0.998828 5206226 853.33 + 1830.911 0.999023 5206226 1024.00 + 1830.911 0.999121 5206226 1137.78 + 1830.911 0.999219 5206226 1280.00 + 1830.911 0.999316 5206226 1462.86 + 1830.911 0.999414 5206226 1706.67 + 1830.911 0.999512 5206226 2048.00 + 1830.911 0.999561 5206226 2275.56 + 1830.911 0.999609 5206226 2560.00 + 1830.911 0.999658 5206226 2925.71 + 1830.911 0.999707 5206226 3413.33 + 1830.911 0.999756 5206226 4096.00 + 1830.911 0.999780 5206226 4551.11 + 1830.911 0.999805 5206226 5120.00 + 1830.911 0.999829 5206226 5851.43 + 1830.911 0.999854 5206226 6826.67 + 1830.911 0.999878 5206226 8192.00 + 1830.911 0.999890 5206226 9102.22 + 1830.911 0.999902 5206226 10240.00 + 1830.911 0.999915 5206226 11702.86 + 1830.911 0.999927 5206226 13653.33 + 1830.911 0.999939 5206226 16384.00 + 1830.911 0.999945 5206226 18204.44 + 1830.911 0.999951 5206226 20480.00 + 1830.911 0.999957 5206226 23405.71 + 1831.935 0.999963 5206432 27306.67 + 1831.935 1.000000 5206432 inf +#[Mean = 1118.631, StdDeviation = 477.880] +#[Max = 1830.912, Total count = 5206432] +#[Buckets = 27, SubBuckets = 2048] +---------------------------------------------------------- + 5672316 requests in 2.00m, 362.44MB read +Requests/sec: 47269.37 +Transfer/sec: 3.02MB \ No newline at end of file diff --git a/src/main/java/ru/vk/itmo/test/proninvalentin/reports/stage1/wrk/put/put_heated_10000rps.txt b/src/main/java/ru/vk/itmo/test/proninvalentin/reports/stage1/wrk/put/put_heated_10000rps.txt new file mode 100644 index 000000000..2d67419cd --- /dev/null +++ b/src/main/java/ru/vk/itmo/test/proninvalentin/reports/stage1/wrk/put/put_heated_10000rps.txt @@ -0,0 +1,125 @@ +wrk -d 2m -t 1 -c 1 -R 10000 -s put.lua -L http://localhost:8080/v0/entry +Running 2m test @ http://localhost:8080/v0/entry + 1 threads and 1 connections + Thread calibration: mean lat.: 0.878ms, rate sampling interval: 10ms + Thread Stats Avg Stdev Max +/- Stdev + Latency 693.62us 620.56us 16.75ms 98.44% + Req/Sec 10.56k 827.17 23.44k 77.73% + Latency Distribution (HdrHistogram - Recorded Latency) + 50.000% 659.00us + 75.000% 0.95ms + 90.000% 1.12ms + 99.000% 1.72ms + 99.900% 9.99ms + 99.990% 14.73ms + 99.999% 16.46ms +100.000% 16.77ms + + Detailed Percentile spectrum: + Value Percentile TotalCount 1/(1-Percentile) + + 0.021 0.000000 1 1.00 + 0.192 0.100000 110094 1.11 + 0.310 0.200000 220418 1.25 + 0.427 0.300000 330607 1.43 + 0.543 0.400000 440361 1.67 + 0.659 0.500000 550638 2.00 + 0.716 0.550000 605078 2.22 + 0.774 0.600000 660300 2.50 + 0.832 0.650000 715626 2.86 + 0.890 0.700000 770526 3.33 + 0.948 0.750000 825682 4.00 + 0.977 0.775000 853243 4.44 + 1.005 0.800000 879990 5.00 + 1.034 0.825000 907470 5.71 + 1.063 0.850000 935381 6.67 + 1.092 0.875000 963075 8.00 + 1.106 0.887500 976398 8.89 + 1.120 0.900000 989979 10.00 + 1.135 0.912500 1004234 11.43 + 1.149 0.925000 1017656 13.33 + 1.164 0.937500 1031893 16.00 + 1.171 0.943750 1038540 17.78 + 1.178 0.950000 1045188 20.00 + 1.186 0.956250 1052637 22.86 + 1.193 0.962500 1059276 26.67 + 1.200 0.968750 1065840 32.00 + 1.204 0.971875 1069323 35.56 + 1.208 0.975000 1072695 40.00 + 1.213 0.978125 1076359 45.71 + 1.219 0.981250 1079721 53.33 + 1.230 0.984375 1082772 64.00 + 1.266 0.985938 1084498 71.11 + 1.402 0.987500 1086213 80.00 + 1.590 0.989062 1087925 91.43 + 1.801 0.990625 1089639 106.67 + 2.018 0.992188 1091364 128.00 + 2.129 0.992969 1092216 142.22 + 2.287 0.993750 1093081 160.00 + 3.073 0.994531 1093934 182.86 + 3.753 0.995313 1094793 213.33 + 4.583 0.996094 1095653 256.00 + 5.087 0.996484 1096084 284.44 + 5.635 0.996875 1096512 320.00 + 6.251 0.997266 1096945 365.71 + 6.851 0.997656 1097372 426.67 + 7.391 0.998047 1097801 512.00 + 7.579 0.998242 1098020 568.89 + 8.011 0.998437 1098231 640.00 + 8.551 0.998633 1098448 731.43 + 9.255 0.998828 1098661 853.33 + 10.111 0.999023 1098876 1024.00 + 10.575 0.999121 1098985 1137.78 + 11.031 0.999219 1099090 1280.00 + 11.311 0.999316 1099198 1462.86 + 11.679 0.999414 1099307 1706.67 + 11.855 0.999512 1099412 2048.00 + 12.103 0.999561 1099467 2275.56 + 12.303 0.999609 1099521 2560.00 + 12.503 0.999658 1099576 2925.71 + 12.855 0.999707 1099628 3413.33 + 13.223 0.999756 1099681 4096.00 + 13.383 0.999780 1099708 4551.11 + 13.543 0.999805 1099735 5120.00 + 13.727 0.999829 1099762 5851.43 + 13.967 0.999854 1099788 6826.67 + 14.367 0.999878 1099815 8192.00 + 14.583 0.999890 1099829 9102.22 + 14.799 0.999902 1099843 10240.00 + 15.015 0.999915 1099856 11702.86 + 15.223 0.999927 1099869 13653.33 + 15.383 0.999939 1099882 16384.00 + 15.511 0.999945 1099890 18204.44 + 15.615 0.999951 1099896 20480.00 + 15.727 0.999957 1099903 23405.71 + 15.815 0.999963 1099909 27306.67 + 15.959 0.999969 1099916 32768.00 + 15.991 0.999973 1099919 36408.89 + 16.039 0.999976 1099923 40960.00 + 16.119 0.999979 1099926 46811.43 + 16.199 0.999982 1099929 54613.33 + 16.319 0.999985 1099933 65536.00 + 16.343 0.999986 1099934 72817.78 + 16.399 0.999988 1099936 81920.00 + 16.463 0.999989 1099938 93622.86 + 16.495 0.999991 1099939 109226.67 + 16.559 0.999992 1099941 131072.00 + 16.591 0.999993 1099942 145635.56 + 16.623 0.999994 1099943 163840.00 + 16.655 0.999995 1099944 187245.71 + 16.655 0.999995 1099944 218453.33 + 16.671 0.999996 1099945 262144.00 + 16.703 0.999997 1099946 291271.11 + 16.703 0.999997 1099946 327680.00 + 16.735 0.999997 1099947 374491.43 + 16.735 0.999998 1099947 436906.67 + 16.735 0.999998 1099947 524288.00 + 16.767 0.999998 1099949 582542.22 + 16.767 1.000000 1099949 inf +#[Mean = 0.694, StdDeviation = 0.621] +#[Max = 16.752, Total count = 1099949] +#[Buckets = 27, SubBuckets = 2048] +---------------------------------------------------------- + 1199990 requests in 2.00m, 76.67MB read +Requests/sec: 9999.91 +Transfer/sec: 654.29KB \ No newline at end of file