diff --git a/src/main/java/ru/vk/itmo/test/alenkovayulya/ServerImpl.java b/src/main/java/ru/vk/itmo/test/alenkovayulya/ServerImpl.java new file mode 100644 index 000000000..5670e5a68 --- /dev/null +++ b/src/main/java/ru/vk/itmo/test/alenkovayulya/ServerImpl.java @@ -0,0 +1,109 @@ +package ru.vk.itmo.test.alenkovayulya; + +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 ru.vk.itmo.ServiceConfig; +import ru.vk.itmo.dao.BaseEntry; +import ru.vk.itmo.dao.Dao; +import ru.vk.itmo.dao.Entry; + +import java.io.IOException; +import java.lang.foreign.MemorySegment; +import java.lang.foreign.ValueLayout; +import java.nio.charset.StandardCharsets; +import java.util.function.Supplier; + +public class ServerImpl extends HttpServer { + + private final Dao> referenceDao; + + public ServerImpl(ServiceConfig serviceConfig, + Dao> referenceDao) throws IOException { + super(createServerConfig(serviceConfig)); + this.referenceDao = referenceDao; + } + + 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; + } + + @Path("/v0/entity") + @RequestMethod(Request.METHOD_GET) + public Response getEntity(@Param(value = "id", required = true) String id) { + return handleException(() -> { + if (isEmptyId(id)) { + return new Response(Response.BAD_REQUEST, Response.EMPTY); + } + Entry value = referenceDao.get( + convertBytesToMemorySegment(id.getBytes(StandardCharsets.UTF_8))); + + return value == null ? new Response(Response.NOT_FOUND, Response.EMPTY) + : Response.ok(value.value().toArray(ValueLayout.JAVA_BYTE)); + }); + } + + @Path("/v0/entity") + @RequestMethod(Request.METHOD_PUT) + public Response putEntity(@Param(value = "id", required = true) String id, Request request) { + return handleException(() -> { + if (isEmptyId(id)) { + return new Response(Response.BAD_REQUEST, Response.EMPTY); + } + referenceDao.upsert(new BaseEntry<>( + convertBytesToMemorySegment(id.getBytes(StandardCharsets.UTF_8)), + convertBytesToMemorySegment(request.getBody()))); + return new Response(Response.CREATED, Response.EMPTY); + }); + } + + @Path("/v0/entity") + @RequestMethod(Request.METHOD_DELETE) + public Response deleteEntity(@Param(value = "id", required = true) String id) { + return handleException(() -> { + if (isEmptyId(id)) { + return new Response(Response.BAD_REQUEST, 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 isEmptyId(String id) { + return id.isEmpty() && id.isBlank(); + } + + private MemorySegment convertBytesToMemorySegment(byte[] byteArray) { + return MemorySegment.ofArray(byteArray); + } + + private Response handleException(Supplier runnable) { + try { + return runnable.get(); + } catch (Exception exception) { + return new Response(Response.INTERNAL_ERROR, Response.EMPTY); + } + } +} diff --git a/src/main/java/ru/vk/itmo/test/alenkovayulya/ServerInitializer.java b/src/main/java/ru/vk/itmo/test/alenkovayulya/ServerInitializer.java new file mode 100644 index 000000000..206ed3f22 --- /dev/null +++ b/src/main/java/ru/vk/itmo/test/alenkovayulya/ServerInitializer.java @@ -0,0 +1,28 @@ +package ru.vk.itmo.test.alenkovayulya; + +import ru.vk.itmo.ServiceConfig; +import ru.vk.itmo.dao.Config; +import ru.vk.itmo.test.alenkovayulya.dao.ReferenceDao; + +import java.io.IOException; +import java.nio.file.Files; +import java.util.List; + +public final class ServerInitializer { + public static final int PORT = 8080; + public static final String URL = "http://localhost"; + + private ServerInitializer() { + } + + public static void main(String[] args) throws IOException { + ServiceConfig config = new ServiceConfig(PORT, URL, List.of(URL), + Files.createTempDirectory("reports") + ); + + ReferenceDao dao = new ReferenceDao(new Config(config.workingDir(), 1024 * 1024 * 1024)); + ServerImpl server = new ServerImpl(config, dao); + server.start(); + } + +} diff --git a/src/main/java/ru/vk/itmo/test/alenkovayulya/ServiceImpl.java b/src/main/java/ru/vk/itmo/test/alenkovayulya/ServiceImpl.java new file mode 100644 index 000000000..ba0eeb5f6 --- /dev/null +++ b/src/main/java/ru/vk/itmo/test/alenkovayulya/ServiceImpl.java @@ -0,0 +1,48 @@ +package ru.vk.itmo.test.alenkovayulya; + +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.ReferenceDao; + +import java.io.IOException; +import java.lang.foreign.MemorySegment; +import java.util.concurrent.CompletableFuture; + +public class ServiceImpl implements Service { + + private Dao> referenceDao; + private ServerImpl server; + private final ServiceConfig config; + + public ServiceImpl(ServiceConfig config) { + this.config = config; + + } + + @Override + public synchronized CompletableFuture start() throws IOException { + referenceDao = new ReferenceDao(new Config(config.workingDir(), 1024 * 1024 * 1024)); + server = new ServerImpl(config, referenceDao); + server.start(); + return CompletableFuture.completedFuture(null); + } + + @Override + public synchronized CompletableFuture stop() throws IOException { + server.stop(); + referenceDao.close(); + return CompletableFuture.completedFuture(null); + } + + @ServiceFactory(stage = 1) + public static class Factory implements ServiceFactory.Factory { + @Override + public Service create(ServiceConfig config) { + return new ServiceImpl(config); + } + } +} diff --git a/src/main/java/ru/vk/itmo/test/alenkovayulya/cringe_results/alloc-put.png b/src/main/java/ru/vk/itmo/test/alenkovayulya/cringe_results/alloc-put.png new file mode 100644 index 000000000..c27beb388 Binary files /dev/null and b/src/main/java/ru/vk/itmo/test/alenkovayulya/cringe_results/alloc-put.png differ diff --git a/src/main/java/ru/vk/itmo/test/alenkovayulya/cringe_results/cpu-put.png b/src/main/java/ru/vk/itmo/test/alenkovayulya/cringe_results/cpu-put.png new file mode 100644 index 000000000..249ed3a46 Binary files /dev/null and b/src/main/java/ru/vk/itmo/test/alenkovayulya/cringe_results/cpu-put.png differ diff --git a/src/main/java/ru/vk/itmo/test/alenkovayulya/cringe_results/wrk-get-search-break-point.txt b/src/main/java/ru/vk/itmo/test/alenkovayulya/cringe_results/wrk-get-search-break-point.txt new file mode 100644 index 000000000..bfa3206c1 --- /dev/null +++ b/src/main/java/ru/vk/itmo/test/alenkovayulya/cringe_results/wrk-get-search-break-point.txt @@ -0,0 +1,201 @@ +MacBook-Pro-Ulia:wrk2-arm yulalenk$ ./wrk -c 1 -d 20 -t 1 -L -R 40000 -s /Users/yulalenk/sem2/2024-highload-dht/src/main/java/ru/vk/itmo/test/alenkovayulya/lua/get.lua http://localhost:8080 +Running 20s test @ http://localhost:8080 + 1 threads and 1 connections + Thread calibration: mean lat.: 5.849ms, rate sampling interval: 42ms + Thread Stats Avg Stdev Max +/- Stdev + Latency 1.40ms 1.34ms 7.14ms 86.52% + Req/Sec 60.77k 1.35k 63.63k 64.14% + Latency Distribution (HdrHistogram - Recorded Latency) + 50.000% 1.00ms + 75.000% 1.62ms + 90.000% 3.17ms + 99.000% 6.25ms + 99.900% 6.86ms + 99.990% 7.12ms + 99.999% 7.14ms +100.000% 7.15ms + + Detailed Percentile spectrum: + Value Percentile TotalCount 1/(1-Percentile) + + 0.011 0.000000 1 1.00 + 0.297 0.100000 60163 1.11 + 0.502 0.200000 120152 1.25 + 0.674 0.300000 180176 1.43 + 0.841 0.400000 240080 1.67 + 0.998 0.500000 299976 2.00 + 1.073 0.550000 329900 2.22 + 1.144 0.600000 359965 2.50 + 1.240 0.650000 389851 2.86 + 1.383 0.700000 419817 3.33 + 1.622 0.750000 449806 4.00 + 1.774 0.775000 464789 4.44 + 1.935 0.800000 479767 5.00 + 2.167 0.825000 494789 5.71 + 2.381 0.850000 509767 6.67 + 2.715 0.875000 524742 8.00 + 2.891 0.887500 532233 8.89 + 3.167 0.900000 539721 10.00 + 3.467 0.912500 547286 11.43 + 3.809 0.925000 554716 13.33 + 4.107 0.937500 562293 16.00 + 4.255 0.943750 565960 17.78 + 4.651 0.950000 569712 20.00 + 5.063 0.956250 573459 22.86 + 5.335 0.962500 577241 26.67 + 5.539 0.968750 580987 32.00 + 5.635 0.971875 582822 35.56 + 5.735 0.975000 584709 40.00 + 5.831 0.978125 586549 45.71 + 5.931 0.981250 588501 53.33 + 6.003 0.984375 590303 64.00 + 6.063 0.985938 591247 71.11 + 6.135 0.987500 592195 80.00 + 6.199 0.989062 593137 91.43 + 6.287 0.990625 594046 106.67 + 6.411 0.992188 595017 128.00 + 6.491 0.992969 595466 142.22 + 6.563 0.993750 595921 160.00 + 6.607 0.994531 596417 182.86 + 6.643 0.995313 596889 213.33 + 6.683 0.996094 597375 256.00 + 6.695 0.996484 597590 284.44 + 6.707 0.996875 597816 320.00 + 6.723 0.997266 598064 365.71 + 6.739 0.997656 598264 426.67 + 6.759 0.998047 598512 512.00 + 6.775 0.998242 598648 568.89 + 6.787 0.998437 598747 640.00 + 6.803 0.998633 598862 731.43 + 6.835 0.998828 598970 853.33 + 6.871 0.999023 599099 1024.00 + 6.887 0.999121 599142 1137.78 + 6.907 0.999219 599201 1280.00 + 6.919 0.999316 599260 1462.86 + 6.931 0.999414 599328 1706.67 + 6.951 0.999512 599374 2048.00 + 6.971 0.999561 599406 2275.56 + 6.991 0.999609 599434 2560.00 + 7.003 0.999658 599463 2925.71 + 7.019 0.999707 599492 3413.33 + 7.043 0.999756 599523 4096.00 + 7.055 0.999780 599546 4551.11 + 7.059 0.999805 599554 5120.00 + 7.067 0.999829 599566 5851.43 + 7.087 0.999854 599580 6826.67 + 7.099 0.999878 599596 8192.00 + 7.107 0.999890 599602 9102.22 + 7.119 0.999902 599614 10240.00 + 7.123 0.999915 599616 11702.86 + 7.131 0.999927 599632 13653.33 + 7.131 0.999939 599632 16384.00 + 7.135 0.999945 599644 18204.44 + 7.135 0.999951 599644 20480.00 + 7.135 0.999957 599644 23405.71 + 7.139 0.999963 599658 27306.67 + 7.139 0.999969 599658 32768.00 + 7.139 0.999973 599658 36408.89 + 7.139 0.999976 599658 40960.00 + 7.139 0.999979 599658 46811.43 + 7.139 0.999982 599658 54613.33 + 7.139 0.999985 599658 65536.00 + 7.139 0.999986 599658 72817.78 + 7.143 0.999988 599665 81920.00 + 7.143 0.999989 599665 93622.86 + 7.143 0.999991 599665 109226.67 + 7.143 0.999992 599665 131072.00 + 7.143 0.999993 599665 145635.56 + 7.143 0.999994 599665 163840.00 + 7.143 0.999995 599665 187245.71 + 7.143 0.999995 599665 218453.33 + 7.143 0.999996 599665 262144.00 + 7.143 0.999997 599665 291271.11 + 7.143 0.999997 599665 327680.00 + 7.143 0.999997 599665 374491.43 + 7.143 0.999998 599665 436906.67 + 7.143 0.999998 599665 524288.00 + 7.143 0.999998 599665 582542.22 + 7.147 0.999998 599666 655360.00 + 7.147 1.000000 599666 inf +#[Mean = 1.401, StdDeviation = 1.335] +#[Max = 7.144, Total count = 599666] +#[Buckets = 27, SubBuckets = 2048] +---------------------------------------------------------- + + +MacBook-Pro-Ulia:wrk2-arm yulalenk$ ./wrk -c 1 -d 20 -t 1 -L -R 45000 -s /Users/yulalenk/sem2/2024-highload-dht/src/main/java/ru/vk/itmo/test/alenkovayulya/lua/get.lua http://localhost:8080 +Running 20s test @ http://localhost:8080 + 1 threads and 1 connections + Thread calibration: mean lat.: 357.882ms, rate sampling interval: 1247ms + Thread Stats Avg Stdev Max +/- Stdev + Latency 990.48ms 187.14ms 1.31s 57.09% + Req/Sec 60.98k 368.85 61.65k 62.50% + Latency Distribution (HdrHistogram - Recorded Latency) + 50.000% 991.23ms + 75.000% 1.15s + 90.000% 1.25s + 99.000% 1.31s + 99.900% 1.31s + 99.990% 1.31s + 99.999% 1.31s +100.000% 1.31s + + Detailed Percentile spectrum: + Value Percentile TotalCount 1/(1-Percentile) + + 684.543 0.000000 410 1.00 + 737.279 0.100000 61204 1.11 + 788.991 0.200000 122597 1.25 + 854.527 0.300000 183121 1.43 + 923.135 0.400000 243738 1.67 + 991.231 0.500000 304612 2.00 + 1027.071 0.550000 335128 2.22 + 1057.791 0.600000 365948 2.50 + 1086.463 0.650000 396749 2.86 + 1119.231 0.700000 427638 3.33 + 1151.999 0.750000 457580 4.00 + 1167.359 0.775000 472406 4.44 + 1185.791 0.800000 487546 5.00 + 1204.223 0.825000 502839 5.71 + 1219.583 0.850000 518153 6.67 + 1236.991 0.875000 533445 8.00 + 1246.207 0.887500 541177 8.89 + 1253.375 0.900000 548955 10.00 + 1260.543 0.912500 556010 11.43 + 1268.735 0.925000 564372 13.33 + 1275.903 0.937500 571724 16.00 + 1281.023 0.943750 575675 17.78 + 1283.071 0.950000 578958 20.00 + 1287.167 0.956250 583208 22.86 + 1290.239 0.962500 587127 26.67 + 1293.311 0.968750 590206 32.00 + 1295.359 0.971875 592610 35.56 + 1298.431 0.975000 594029 40.00 + 1300.479 0.978125 595960 45.71 + 1303.551 0.981250 599479 53.33 + 1304.575 0.984375 600406 64.00 + 1305.599 0.985938 601403 71.11 + 1306.623 0.987500 602725 80.00 + 1306.623 0.989062 602725 91.43 + 1307.647 0.990625 603765 106.67 + 1308.671 0.992188 604645 128.00 + 1309.695 0.992969 605792 142.22 + 1309.695 0.993750 605792 160.00 + 1310.719 0.994531 607195 182.86 + 1310.719 0.995313 607195 213.33 + 1310.719 0.996094 607195 256.00 + 1310.719 0.996484 607195 284.44 + 1311.743 0.996875 608377 320.00 + 1311.743 0.997266 608377 365.71 + 1311.743 0.997656 608377 426.67 + 1311.743 0.998047 608377 512.00 + 1311.743 0.998242 608377 568.89 + 1311.743 0.998437 608377 640.00 + 1311.743 0.998633 608377 731.43 + 1312.767 0.998828 609179 853.33 + 1312.767 1.000000 609179 inf +#[Mean = 990.484, StdDeviation = 187.145] +#[Max = 1311.744, Total count = 609179] +#[Buckets = 27, SubBuckets = 2048] +---------------------------------------------------------- + diff --git a/src/main/java/ru/vk/itmo/test/alenkovayulya/cringe_results/wrk-get-stable.txt b/src/main/java/ru/vk/itmo/test/alenkovayulya/cringe_results/wrk-get-stable.txt new file mode 100644 index 000000000..acb2cf9e1 --- /dev/null +++ b/src/main/java/ru/vk/itmo/test/alenkovayulya/cringe_results/wrk-get-stable.txt @@ -0,0 +1,141 @@ +MacBook-Pro-Ulia:wrk2-arm yulalenk$ ./wrk -c 1 -d 120 -t 1 -L -R 40000 -s /Users/yulalenk/sem2/2024-highload-dht/src/main/java/ru/vk/itmo/test/alenkovayulya/lua/get.lua http://localhost:8080 +Running 2m test @ http://localhost:8080 + 1 threads and 1 connections + Thread calibration: mean lat.: 0.916ms, rate sampling interval: 10ms + Thread Stats Avg Stdev Max +/- Stdev + Latency 0.88ms 0.97ms 13.14ms 90.68% + Req/Sec 42.19k 5.90k 73.22k 82.75% + Latency Distribution (HdrHistogram - Recorded Latency) + 50.000% 668.00us + 75.000% 0.99ms + 90.000% 1.68ms + 99.000% 5.41ms + 99.900% 6.52ms + 99.990% 10.23ms + 99.999% 12.77ms +100.000% 13.15ms + + Detailed Percentile spectrum: + Value Percentile TotalCount 1/(1-Percentile) + + 0.010 0.000000 2 1.00 + 0.147 0.100000 441751 1.11 + 0.278 0.200000 882377 1.25 + 0.408 0.300000 1321335 1.43 + 0.538 0.400000 1760894 1.67 + 0.668 0.500000 2201161 2.00 + 0.733 0.550000 2421315 2.22 + 0.798 0.600000 2642129 2.50 + 0.863 0.650000 2863064 2.86 + 0.927 0.700000 3081132 3.33 + 0.991 0.750000 3300657 4.00 + 1.023 0.775000 3410459 4.44 + 1.055 0.800000 3520503 5.00 + 1.087 0.825000 3630514 5.71 + 1.119 0.850000 3741518 6.67 + 1.151 0.875000 3850738 8.00 + 1.357 0.887500 3904971 8.89 + 1.678 0.900000 3959858 10.00 + 2.003 0.912500 4014980 11.43 + 2.329 0.925000 4070021 13.33 + 2.657 0.937500 4124954 16.00 + 2.825 0.943750 4152465 17.78 + 2.997 0.950000 4180013 20.00 + 3.185 0.956250 4207336 22.86 + 3.401 0.962500 4234844 26.67 + 3.663 0.968750 4262339 32.00 + 3.821 0.971875 4276151 35.56 + 4.011 0.975000 4289854 40.00 + 4.295 0.978125 4303676 45.71 + 4.591 0.981250 4317484 53.33 + 4.883 0.984375 4331076 64.00 + 5.031 0.985938 4338024 71.11 + 5.179 0.987500 4344986 80.00 + 5.323 0.989062 4351822 91.43 + 5.471 0.990625 4358679 106.67 + 5.627 0.992188 4365582 128.00 + 5.707 0.992969 4368968 142.22 + 5.791 0.993750 4372393 160.00 + 5.879 0.994531 4375792 182.86 + 5.971 0.995313 4379263 213.33 + 6.067 0.996094 4382740 256.00 + 6.115 0.996484 4384380 284.44 + 6.167 0.996875 4386174 320.00 + 6.219 0.997266 4387884 365.71 + 6.271 0.997656 4389500 426.67 + 6.335 0.998047 4391316 512.00 + 6.363 0.998242 4392072 568.89 + 6.403 0.998437 4393036 640.00 + 6.439 0.998633 4393808 731.43 + 6.483 0.998828 4394730 853.33 + 6.527 0.999023 4395550 1024.00 + 6.551 0.999121 4395950 1137.78 + 6.579 0.999219 4396380 1280.00 + 6.611 0.999316 4396818 1462.86 + 6.651 0.999414 4397261 1706.67 + 6.691 0.999512 4397685 2048.00 + 6.711 0.999561 4397897 2275.56 + 6.739 0.999609 4398094 2560.00 + 6.775 0.999658 4398310 2925.71 + 6.887 0.999707 4398517 3413.33 + 7.255 0.999756 4398732 4096.00 + 7.639 0.999780 4398840 4551.11 + 8.075 0.999805 4398948 5120.00 + 8.519 0.999829 4399055 5851.43 + 8.919 0.999854 4399163 6826.67 + 9.607 0.999878 4399269 8192.00 + 10.007 0.999890 4399323 9102.22 + 10.279 0.999902 4399379 10240.00 + 10.487 0.999915 4399431 11702.86 + 10.703 0.999927 4399486 13653.33 + 10.879 0.999939 4399538 16384.00 + 10.999 0.999945 4399565 18204.44 + 11.215 0.999951 4399592 20480.00 + 11.471 0.999957 4399619 23405.71 + 11.703 0.999963 4399645 27306.67 + 11.951 0.999969 4399673 32768.00 + 12.071 0.999973 4399686 36408.89 + 12.191 0.999976 4399699 40960.00 + 12.327 0.999979 4399713 46811.43 + 12.439 0.999982 4399726 54613.33 + 12.567 0.999985 4399740 65536.00 + 12.615 0.999986 4399746 72817.78 + 12.679 0.999988 4399753 81920.00 + 12.743 0.999989 4399760 93622.86 + 12.799 0.999991 4399766 109226.67 + 12.863 0.999992 4399773 131072.00 + 12.895 0.999993 4399776 145635.56 + 12.927 0.999994 4399781 163840.00 + 12.951 0.999995 4399783 187245.71 + 12.983 0.999995 4399787 218453.33 + 13.015 0.999996 4399790 262144.00 + 13.023 0.999997 4399791 291271.11 + 13.039 0.999997 4399793 327680.00 + 13.055 0.999997 4399795 374491.43 + 13.063 0.999998 4399796 436906.67 + 13.087 0.999998 4399798 524288.00 + 13.095 0.999998 4399799 582542.22 + 13.103 0.999998 4399800 655360.00 + 13.111 0.999999 4399801 748982.86 + 13.111 0.999999 4399801 873813.33 + 13.119 0.999999 4399803 1048576.00 + 13.119 0.999999 4399803 1165084.44 + 13.119 0.999999 4399803 1310720.00 + 13.135 0.999999 4399804 1497965.71 + 13.135 0.999999 4399804 1747626.67 + 13.135 1.000000 4399804 2097152.00 + 13.143 1.000000 4399805 2330168.89 + 13.143 1.000000 4399805 2621440.00 + 13.143 1.000000 4399805 2995931.43 + 13.143 1.000000 4399805 3495253.33 + 13.143 1.000000 4399805 4194304.00 + 13.151 1.000000 4399806 4660337.78 + 13.151 1.000000 4399806 inf +#[Mean = 0.881, StdDeviation = 0.974] +#[Max = 13.144, Total count = 4399806] +#[Buckets = 27, SubBuckets = 2048] +---------------------------------------------------------- + 4799984 requests in 2.00m, 325.01MB read + Non-2xx or 3xx responses: 4799984 +Requests/sec: 39999.87 +Transfer/sec: 2.71MB diff --git a/src/main/java/ru/vk/itmo/test/alenkovayulya/cringe_results/wrk-put-search-break-point.txt b/src/main/java/ru/vk/itmo/test/alenkovayulya/cringe_results/wrk-put-search-break-point.txt new file mode 100644 index 000000000..10debf33b --- /dev/null +++ b/src/main/java/ru/vk/itmo/test/alenkovayulya/cringe_results/wrk-put-search-break-point.txt @@ -0,0 +1,535 @@ +MacBook-Pro-Ulia:wrk2-arm yulalenk$ ./wrk -c 1 -d 30 -t 1 -L -R 100000 -s /Users/yulalenk/sem2/2024-highload-dht/src/main/java/ru/vk/itmo/test/alenkovayulya/lua/put.lua http://localhost:8080 +Running 30s test @ http://localhost:8080 + 1 threads and 1 connections + Thread calibration: mean lat.: 1983.806ms, rate sampling interval: 7106ms + Thread Stats Avg Stdev Max +/- Stdev + Latency 7.84s 2.25s 11.73s 57.80% + Req/Sec 61.02k 112.00 61.13k 50.00% + Latency Distribution (HdrHistogram - Recorded Latency) + 50.000% 7.86s + 75.000% 9.78s + 90.000% 10.95s + 99.000% 11.66s + 99.900% 11.73s + 99.990% 11.74s + 99.999% 11.74s +100.000% 11.74s + + Detailed Percentile spectrum: + Value Percentile TotalCount 1/(1-Percentile) + + 3938.303 0.000000 230 1.00 + 4722.687 0.100000 122392 1.11 + 5505.023 0.200000 244457 1.25 + 6283.263 0.300000 365889 1.43 + 7073.791 0.400000 487786 1.67 + 7856.127 0.500000 610057 2.00 + 8237.055 0.550000 670955 2.22 + 8626.175 0.600000 731888 2.50 + 9011.199 0.650000 793638 2.86 + 9396.223 0.700000 854325 3.33 + 9781.247 0.750000 914972 4.00 + 9977.855 0.775000 945861 4.44 + 10174.463 0.800000 975914 5.00 + 10371.071 0.825000 1006448 5.71 + 10567.679 0.850000 1037221 6.67 + 10764.287 0.875000 1068119 8.00 + 10854.399 0.887500 1082431 8.89 + 10952.703 0.900000 1097809 10.00 + 11051.007 0.912500 1113196 11.43 + 11149.311 0.925000 1128222 13.33 + 11247.615 0.937500 1143602 16.00 + 11296.767 0.943750 1151087 17.78 + 11345.919 0.950000 1158761 20.00 + 11395.071 0.956250 1166524 22.86 + 11444.223 0.962500 1174149 26.67 + 11493.375 0.968750 1181878 32.00 + 11517.951 0.971875 1185756 35.56 + 11542.527 0.975000 1189628 40.00 + 11567.103 0.978125 1193457 45.71 + 11591.679 0.981250 1197317 53.33 + 11616.255 0.984375 1201103 64.00 + 11624.447 0.985938 1202436 71.11 + 11640.831 0.987500 1204720 80.00 + 11657.215 0.989062 1207210 91.43 + 11665.407 0.990625 1208451 106.67 + 11681.791 0.992188 1210974 128.00 + 11681.791 0.992969 1210974 142.22 + 11689.983 0.993750 1212228 160.00 + 11698.175 0.994531 1213343 182.86 + 11706.367 0.995313 1214587 213.33 + 11714.559 0.996094 1215808 256.00 + 11714.559 0.996484 1215808 284.44 + 11714.559 0.996875 1215808 320.00 + 11722.751 0.997266 1217050 365.71 + 11722.751 0.997656 1217050 426.67 + 11722.751 0.998047 1217050 512.00 + 11730.943 0.998242 1218365 568.89 + 11730.943 0.998437 1218365 640.00 + 11730.943 0.998633 1218365 731.43 + 11730.943 0.998828 1218365 853.33 + 11730.943 0.999023 1218365 1024.00 + 11730.943 0.999121 1218365 1137.78 + 11739.135 0.999219 1219383 1280.00 + 11739.135 1.000000 1219383 inf +#[Mean = 7840.003, StdDeviation = 2247.500] +#[Max = 11730.944, Total count = 1219383] +#[Buckets = 27, SubBuckets = 2048] +---------------------------------------------------------- + 1826181 requests in 30.00s, 123.65MB read + Non-2xx or 3xx responses: 1826181 +Requests/sec: 60872.93 +Transfer/sec: 4.12MB + +MacBook-Pro-Ulia:wrk2-arm yulalenk$ ./wrk -c 1 -d 30 -t 1 -L -R 75000 -s /Users/yulalenk/sem2/2024-highload-dht/src/main/java/ru/vk/itmo/test/alenkovayulya/lua/put.lua http://localhost:8080 +Running 30s test @ http://localhost:8080 + 1 threads and 1 connections + Thread calibration: mean lat.: 1006.373ms, rate sampling interval: 3545ms + Thread Stats Avg Stdev Max +/- Stdev + Latency 3.90s 1.14s 5.92s 58.14% + Req/Sec 60.32k 299.91 60.66k 60.00% + Latency Distribution (HdrHistogram - Recorded Latency) + 50.000% 3.88s + 75.000% 4.86s + 90.000% 5.49s + 99.000% 5.87s + 99.900% 5.92s + 99.990% 5.92s + 99.999% 5.92s +100.000% 5.92s + + Detailed Percentile spectrum: + Value Percentile TotalCount 1/(1-Percentile) + + 1960.959 0.000000 141 1.00 + 2342.911 0.100000 120906 1.11 + 2717.695 0.200000 240853 1.25 + 3110.911 0.300000 361043 1.43 + 3487.743 0.400000 481042 1.67 + 3876.863 0.500000 601418 2.00 + 4087.807 0.550000 661819 2.22 + 4284.415 0.600000 722099 2.50 + 4476.927 0.650000 781751 2.86 + 4665.343 0.700000 841918 3.33 + 4857.855 0.750000 902725 4.00 + 4956.159 0.775000 931972 4.44 + 5066.751 0.800000 962280 5.00 + 5197.823 0.825000 993353 5.71 + 5279.743 0.850000 1022487 6.67 + 5386.239 0.875000 1053398 8.00 + 5431.295 0.887500 1067545 8.89 + 5488.639 0.900000 1082489 10.00 + 5545.983 0.912500 1098039 11.43 + 5599.231 0.925000 1112415 13.33 + 5656.575 0.937500 1128200 16.00 + 5681.151 0.943750 1134892 17.78 + 5709.823 0.950000 1143640 20.00 + 5734.399 0.956250 1150897 22.86 + 5758.975 0.962500 1157747 26.67 + 5787.647 0.968750 1166080 32.00 + 5795.839 0.971875 1168710 35.56 + 5812.223 0.975000 1173633 40.00 + 5824.511 0.978125 1177135 45.71 + 5836.799 0.981250 1180643 53.33 + 5849.087 0.984375 1184176 64.00 + 5857.279 0.985938 1186368 71.11 + 5861.375 0.987500 1187526 80.00 + 5869.567 0.989062 1190017 91.43 + 5877.759 0.990625 1191473 106.67 + 5885.951 0.992188 1193203 128.00 + 5890.047 0.992969 1194203 142.22 + 5894.143 0.993750 1195162 160.00 + 5902.335 0.994531 1196697 182.86 + 5906.431 0.995313 1197802 213.33 + 5906.431 0.996094 1197802 256.00 + 5910.527 0.996484 1198991 284.44 + 5910.527 0.996875 1198991 320.00 + 5914.623 0.997266 1200081 365.71 + 5914.623 0.997656 1200081 426.67 + 5918.719 0.998047 1201324 512.00 + 5918.719 0.998242 1201324 568.89 + 5918.719 0.998437 1201324 640.00 + 5918.719 0.998633 1201324 731.43 + 5918.719 0.998828 1201324 853.33 + 5918.719 0.999023 1201324 1024.00 + 5922.815 0.999121 1202497 1137.78 + 5922.815 1.000000 1202497 inf +#[Mean = 3897.067, StdDeviation = 1136.913] +#[Max = 5918.720, Total count = 1202497] +#[Buckets = 27, SubBuckets = 2048] +---------------------------------------------------------- + 1805790 requests in 30.00s, 122.27MB read + Non-2xx or 3xx responses: 1805790 +Requests/sec: 60193.30 +Transfer/sec: 4.08MB + +MacBook-Pro-Ulia:wrk2-arm yulalenk$ ./wrk -c 1 -d 30 -t 1 -L -R 60000 -s /Users/yulalenk/sem2/2024-highload-dht/src/main/java/ru/vk/itmo/test/alenkovayulya/lua/put.lua http://localhost:8080 +Running 30s test @ http://localhost:8080 + 1 threads and 1 connections + Thread calibration: mean lat.: 7.919ms, rate sampling interval: 39ms + Thread Stats Avg Stdev Max +/- Stdev + Latency 1.35ms 1.84ms 13.28ms 92.28% + Req/Sec 60.83k 1.42k 64.16k 72.85% + Latency Distribution (HdrHistogram - Recorded Latency) + 50.000% 0.86ms + 75.000% 1.26ms + 90.000% 2.58ms + 99.000% 10.30ms + 99.900% 13.15ms + 99.990% 13.26ms + 99.999% 13.29ms +100.000% 13.29ms + + Detailed Percentile spectrum: + Value Percentile TotalCount 1/(1-Percentile) + + 0.010 0.000000 1 1.00 + 0.255 0.100000 120279 1.11 + 0.427 0.200000 240228 1.25 + 0.579 0.300000 360226 1.43 + 0.719 0.400000 480341 1.67 + 0.863 0.500000 600169 2.00 + 0.935 0.550000 660704 2.22 + 1.004 0.600000 720446 2.50 + 1.076 0.650000 780422 2.86 + 1.147 0.700000 840645 3.33 + 1.260 0.750000 899954 4.00 + 1.341 0.775000 929934 4.44 + 1.461 0.800000 959823 5.00 + 1.645 0.825000 989940 5.71 + 1.860 0.850000 1019814 6.67 + 2.165 0.875000 1049822 8.00 + 2.357 0.887500 1064782 8.89 + 2.575 0.900000 1079837 10.00 + 2.849 0.912500 1094843 11.43 + 3.305 0.925000 1109788 13.33 + 3.957 0.937500 1124789 16.00 + 4.255 0.943750 1132394 17.78 + 4.683 0.950000 1139759 20.00 + 5.059 0.956250 1147299 22.86 + 6.359 0.962500 1154764 26.67 + 7.291 0.968750 1162279 32.00 + 7.479 0.971875 1166036 35.56 + 7.659 0.975000 1169764 40.00 + 7.919 0.978125 1173504 45.71 + 8.615 0.981250 1177265 53.33 + 9.327 0.984375 1181008 64.00 + 9.471 0.985938 1182932 71.11 + 9.815 0.987500 1184771 80.00 + 10.175 0.989062 1186655 91.43 + 10.487 0.990625 1188511 106.67 + 11.487 0.992188 1190387 128.00 + 11.903 0.992969 1191314 142.22 + 12.335 0.993750 1192254 160.00 + 12.447 0.994531 1193254 182.86 + 12.511 0.995313 1194144 213.33 + 12.703 0.996094 1195084 256.00 + 12.767 0.996484 1195567 284.44 + 12.847 0.996875 1196015 320.00 + 12.927 0.997266 1196499 365.71 + 13.015 0.997656 1196986 426.67 + 13.047 0.998047 1197423 512.00 + 13.071 0.998242 1197657 568.89 + 13.095 0.998437 1197916 640.00 + 13.111 0.998633 1198128 731.43 + 13.135 0.998828 1198447 853.33 + 13.151 0.999023 1198636 1024.00 + 13.159 0.999121 1198755 1137.78 + 13.167 0.999219 1198883 1280.00 + 13.175 0.999316 1198995 1462.86 + 13.183 0.999414 1199052 1706.67 + 13.199 0.999512 1199207 2048.00 + 13.207 0.999561 1199268 2275.56 + 13.215 0.999609 1199297 2560.00 + 13.223 0.999658 1199346 2925.71 + 13.231 0.999707 1199409 3413.33 + 13.239 0.999756 1199480 4096.00 + 13.247 0.999780 1199536 4551.11 + 13.247 0.999805 1199536 5120.00 + 13.255 0.999829 1199603 5851.43 + 13.255 0.999854 1199603 6826.67 + 13.255 0.999878 1199603 8192.00 + 13.263 0.999890 1199660 9102.22 + 13.263 0.999902 1199660 10240.00 + 13.263 0.999915 1199660 11702.86 + 13.263 0.999927 1199660 13653.33 + 13.271 0.999939 1199695 16384.00 + 13.271 0.999945 1199695 18204.44 + 13.271 0.999951 1199695 20480.00 + 13.271 0.999957 1199695 23405.71 + 13.279 0.999963 1199730 27306.67 + 13.279 0.999969 1199730 32768.00 + 13.279 0.999973 1199730 36408.89 + 13.279 0.999976 1199730 40960.00 + 13.279 0.999979 1199730 46811.43 + 13.279 0.999982 1199730 54613.33 + 13.279 0.999985 1199730 65536.00 + 13.279 0.999986 1199730 72817.78 + 13.287 0.999988 1199745 81920.00 + 13.287 1.000000 1199745 inf +#[Mean = 1.346, StdDeviation = 1.839] +#[Max = 13.280, Total count = 1199745] +#[Buckets = 27, SubBuckets = 2048] +---------------------------------------------------------- + 1799950 requests in 30.00s, 121.88MB read + Non-2xx or 3xx responses: 1799950 +Requests/sec: 59998.61 +Transfer/sec: 4.06MB + +MacBook-Pro-Ulia:wrk2-arm yulalenk$ ./wrk -c 1 -d 30 -t 1 -L -R 55000 -s /Users/yulalenk/sem2/2024-highload-dht/src/main/java/ru/vk/itmo/test/alenkovayulya/lua/put.lua http://localhost:8080 +/Users/yulalenk/sem2/2024-highload-dht/src/main/java/ru/vk/itmo/test/alenkovayulya/lua/put.lua: .../src/main/java/ru/vk/itmo/test/alenkovayulya/lua/put.lua:9: 'end' expected (to close 'function' at line 3) near '' +/Users/yulalenk/sem2/2024-highload-dht/src/main/java/ru/vk/itmo/test/alenkovayulya/lua/put.lua: .../src/main/java/ru/vk/itmo/test/alenkovayulya/lua/put.lua:9: 'end' expected (to close 'function' at line 3) near '' +Running 30s test @ http://localhost:8080 + 1 threads and 1 connections + Thread calibration: mean lat.: 0.997ms, rate sampling interval: 10ms + Thread Stats Avg Stdev Max +/- Stdev + Latency 625.60us 351.66us 2.23ms 60.20% + Req/Sec 58.12k 4.16k 68.78k 67.10% + Latency Distribution (HdrHistogram - Recorded Latency) + 50.000% 622.00us + 75.000% 0.92ms + 90.000% 1.09ms + 99.000% 1.35ms + 99.900% 1.98ms + 99.990% 2.15ms + 99.999% 2.21ms +100.000% 2.23ms + + Detailed Percentile spectrum: + Value Percentile TotalCount 1/(1-Percentile) + + 0.010 0.000000 1 1.00 + 0.148 0.100000 110695 1.11 + 0.269 0.200000 220757 1.25 + 0.389 0.300000 330400 1.43 + 0.505 0.400000 439958 1.67 + 0.622 0.500000 550183 2.00 + 0.681 0.550000 605112 2.22 + 0.740 0.600000 659976 2.50 + 0.799 0.650000 715300 2.86 + 0.858 0.700000 770549 3.33 + 0.915 0.750000 825662 4.00 + 0.943 0.775000 852490 4.44 + 0.972 0.800000 879809 5.00 + 1.001 0.825000 907584 5.71 + 1.030 0.850000 935371 6.67 + 1.059 0.875000 962830 8.00 + 1.073 0.887500 976299 8.89 + 1.088 0.900000 990470 10.00 + 1.102 0.912500 1004099 11.43 + 1.116 0.925000 1017661 13.33 + 1.130 0.937500 1031453 16.00 + 1.137 0.943750 1038531 17.78 + 1.144 0.950000 1045697 20.00 + 1.150 0.956250 1051810 22.86 + 1.160 0.962500 1058630 26.67 + 1.178 0.968750 1065638 32.00 + 1.190 0.971875 1068876 35.56 + 1.206 0.975000 1072400 40.00 + 1.223 0.978125 1075705 45.71 + 1.245 0.981250 1079213 53.33 + 1.272 0.984375 1082617 64.00 + 1.289 0.985938 1084315 71.11 + 1.309 0.987500 1086008 80.00 + 1.334 0.989062 1087724 91.43 + 1.365 0.990625 1089455 106.67 + 1.404 0.992188 1091164 128.00 + 1.428 0.992969 1092021 142.22 + 1.459 0.993750 1092889 160.00 + 1.496 0.994531 1093738 182.86 + 1.543 0.995313 1094611 213.33 + 1.601 0.996094 1095474 256.00 + 1.632 0.996484 1095889 284.44 + 1.675 0.996875 1096320 320.00 + 1.715 0.997266 1096747 365.71 + 1.762 0.997656 1097178 426.67 + 1.821 0.998047 1097608 512.00 + 1.855 0.998242 1097819 568.89 + 1.885 0.998437 1098037 640.00 + 1.923 0.998633 1098249 731.43 + 1.956 0.998828 1098470 853.33 + 1.982 0.999023 1098679 1024.00 + 1.993 0.999121 1098796 1137.78 + 2.005 0.999219 1098897 1280.00 + 2.021 0.999316 1099005 1462.86 + 2.032 0.999414 1099111 1706.67 + 2.053 0.999512 1099217 2048.00 + 2.065 0.999561 1099275 2275.56 + 2.077 0.999609 1099324 2560.00 + 2.091 0.999658 1099391 2925.71 + 2.099 0.999707 1099444 3413.33 + 2.107 0.999756 1099488 4096.00 + 2.115 0.999780 1099517 4551.11 + 2.121 0.999805 1099538 5120.00 + 2.129 0.999829 1099573 5851.43 + 2.137 0.999854 1099599 6826.67 + 2.141 0.999878 1099618 8192.00 + 2.145 0.999890 1099634 9102.22 + 2.147 0.999902 1099645 10240.00 + 2.153 0.999915 1099660 11702.86 + 2.159 0.999927 1099672 13653.33 + 2.167 0.999939 1099686 16384.00 + 2.173 0.999945 1099694 18204.44 + 2.177 0.999951 1099701 20480.00 + 2.179 0.999957 1099706 23405.71 + 2.181 0.999963 1099713 27306.67 + 2.185 0.999969 1099721 32768.00 + 2.189 0.999973 1099725 36408.89 + 2.191 0.999976 1099727 40960.00 + 2.193 0.999979 1099730 46811.43 + 2.199 0.999982 1099733 54613.33 + 2.201 0.999985 1099736 65536.00 + 2.203 0.999986 1099738 72817.78 + 2.205 0.999988 1099739 81920.00 + 2.207 0.999989 1099741 93622.86 + 2.209 0.999991 1099744 109226.67 + 2.209 0.999992 1099744 131072.00 + 2.211 0.999993 1099746 145635.56 + 2.211 0.999994 1099746 163840.00 + 2.215 0.999995 1099747 187245.71 + 2.215 0.999995 1099747 218453.33 + 2.217 0.999996 1099748 262144.00 + 2.221 0.999997 1099749 291271.11 + 2.221 0.999997 1099749 327680.00 + 2.223 0.999997 1099750 374491.43 + 2.223 0.999998 1099750 436906.67 + 2.223 0.999998 1099750 524288.00 + 2.227 0.999998 1099752 582542.22 + 2.227 1.000000 1099752 inf +#[Mean = 0.626, StdDeviation = 0.352] +#[Max = 2.226, Total count = 1099752] +#[Buckets = 27, SubBuckets = 2048] +---------------------------------------------------------- + 1649958 requests in 30.00s, 111.72MB read + Non-2xx or 3xx responses: 1649958 +Requests/sec: 54998.76 +Transfer/sec: 3.72MB + +MacBook-Pro-Ulia:wrk2-arm yulalenk$ ./wrk -c 1 -d 30 -t 1 -L -R 57000 -s /Users/yulalenk/sem2/2024-highload-dht/src/main/java/ru/vk/itmo/test/alenkovayulya/lua/put.lua http://localhost:8080 +/Users/yulalenk/sem2/2024-highload-dht/src/main/java/ru/vk/itmo/test/alenkovayulya/lua/put.lua: .../src/main/java/ru/vk/itmo/test/alenkovayulya/lua/put.lua:9: 'end' expected (to close 'function' at line 3) near '' +/Users/yulalenk/sem2/2024-highload-dht/src/main/java/ru/vk/itmo/test/alenkovayulya/lua/put.lua: .../src/main/java/ru/vk/itmo/test/alenkovayulya/lua/put.lua:9: 'end' expected (to close 'function' at line 3) near '' +Running 30s test @ http://localhost:8080 + 1 threads and 1 connections + Thread calibration: mean lat.: 5.388ms, rate sampling interval: 16ms + Thread Stats Avg Stdev Max +/- Stdev + Latency 651.70us 378.64us 3.13ms 63.96% + Req/Sec 58.91k 2.58k 67.07k 67.81% + Latency Distribution (HdrHistogram - Recorded Latency) + 50.000% 640.00us + 75.000% 0.94ms + 90.000% 1.11ms + 99.000% 1.66ms + 99.900% 2.47ms + 99.990% 3.08ms + 99.999% 3.12ms +100.000% 3.13ms + + Detailed Percentile spectrum: + Value Percentile TotalCount 1/(1-Percentile) + + 0.010 0.000000 1 1.00 + 0.157 0.100000 114071 1.11 + 0.285 0.200000 228731 1.25 + 0.404 0.300000 342028 1.43 + 0.523 0.400000 456176 1.67 + 0.640 0.500000 570238 2.00 + 0.698 0.550000 627537 2.22 + 0.757 0.600000 683994 2.50 + 0.817 0.650000 740874 2.86 + 0.877 0.700000 798615 3.33 + 0.936 0.750000 855509 4.00 + 0.965 0.775000 883293 4.44 + 0.996 0.800000 912417 5.00 + 1.026 0.825000 940655 5.71 + 1.055 0.850000 969018 6.67 + 1.085 0.875000 998197 8.00 + 1.099 0.887500 1011769 8.89 + 1.114 0.900000 1026491 10.00 + 1.128 0.912500 1040690 11.43 + 1.141 0.925000 1054288 13.33 + 1.157 0.937500 1069189 16.00 + 1.169 0.943750 1076047 17.78 + 1.186 0.950000 1082876 20.00 + 1.210 0.956250 1090038 22.86 + 1.240 0.962500 1097030 26.67 + 1.284 0.968750 1104228 32.00 + 1.313 0.971875 1107699 35.56 + 1.350 0.975000 1111272 40.00 + 1.392 0.978125 1114794 45.71 + 1.438 0.981250 1118363 53.33 + 1.499 0.984375 1121939 64.00 + 1.533 0.985938 1123729 71.11 + 1.578 0.987500 1125503 80.00 + 1.629 0.989062 1127279 91.43 + 1.676 0.990625 1129050 106.67 + 1.735 0.992188 1130833 128.00 + 1.780 0.992969 1131729 142.22 + 1.843 0.993750 1132616 160.00 + 1.913 0.994531 1133491 182.86 + 1.994 0.995313 1134390 213.33 + 2.099 0.996094 1135283 256.00 + 2.139 0.996484 1135719 284.44 + 2.187 0.996875 1136178 320.00 + 2.221 0.997266 1136606 365.71 + 2.251 0.997656 1137068 426.67 + 2.289 0.998047 1137502 512.00 + 2.323 0.998242 1137720 568.89 + 2.363 0.998437 1137945 640.00 + 2.411 0.998633 1138167 731.43 + 2.441 0.998828 1138397 853.33 + 2.471 0.999023 1138629 1024.00 + 2.483 0.999121 1138730 1137.78 + 2.503 0.999219 1138840 1280.00 + 2.523 0.999316 1138943 1462.86 + 2.539 0.999414 1139057 1706.67 + 2.591 0.999512 1139167 2048.00 + 2.607 0.999561 1139223 2275.56 + 2.633 0.999609 1139278 2560.00 + 2.657 0.999658 1139335 2925.71 + 2.723 0.999707 1139389 3413.33 + 2.825 0.999756 1139444 4096.00 + 2.879 0.999780 1139472 4551.11 + 2.931 0.999805 1139501 5120.00 + 2.979 0.999829 1139528 5851.43 + 3.007 0.999854 1139556 6826.67 + 3.039 0.999878 1139583 8192.00 + 3.067 0.999890 1139599 9102.22 + 3.077 0.999902 1139613 10240.00 + 3.083 0.999915 1139625 11702.86 + 3.089 0.999927 1139643 13653.33 + 3.095 0.999939 1139662 16384.00 + 3.095 0.999945 1139662 18204.44 + 3.097 0.999951 1139667 20480.00 + 3.101 0.999957 1139680 23405.71 + 3.103 0.999963 1139683 27306.67 + 3.107 0.999969 1139689 32768.00 + 3.109 0.999973 1139693 36408.89 + 3.111 0.999976 1139699 40960.00 + 3.111 0.999979 1139699 46811.43 + 3.115 0.999982 1139702 54613.33 + 3.119 0.999985 1139706 65536.00 + 3.121 0.999986 1139710 72817.78 + 3.121 0.999988 1139710 81920.00 + 3.121 0.999989 1139710 93622.86 + 3.125 0.999991 1139712 109226.67 + 3.127 0.999992 1139714 131072.00 + 3.129 0.999993 1139716 145635.56 + 3.129 0.999994 1139716 163840.00 + 3.129 0.999995 1139716 187245.71 + 3.131 0.999995 1139717 218453.33 + 3.133 0.999996 1139720 262144.00 + 3.133 0.999997 1139720 291271.11 + 3.133 0.999997 1139720 327680.00 + 3.133 0.999997 1139720 374491.43 + 3.133 0.999998 1139720 436906.67 + 3.133 0.999998 1139720 524288.00 + 3.135 0.999998 1139722 582542.22 + 3.135 1.000000 1139722 inf +#[Mean = 0.652, StdDeviation = 0.379] +#[Max = 3.134, Total count = 1139722] +#[Buckets = 27, SubBuckets = 2048] +---------------------------------------------------------- + 1709944 requests in 30.00s, 115.78MB read + Non-2xx or 3xx responses: 1709944 +Requests/sec: 56998.40 +Transfer/sec: 3.86MB diff --git a/src/main/java/ru/vk/itmo/test/alenkovayulya/cringe_results/wrk-put-stable.txt b/src/main/java/ru/vk/itmo/test/alenkovayulya/cringe_results/wrk-put-stable.txt new file mode 100644 index 000000000..6cc852214 --- /dev/null +++ b/src/main/java/ru/vk/itmo/test/alenkovayulya/cringe_results/wrk-put-stable.txt @@ -0,0 +1,126 @@ +MacBook-Pro-Ulia:wrk2-arm yulalenk$ ./wrk -c 1 -d 180 -t 1 -L -R 57000 -s /Users/yulalenk/sem2/2024-highload-dht/src/main/java/ru/vk/itmo/test/alenkovayulya/lua/put.lua http://localhost:8080 +Running 3m test @ http://localhost:8080 + 1 threads and 1 connections + Thread calibration: mean lat.: 8.694ms, rate sampling interval: 60ms + Thread Stats Avg Stdev Max +/- Stdev + Latency 1.85ms 3.94ms 43.52ms 93.07% + Req/Sec 57.54k 1.52k 67.45k 88.74% + Latency Distribution (HdrHistogram - Recorded Latency) + 50.000% 843.00us + 75.000% 1.25ms + 90.000% 3.79ms + 99.000% 23.49ms + 99.900% 38.78ms + 99.990% 42.91ms + 99.999% 43.45ms +100.000% 43.55ms + + Detailed Percentile spectrum: + Value Percentile TotalCount 1/(1-Percentile) + + 0.010 0.000000 15 1.00 + 0.216 0.100000 972841 1.11 + 0.382 0.200000 1939834 1.25 + 0.540 0.300000 2910584 1.43 + 0.693 0.400000 3880862 1.67 + 0.843 0.500000 4848568 2.00 + 0.919 0.550000 5335088 2.22 + 0.994 0.600000 5818339 2.50 + 1.066 0.650000 6305000 2.86 + 1.135 0.700000 6785060 3.33 + 1.255 0.750000 7267511 4.00 + 1.385 0.775000 7509627 4.44 + 1.591 0.800000 7752472 5.00 + 1.881 0.825000 7994385 5.71 + 2.255 0.850000 8236968 6.67 + 2.841 0.875000 8479141 8.00 + 3.267 0.887500 8600157 8.89 + 3.791 0.900000 8721146 10.00 + 4.439 0.912500 8842496 11.43 + 5.303 0.925000 8963194 13.33 + 6.307 0.937500 9084434 16.00 + 6.875 0.943750 9145016 17.78 + 7.535 0.950000 9205432 20.00 + 8.455 0.956250 9266169 22.86 + 9.351 0.962500 9326362 26.67 + 10.175 0.968750 9386989 32.00 + 10.975 0.971875 9417220 35.56 + 12.015 0.975000 9447546 40.00 + 13.679 0.978125 9477764 45.71 + 15.015 0.981250 9508335 53.33 + 16.199 0.984375 9538382 64.00 + 17.535 0.985938 9553668 71.11 + 18.623 0.987500 9568694 80.00 + 21.647 0.989062 9583740 91.43 + 24.575 0.990625 9598910 106.67 + 26.767 0.992188 9614097 128.00 + 27.551 0.992969 9621671 142.22 + 28.223 0.993750 9629181 160.00 + 29.199 0.994531 9636786 182.86 + 30.847 0.995313 9644343 213.33 + 33.215 0.996094 9651935 256.00 + 34.463 0.996484 9655802 284.44 + 35.263 0.996875 9659460 320.00 + 35.839 0.997266 9663369 365.71 + 36.639 0.997656 9667167 426.67 + 37.343 0.998047 9670966 512.00 + 37.599 0.998242 9672744 568.89 + 37.983 0.998437 9674743 640.00 + 38.303 0.998633 9676494 731.43 + 38.559 0.998828 9678457 853.33 + 38.815 0.999023 9680473 1024.00 + 38.911 0.999121 9681464 1137.78 + 39.007 0.999219 9682541 1280.00 + 39.071 0.999316 9683404 1462.86 + 39.135 0.999414 9684309 1706.67 + 39.231 0.999512 9684997 2048.00 + 39.327 0.999561 9685506 2275.56 + 39.679 0.999609 9685976 2560.00 + 39.903 0.999658 9686418 2925.71 + 40.287 0.999707 9686912 3413.33 + 40.863 0.999756 9687366 4096.00 + 41.311 0.999780 9687608 4551.11 + 41.695 0.999805 9687836 5120.00 + 42.079 0.999829 9688085 5851.43 + 42.335 0.999854 9688310 6826.67 + 42.719 0.999878 9688538 8192.00 + 42.879 0.999890 9688692 9102.22 + 42.911 0.999902 9688796 10240.00 + 42.943 0.999915 9688956 11702.86 + 42.975 0.999927 9689095 13653.33 + 43.007 0.999939 9689178 16384.00 + 43.039 0.999945 9689194 18204.44 + 43.103 0.999951 9689254 20480.00 + 43.167 0.999957 9689326 23405.71 + 43.231 0.999963 9689369 27306.67 + 43.327 0.999969 9689436 32768.00 + 43.359 0.999973 9689501 36408.89 + 43.359 0.999976 9689501 40960.00 + 43.391 0.999979 9689581 46811.43 + 43.391 0.999982 9689581 54613.33 + 43.391 0.999985 9689581 65536.00 + 43.423 0.999986 9689620 72817.78 + 43.423 0.999988 9689620 81920.00 + 43.423 0.999989 9689620 93622.86 + 43.455 0.999991 9689653 109226.67 + 43.455 0.999992 9689653 131072.00 + 43.487 0.999993 9689674 145635.56 + 43.487 0.999994 9689674 163840.00 + 43.487 0.999995 9689674 187245.71 + 43.519 0.999995 9689703 218453.33 + 43.519 0.999996 9689703 262144.00 + 43.519 0.999997 9689703 291271.11 + 43.519 0.999997 9689703 327680.00 + 43.519 0.999997 9689703 374491.43 + 43.519 0.999998 9689703 436906.67 + 43.519 0.999998 9689703 524288.00 + 43.551 0.999998 9689720 582542.22 + 43.551 1.000000 9689720 inf +#[Mean = 1.855, StdDeviation = 3.945] +#[Max = 43.520, Total count = 9689720] +#[Buckets = 27, SubBuckets = 2048] +---------------------------------------------------------- + 10259935 requests in 3.00m, 694.71MB read + Non-2xx or 3xx responses: 10259935 +Requests/sec: 56999.68 +Transfer/sec: 3.86MB diff --git a/src/main/java/ru/vk/itmo/test/alenkovayulya/dao/ByteArraySegment.java b/src/main/java/ru/vk/itmo/test/alenkovayulya/dao/ByteArraySegment.java new file mode 100644 index 000000000..ee2e80566 --- /dev/null +++ b/src/main/java/ru/vk/itmo/test/alenkovayulya/dao/ByteArraySegment.java @@ -0,0 +1,48 @@ +package ru.vk.itmo.test.alenkovayulya.dao; + +import java.io.IOException; +import java.lang.foreign.MemorySegment; +import java.nio.ByteBuffer; + +/** + * Growable buffer with {@link ByteBuffer} and {@link MemorySegment} interface. + * + * @author incubos + */ +final class ByteArraySegment { + private byte[] array; + private MemorySegment segment; + + ByteArraySegment(final int capacity) { + this.array = new byte[capacity]; + this.segment = MemorySegment.ofArray(array); + } + + void withArray(final ArrayConsumer consumer) throws IOException { + consumer.process(array); + } + + MemorySegment segment() { + return segment; + } + + void ensureCapacity(final long size) { + if (size > Integer.MAX_VALUE) { + throw new IllegalArgumentException("Too big!"); + } + + final int capacity = (int) size; + if (array.length >= capacity) { + return; + } + + // Grow to the nearest bigger power of 2 + final int newSize = Integer.highestOneBit(capacity) << 1; + array = new byte[newSize]; + segment = MemorySegment.ofArray(array); + } + + interface ArrayConsumer { + void process(byte[] array) throws IOException; + } +} diff --git a/src/main/java/ru/vk/itmo/test/alenkovayulya/dao/LiveFilteringIterator.java b/src/main/java/ru/vk/itmo/test/alenkovayulya/dao/LiveFilteringIterator.java new file mode 100644 index 000000000..1a3faa78c --- /dev/null +++ b/src/main/java/ru/vk/itmo/test/alenkovayulya/dao/LiveFilteringIterator.java @@ -0,0 +1,52 @@ +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; + +/** + * Filters non tombstone {@link Entry}s. + * + * @author incubos + */ +final class LiveFilteringIterator implements Iterator> { + private final Iterator> delegate; + private Entry next; + + LiveFilteringIterator(final Iterator> delegate) { + this.delegate = delegate; + skipTombstones(); + } + + private void skipTombstones() { + while (delegate.hasNext()) { + final Entry entry = delegate.next(); + if (entry.value() != null) { + this.next = entry; + break; + } + } + } + + @Override + public boolean hasNext() { + return next != null; + } + + @Override + public Entry next() { + if (!hasNext()) { + throw new NoSuchElementException(); + } + + // Consume + final Entry result = next; + next = null; + + skipTombstones(); + + return result; + } +} 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 new file mode 100644 index 000000000..3ff8f1f40 --- /dev/null +++ b/src/main/java/ru/vk/itmo/test/alenkovayulya/dao/MemTable.java @@ -0,0 +1,49 @@ +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; +import java.util.concurrent.ConcurrentSkipListMap; + +/** + * Memory table. + * + * @author incubos + */ +final class MemTable { + private final NavigableMap> map = + new ConcurrentSkipListMap<>( + MemorySegmentComparator.INSTANCE); + + boolean isEmpty() { + return map.isEmpty(); + } + + Iterator> get( + final MemorySegment from, + final MemorySegment to) { + if (from == null && to == null) { + // All + return map.values().iterator(); + } else if (from == null) { + // Head + return map.headMap(to).values().iterator(); + } else if (to == null) { + // Tail + return map.tailMap(from).values().iterator(); + } else { + // Slice + return map.subMap(from, to).values().iterator(); + } + } + + Entry get(final MemorySegment key) { + return map.get(key); + } + + Entry upsert(final Entry entry) { + return map.put(entry.key(), entry); + } +} diff --git a/src/main/java/ru/vk/itmo/test/alenkovayulya/dao/MemorySegmentComparator.java b/src/main/java/ru/vk/itmo/test/alenkovayulya/dao/MemorySegmentComparator.java new file mode 100644 index 000000000..cacb6dce9 --- /dev/null +++ b/src/main/java/ru/vk/itmo/test/alenkovayulya/dao/MemorySegmentComparator.java @@ -0,0 +1,89 @@ +package ru.vk.itmo.test.alenkovayulya.dao; + +import java.lang.foreign.MemorySegment; +import java.lang.foreign.ValueLayout; +import java.util.Comparator; + +/** + * Compares {@link MemorySegment}s. + * + * @author incubos + */ +final class MemorySegmentComparator implements Comparator { + static final Comparator INSTANCE = + new MemorySegmentComparator(); + + private MemorySegmentComparator() { + // Singleton + } + + @Override + public int compare( + final MemorySegment left, + final MemorySegment right) { + final long mismatch = left.mismatch(right); + if (mismatch == -1L) { + // No mismatch + return 0; + } + + if (mismatch == left.byteSize()) { + // left is prefix of right, so left is smaller + return -1; + } + + if (mismatch == right.byteSize()) { + // right is prefix of left, so left is greater + return 1; + } + + // Compare mismatched bytes as unsigned + return Byte.compareUnsigned( + left.getAtIndex( + ValueLayout.OfByte.JAVA_BYTE, + mismatch), + right.getAtIndex( + ValueLayout.OfByte.JAVA_BYTE, + mismatch)); + } + + static int compare( + final MemorySegment srcSegment, + final long srcFromOffset, + final long srcLength, + final MemorySegment dstSegment, + final long dstFromOffset, + final long dstLength) { + final long mismatch = + MemorySegment.mismatch( + srcSegment, + srcFromOffset, + srcFromOffset + srcLength, + dstSegment, + dstFromOffset, + dstFromOffset + dstLength); + if (mismatch == -1L) { + // No mismatch + return 0; + } + + if (mismatch == srcLength) { + // left is prefix of right, so left is smaller + return -1; + } + + if (mismatch == dstLength) { + // right is prefix of left, so left is greater + return 1; + } + + // Compare mismatched bytes as unsigned + return Byte.compareUnsigned( + srcSegment.getAtIndex( + ValueLayout.OfByte.JAVA_BYTE, + srcFromOffset + mismatch), + dstSegment.getAtIndex( + ValueLayout.OfByte.JAVA_BYTE, + dstFromOffset + mismatch)); + } +} 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 new file mode 100644 index 000000000..77e232a76 --- /dev/null +++ b/src/main/java/ru/vk/itmo/test/alenkovayulya/dao/MergingEntryIterator.java @@ -0,0 +1,72 @@ +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; +import java.util.NoSuchElementException; +import java.util.PriorityQueue; +import java.util.Queue; + +/** + * Merges entry {@link Iterator}s. + * + * @author incubos + */ +final class MergingEntryIterator implements Iterator> { + private final Queue iterators; + + MergingEntryIterator(final List iterators) { + assert iterators.stream().allMatch(WeightedPeekingEntryIterator::hasNext); + + this.iterators = new PriorityQueue<>(iterators); + } + + @Override + public boolean hasNext() { + return !iterators.isEmpty(); + } + + @Override + public Entry next() { + if (!hasNext()) { + throw new NoSuchElementException(); + } + + final WeightedPeekingEntryIterator top = iterators.remove(); + final Entry result = top.next(); + + if (top.hasNext()) { + // Not exhausted + iterators.add(top); + } + + // Remove older versions of the key + while (true) { + final WeightedPeekingEntryIterator iterator = iterators.peek(); + if (iterator == null) { + // Nothing left + break; + } + + // Skip entries with the same key + final Entry entry = iterator.peek(); + if (MemorySegmentComparator.INSTANCE.compare(result.key(), entry.key()) != 0) { + // Reached another key + break; + } + + // Drop + iterators.remove(); + // Skip + iterator.next(); + if (iterator.hasNext()) { + // Not exhausted + iterators.add(iterator); + } + } + + return result; + } +} 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 new file mode 100644 index 000000000..306816ba5 --- /dev/null +++ b/src/main/java/ru/vk/itmo/test/alenkovayulya/dao/ReferenceDao.java @@ -0,0 +1,292 @@ +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; +import java.lang.foreign.MemorySegment; +import java.util.Collections; +import java.util.HashSet; +import java.util.Iterator; +import java.util.Set; +import java.util.concurrent.ExecutorService; +import java.util.concurrent.Executors; +import java.util.concurrent.atomic.AtomicBoolean; +import java.util.concurrent.locks.ReadWriteLock; +import java.util.concurrent.locks.ReentrantReadWriteLock; + +/** + * Reference implementation of {@link Dao}. + * + * @author incubos + */ +public class ReferenceDao implements Dao> { + private final Config config; + private final Arena arena; + + private final ReadWriteLock lock = new ReentrantReadWriteLock(); + // Guarded by lock + private volatile TableSet tableSet; + + private final ExecutorService flusher = + Executors.newSingleThreadExecutor(r -> { + final Thread result = new Thread(r); + result.setName("flusher"); + return result; + }); + private final ExecutorService compactor = + Executors.newSingleThreadExecutor(r -> { + final Thread result = new Thread(r); + result.setName("compactor"); + return result; + }); + + private final AtomicBoolean closed = new AtomicBoolean(); + + public ReferenceDao(final Config config) throws IOException { + this.config = config; + this.arena = Arena.ofShared(); + + // First complete promotion of compacted SSTables + SSTables.promote( + config.basePath(), + 0, + 1); + + this.tableSet = + TableSet.from( + SSTables.discover( + arena, + config.basePath())); + } + + @Override + public Iterator> get( + final MemorySegment from, + final MemorySegment to) { + return new LiveFilteringIterator( + tableSet.get( + from, + to)); + } + + @Override + public Entry get(final MemorySegment key) { + // Without lock, just snapshot of table set + return tableSet.get(key); + } + + @Override + public void upsert(final Entry entry) { + final boolean autoFlush; + lock.readLock().lock(); + try { + if (tableSet.memTableSize.get() > config.flushThresholdBytes() + && tableSet.flushingTable != null) { + throw new IllegalStateException("Can't keep up with flushing!"); + } + + // Upsert + final Entry previous = tableSet.upsert(entry); + + // Update size estimate + final long size = tableSet.memTableSize.addAndGet(sizeOf(entry) - sizeOf(previous)); + autoFlush = size > config.flushThresholdBytes(); + } finally { + lock.readLock().unlock(); + } + + if (autoFlush) { + initiateFlush(true); + } + } + + private static long sizeOf(final Entry entry) { + if (entry == null) { + return 0L; + } + + if (entry.value() == null) { + return entry.key().byteSize(); + } + + return entry.key().byteSize() + entry.value().byteSize(); + } + + private void initiateFlush(final boolean auto) { + flusher.submit(() -> { + final TableSet currentTableSet; + lock.writeLock().lock(); + try { + if (this.tableSet.memTable.isEmpty()) { + // Nothing to flush + return; + } + + if (auto && this.tableSet.memTableSize.get() < config.flushThresholdBytes()) { + // Not enough data to flush + return; + } + + // Switch memTable to flushing + currentTableSet = this.tableSet.flushing(); + this.tableSet = currentTableSet; + } finally { + lock.writeLock().unlock(); + } + + // Write + final int sequence = currentTableSet.nextSequence(); + try { + new SSTableWriter() + .write( + config.basePath(), + sequence, + currentTableSet.flushingTable.get(null, null)); + } catch (IOException e) { + e.printStackTrace(); + Runtime.getRuntime().halt(-1); + return; + } + + // Open + final SSTable flushed; + try { + flushed = SSTables.open( + arena, + config.basePath(), + sequence); + } catch (IOException e) { + e.printStackTrace(); + Runtime.getRuntime().halt(-2); + return; + } + + // Switch + lock.writeLock().lock(); + try { + this.tableSet = this.tableSet.flushed(flushed); + } finally { + lock.writeLock().unlock(); + } + }).state(); + } + + @Override + public void flush() throws IOException { + initiateFlush(false); + } + + @Override + public void compact() throws IOException { + compactor.submit(() -> { + final TableSet currentTableSet; + lock.writeLock().lock(); + try { + currentTableSet = this.tableSet; + if (currentTableSet.ssTables.size() < 2) { + // Nothing to compact + return; + } + } finally { + lock.writeLock().unlock(); + } + + // Compact to 0 + try { + new SSTableWriter() + .write( + config.basePath(), + 0, + new LiveFilteringIterator( + currentTableSet.allSSTableEntries())); + } catch (IOException e) { + e.printStackTrace(); + Runtime.getRuntime().halt(-3); + } + + // Open 0 + final SSTable compacted; + try { + compacted = + SSTables.open( + arena, + config.basePath(), + 0); + } catch (IOException e) { + e.printStackTrace(); + Runtime.getRuntime().halt(-4); + return; + } + + // Replace old SSTables with compacted one to + // keep serving requests + final Set replaced = new HashSet<>(currentTableSet.ssTables); + lock.writeLock().lock(); + try { + this.tableSet = + this.tableSet.compacted( + replaced, + compacted); + } finally { + lock.writeLock().unlock(); + } + + // Remove compacted SSTables starting from the oldest ones. + // If we crash, 0 contains all the data, and + // it will be promoted on reopen. + for (final SSTable ssTable : currentTableSet.ssTables.reversed()) { + try { + SSTables.remove( + config.basePath(), + ssTable.sequence); + } catch (IOException e) { + e.printStackTrace(); + Runtime.getRuntime().halt(-5); + } + } + + // Promote zero to one (possibly replacing) + try { + SSTables.promote( + config.basePath(), + 0, + 1); + } catch (IOException e) { + e.printStackTrace(); + Runtime.getRuntime().halt(-6); + } + + // Replace promoted SSTable + lock.writeLock().lock(); + try { + this.tableSet = + this.tableSet.compacted( + Collections.singleton(compacted), + compacted.withSequence(1)); + } finally { + lock.writeLock().unlock(); + } + }).state(); + } + + @Override + public void close() throws IOException { + if (closed.getAndSet(true)) { + // Already closed + return; + } + + // Maybe flush + flush(); + + // Stop all the threads + flusher.close(); + compactor.close(); + + // Close arena + arena.close(); + } +} 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 new file mode 100644 index 000000000..91233ce1a --- /dev/null +++ b/src/main/java/ru/vk/itmo/test/alenkovayulya/dao/SSTable.java @@ -0,0 +1,204 @@ +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; +import java.util.Iterator; +import java.util.NoSuchElementException; + +/** + * Persistent SSTable in data file and index file. + * + * @author incubos + * @see SSTables + */ +final class SSTable { + final int sequence; + + private final MemorySegment index; + private final MemorySegment data; + private final long size; + + SSTable( + final int sequence, + final MemorySegment index, + final MemorySegment data) { + this.sequence = sequence; + this.index = index; + this.data = data; + this.size = index.byteSize() / Long.BYTES; + } + + SSTable withSequence(final int sequence) { + return new SSTable( + sequence, + index, + data); + } + + /** + * Returns index of the entry if found; otherwise, (-(insertion point) - 1). + * The insertion point is defined as the point at which the key would be inserted: + * the index of the first element greater than the key, + * or size if all keys are less than the specified key. + * Note that this guarantees that the return value will be >= 0 + * if and only if the key is found. + */ + private long entryBinarySearch(final MemorySegment key) { + long low = 0L; + long high = size - 1; + + while (low <= high) { + final long mid = (low + high) >>> 1; + final long midEntryOffset = entryOffset(mid); + final long midKeyLength = getLength(midEntryOffset); + final int compare = + MemorySegmentComparator.compare( + data, + midEntryOffset + Long.BYTES, // Position at key + midKeyLength, + key, + 0L, + key.byteSize()); + + if (compare < 0) { + low = mid + 1; + } else if (compare > 0) { + high = mid - 1; + } else { + return mid; + } + } + + return -(low + 1); + } + + private long entryOffset(final long entry) { + return index.get( + ValueLayout.OfLong.JAVA_LONG, + entry * Long.BYTES); + } + + private long getLength(final long offset) { + return data.get( + ValueLayout.OfLong.JAVA_LONG_UNALIGNED, + offset); + } + + Iterator> get( + final MemorySegment from, + final MemorySegment to) { + assert from == null || to == null || MemorySegmentComparator.INSTANCE.compare(from, to) <= 0; + + // Slice of SSTable in absolute offsets + final long fromOffset; + final long toOffset; + + // Left offset bound + if (from == null) { + // Start from the beginning + fromOffset = 0L; + } else { + final long fromEntry = entryBinarySearch(from); + if (fromEntry >= 0L) { + fromOffset = entryOffset(fromEntry); + } else if (-fromEntry - 1 == size) { + // No relevant data + return Collections.emptyIterator(); + } else { + // Greater but existing key found + fromOffset = entryOffset(-fromEntry - 1); + } + } + + // Right offset bound + if (to == null) { + // Up to the end + toOffset = data.byteSize(); + } else { + final long toEntry = entryBinarySearch(to); + if (toEntry >= 0L) { + toOffset = entryOffset(toEntry); + } else if (-toEntry - 1 == size) { + // Up to the end + toOffset = data.byteSize(); + } else { + // Greater but existing key found + toOffset = entryOffset(-toEntry - 1); + } + } + + return new SliceIterator(fromOffset, toOffset); + } + + Entry get(final MemorySegment key) { + final long entry = entryBinarySearch(key); + if (entry < 0) { + return null; + } + + // Skip key (will reuse the argument) + long offset = entryOffset(entry); + offset += Long.BYTES + key.byteSize(); + // Extract value length + final long valueLength = getLength(offset); + if (valueLength == SSTables.TOMBSTONE_VALUE_LENGTH) { + // Tombstone encountered + return new BaseEntry<>(key, null); + } else { + // Get value + offset += Long.BYTES; + final MemorySegment value = data.asSlice(offset, valueLength); + return new BaseEntry<>(key, value); + } + } + + private final class SliceIterator implements Iterator> { + private long offset; + private final long toOffset; + + private SliceIterator( + final long offset, + final long toOffset) { + this.offset = offset; + this.toOffset = toOffset; + } + + @Override + public boolean hasNext() { + return offset < toOffset; + } + + @Override + public Entry next() { + if (!hasNext()) { + throw new NoSuchElementException(); + } + + // Read key length + final long keyLength = getLength(offset); + offset += Long.BYTES; + + // Read key + final MemorySegment key = data.asSlice(offset, keyLength); + offset += keyLength; + + // Read value length + final long valueLength = getLength(offset); + offset += Long.BYTES; + + // Read value + if (valueLength == SSTables.TOMBSTONE_VALUE_LENGTH) { + // Tombstone encountered + return new BaseEntry<>(key, null); + } else { + final MemorySegment value = data.asSlice(offset, valueLength); + offset += valueLength; + return new BaseEntry<>(key, value); + } + } + } +} 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 new file mode 100644 index 000000000..e2d828bd2 --- /dev/null +++ b/src/main/java/ru/vk/itmo/test/alenkovayulya/dao/SSTableWriter.java @@ -0,0 +1,166 @@ +package ru.vk.itmo.test.alenkovayulya.dao; + +import ru.vk.itmo.dao.Entry; + +import java.io.BufferedOutputStream; +import java.io.FileOutputStream; +import java.io.IOException; +import java.io.OutputStream; +import java.lang.foreign.MemorySegment; +import java.lang.foreign.ValueLayout; +import java.nio.channels.FileChannel; +import java.nio.file.Files; +import java.nio.file.Path; +import java.nio.file.StandardCopyOption; +import java.util.Iterator; + +/** + * Writes {@link Entry} {@link Iterator} to SSTable on disk. + * + *

Index file {@code .index} contains {@code long} offsets to entries in data file: + * {@code [offset0, offset1, ...]} + * + *

Data file {@code .data} contains serialized entries: + * {@code } + * + *

Tombstones are encoded as {@code valueLength} {@code -1} and no subsequent value. + * + * @author incubos + */ +final class SSTableWriter { + private static final int BUFFER_SIZE = 64 * 1024; + + // Reusable buffers to eliminate allocations. + // But excessive memory copying is still there :( + // Long cell + private final ByteArraySegment longBuffer = new ByteArraySegment(Long.BYTES); + // Growable blob cell + private final ByteArraySegment blobBuffer = new ByteArraySegment(512); + + void write( + final Path baseDir, + final int sequence, + final Iterator> entries) throws IOException { + // Write to temporary files + final Path tempIndexName = SSTables.tempIndexName(baseDir, sequence); + final Path tempDataName = SSTables.tempDataName(baseDir, sequence); + + // Delete temporary files to eliminate tails + Files.deleteIfExists(tempIndexName); + Files.deleteIfExists(tempDataName); + + // Iterate in a single pass! + // Will write through FileChannel despite extra memory copying and + // no buffering (which may be implemented later). + // Looking forward to MemorySegment facilities in FileChannel! + try (OutputStream index = + new BufferedOutputStream( + new FileOutputStream( + tempIndexName.toFile()), + BUFFER_SIZE); + OutputStream data = + new BufferedOutputStream( + new FileOutputStream( + tempDataName.toFile()), + BUFFER_SIZE)) { + long entryOffset = 0L; + + // Iterate and serialize + while (entries.hasNext()) { + // First write offset to the entry + writeLong(entryOffset, index); + + // Then write the entry + final Entry entry = entries.next(); + entryOffset += writeEntry(entry, data); + } + } + + // Publish files atomically + // FIRST index, LAST data + final Path indexName = + SSTables.indexName( + baseDir, + sequence); + Files.move( + tempIndexName, + indexName, + StandardCopyOption.ATOMIC_MOVE, + StandardCopyOption.REPLACE_EXISTING); + final Path dataName = + SSTables.dataName( + baseDir, + sequence); + Files.move( + tempDataName, + dataName, + StandardCopyOption.ATOMIC_MOVE, + StandardCopyOption.REPLACE_EXISTING); + } + + private void writeLong( + final long value, + final OutputStream os) throws IOException { + longBuffer.segment().set( + ValueLayout.OfLong.JAVA_LONG_UNALIGNED, + 0, + value); + longBuffer.withArray(os::write); + } + + private void writeSegment( + final MemorySegment value, + final OutputStream os) throws IOException { + final long size = value.byteSize(); + blobBuffer.ensureCapacity(size); + MemorySegment.copy( + value, + 0L, + blobBuffer.segment(), + 0L, + size); + blobBuffer.withArray(array -> + os.write( + array, + 0, + (int) size)); + } + + /** + * Writes {@link Entry} to {@link FileChannel}. + * + * @return written bytes + */ + private long writeEntry( + final Entry entry, + final OutputStream os) throws IOException { + final MemorySegment key = entry.key(); + final MemorySegment value = entry.value(); + long result = 0L; + + // Key size + writeLong(key.byteSize(), os); + result += Long.BYTES; + + // Key + writeSegment(key, os); + result += key.byteSize(); + + // Value size and possibly value + if (value == null) { + // Tombstone + writeLong(SSTables.TOMBSTONE_VALUE_LENGTH, os); + result += Long.BYTES; + } else { + // Value length + writeLong(value.byteSize(), os); + result += Long.BYTES; + + // Value + writeSegment(value, os); + result += value.byteSize(); + } + + return result; + } +} diff --git a/src/main/java/ru/vk/itmo/test/alenkovayulya/dao/SSTables.java b/src/main/java/ru/vk/itmo/test/alenkovayulya/dao/SSTables.java new file mode 100644 index 000000000..8b9e1ccde --- /dev/null +++ b/src/main/java/ru/vk/itmo/test/alenkovayulya/dao/SSTables.java @@ -0,0 +1,162 @@ +package ru.vk.itmo.test.alenkovayulya.dao; + +import java.io.IOException; +import java.io.UncheckedIOException; +import java.lang.foreign.Arena; +import java.lang.foreign.MemorySegment; +import java.nio.channels.FileChannel; +import java.nio.file.Files; +import java.nio.file.Path; +import java.nio.file.StandardCopyOption; +import java.nio.file.StandardOpenOption; +import java.util.ArrayList; +import java.util.Collections; +import java.util.List; +import java.util.stream.Stream; + +/** + * Provides {@link SSTable} management facilities: dumping and discovery. + * + * @author incubos + */ +final class SSTables { + public static final String INDEX_SUFFIX = ".index"; + public static final String DATA_SUFFIX = ".data"; + public static final long TOMBSTONE_VALUE_LENGTH = -1L; + + private static final String TEMP_SUFFIX = ".tmp"; + + /** + * Can't instantiate. + */ + private SSTables() { + // Only static methods + } + + static Path indexName( + final Path baseDir, + final int sequence) { + return baseDir.resolve(sequence + INDEX_SUFFIX); + } + + static Path dataName( + final Path baseDir, + final int sequence) { + return baseDir.resolve(sequence + DATA_SUFFIX); + } + + static Path tempIndexName( + final Path baseDir, + final int sequence) { + return baseDir.resolve(sequence + INDEX_SUFFIX + TEMP_SUFFIX); + } + + static Path tempDataName( + final Path baseDir, + final int sequence) { + return baseDir.resolve(sequence + DATA_SUFFIX + TEMP_SUFFIX); + } + + /** + * Returns {@link List} of {@link SSTable}s from freshest to oldest. + */ + static List discover( + final Arena arena, + final Path baseDir) throws IOException { + if (!Files.exists(baseDir)) { + return Collections.emptyList(); + } + + final List result = new ArrayList<>(); + try (Stream files = Files.list(baseDir)) { + files.forEach(file -> { + final String fileName = file.getFileName().toString(); + if (!fileName.endsWith(DATA_SUFFIX)) { + // Skip non data + return; + } + + final int sequence = + // .data -> N + Integer.parseInt( + fileName.substring( + 0, + fileName.length() - DATA_SUFFIX.length())); + + try { + result.add(open(arena, baseDir, sequence)); + } catch (IOException e) { + throw new UncheckedIOException(e); + } + }); + } + + // Sort from freshest to oldest + result.sort((o1, o2) -> Integer.compare(o2.sequence, o1.sequence)); + + return Collections.unmodifiableList(result); + } + + static SSTable open( + final Arena arena, + final Path baseDir, + final int sequence) throws IOException { + final MemorySegment index = + mapReadOnly( + arena, + indexName(baseDir, sequence)); + final MemorySegment data = + mapReadOnly( + arena, + dataName(baseDir, sequence)); + + return new SSTable( + sequence, + index, + data); + } + + private static MemorySegment mapReadOnly( + final Arena arena, + final Path file) throws IOException { + try (FileChannel channel = + FileChannel.open( + file, + StandardOpenOption.READ)) { + return channel.map( + FileChannel.MapMode.READ_ONLY, + 0L, + Files.size(file), + arena); + } + } + + static void remove( + final Path baseDir, + final int sequence) throws IOException { + // First delete data file to make SSTable invisible + Files.delete(dataName(baseDir, sequence)); + Files.delete(indexName(baseDir, sequence)); + } + + static void promote( + final Path baseDir, + final int from, + final int to) throws IOException { + // Build to progress to the same outcome + if (Files.exists(indexName(baseDir, from))) { + Files.move( + indexName(baseDir, from), + indexName(baseDir, to), + StandardCopyOption.ATOMIC_MOVE, + StandardCopyOption.REPLACE_EXISTING); + } + if (Files.exists(dataName(baseDir, from))) { + Files.move( + dataName(baseDir, from), + dataName(baseDir, to), + StandardCopyOption.ATOMIC_MOVE, + StandardCopyOption.REPLACE_EXISTING); + } + } +} 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 new file mode 100644 index 000000000..1f8227824 --- /dev/null +++ b/src/main/java/ru/vk/itmo/test/alenkovayulya/dao/TableSet.java @@ -0,0 +1,205 @@ +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; +import java.util.Iterator; +import java.util.List; +import java.util.Set; +import java.util.concurrent.atomic.AtomicLong; + +/** + * Data set in various tables. + * + * @author incubos + */ +final class TableSet { + final MemTable memTable; + final AtomicLong memTableSize; + // null or read-only + final MemTable flushingTable; + // From freshest to oldest + final List ssTables; + + private TableSet( + final MemTable memTable, + final AtomicLong memTableSize, + final MemTable flushingTable, + final List ssTables) { + this.memTable = memTable; + this.memTableSize = memTableSize; + this.flushingTable = flushingTable; + this.ssTables = ssTables; + } + + static TableSet from(final List ssTables) { + return new TableSet( + new MemTable(), + new AtomicLong(), + null, + ssTables); + } + + int nextSequence() { + return ssTables.stream() + .mapToInt(t -> t.sequence) + .max() + .orElse(0) + 1; + } + + TableSet flushing() { + if (memTable.isEmpty()) { + throw new IllegalStateException("Nothing to flush"); + } + + if (flushingTable != null) { + throw new IllegalStateException("Already flushing"); + } + + return new TableSet( + new MemTable(), + new AtomicLong(), + memTable, + ssTables); + } + + TableSet flushed(final SSTable flushed) { + final List newSSTables = new ArrayList<>(ssTables.size() + 1); + newSSTables.add(flushed); + newSSTables.addAll(ssTables); + return new TableSet( + memTable, + memTableSize, + null, + newSSTables); + } + + TableSet compacted( + final Set replaced, + final SSTable with) { + final List newSsTables = new ArrayList<>(this.ssTables.size() + 1); + + // Keep not replaced SSTables + for (final SSTable ssTable : this.ssTables) { + if (!replaced.contains(ssTable)) { + newSsTables.add(ssTable); + } + } + + // Logically the oldest one + newSsTables.add(with); + + return new TableSet( + memTable, + memTableSize, + flushingTable, + newSsTables); + } + + Iterator> get( + final MemorySegment from, + final MemorySegment to) { + final List iterators = + new ArrayList<>(2 + ssTables.size()); + + // MemTable goes first + final Iterator> memTableIterator = + memTable.get(from, to); + if (memTableIterator.hasNext()) { + iterators.add( + new WeightedPeekingEntryIterator( + Integer.MIN_VALUE, + memTableIterator)); + } + + // Then goes flushing + if (flushingTable != null) { + final Iterator> flushingIterator = + flushingTable.get(from, to); + if (flushingIterator.hasNext()) { + iterators.add( + new WeightedPeekingEntryIterator( + Integer.MIN_VALUE + 1, + flushingIterator)); + } + } + + // Then go all the SSTables + for (int i = 0; i < ssTables.size(); i++) { + final SSTable ssTable = ssTables.get(i); + final Iterator> ssTableIterator = + ssTable.get(from, to); + if (ssTableIterator.hasNext()) { + iterators.add( + new WeightedPeekingEntryIterator( + i, + ssTableIterator)); + } + } + + return switch (iterators.size()) { + case 0 -> Collections.emptyIterator(); + case 1 -> iterators.get(0); + default -> new MergingEntryIterator(iterators); + }; + } + + Entry get(final MemorySegment key) { + // Slightly optimized version not to pollute the heap + + // First check MemTable + Entry result = memTable.get(key); + if (result != null) { + // Transform tombstone + return swallowTombstone(result); + } + + // Then check flushing + if (flushingTable != null) { + result = flushingTable.get(key); + if (result != null) { + // Transform tombstone + return swallowTombstone(result); + } + } + + // At last check SSTables from freshest to oldest + for (final SSTable ssTable : ssTables) { + result = ssTable.get(key); + if (result != null) { + // Transform tombstone + return swallowTombstone(result); + } + } + + // Nothing found + return null; + } + + private static Entry swallowTombstone(final Entry entry) { + return entry.value() == null ? null : entry; + } + + Entry upsert(final Entry entry) { + return memTable.upsert(entry); + } + + 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 = + ssTable.get(null, null); + iterators.add( + new WeightedPeekingEntryIterator( + i, + ssTableIterator)); + } + + return new MergingEntryIterator(iterators); + } +} 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 new file mode 100644 index 000000000..05b8d74ba --- /dev/null +++ b/src/main/java/ru/vk/itmo/test/alenkovayulya/dao/WeightedPeekingEntryIterator.java @@ -0,0 +1,67 @@ +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; + +/** + * Peeking {@link Iterator} wrapper. + * + * @author incubos + */ +final class WeightedPeekingEntryIterator + implements Iterator>, + Comparable { + private final int weight; + private final Iterator> delegate; + private Entry next; + + WeightedPeekingEntryIterator( + final int weight, + final Iterator> delegate) { + this.weight = weight; + this.delegate = delegate; + this.next = delegate.hasNext() ? delegate.next() : null; + } + + @Override + public boolean hasNext() { + return next != null; + } + + @Override + public Entry next() { + if (!hasNext()) { + throw new NoSuchElementException(); + } + + final Entry result = next; + next = delegate.hasNext() ? delegate.next() : null; + return result; + } + + Entry peek() { + if (!hasNext()) { + throw new NoSuchElementException(); + } + + return next; + } + + @Override + public int compareTo(final WeightedPeekingEntryIterator other) { + // First compare keys + int result = + MemorySegmentComparator.INSTANCE.compare( + peek().key(), + other.peek().key()); + if (result != 0) { + return result; + } + + // Then compare weights if keys are equal + return Integer.compare(weight, other.weight); + } +} diff --git a/src/main/java/ru/vk/itmo/test/alenkovayulya/lua/get.lua b/src/main/java/ru/vk/itmo/test/alenkovayulya/lua/get.lua new file mode 100644 index 000000000..d0e6ff508 --- /dev/null +++ b/src/main/java/ru/vk/itmo/test/alenkovayulya/lua/get.lua @@ -0,0 +1,6 @@ +function request() + id = math.random(1, 500000) + path = "/v0/entity?id=" .. id + method = "GET" + return wrk.format(method, path, body) +end diff --git a/src/main/java/ru/vk/itmo/test/alenkovayulya/lua/put.lua b/src/main/java/ru/vk/itmo/test/alenkovayulya/lua/put.lua new file mode 100644 index 000000000..b8045c942 --- /dev/null +++ b/src/main/java/ru/vk/itmo/test/alenkovayulya/lua/put.lua @@ -0,0 +1,9 @@ +id = 0 + + function request() + body = string.rep("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/alenkovayulya/report/report.md b/src/main/java/ru/vk/itmo/test/alenkovayulya/report/report.md new file mode 100644 index 000000000..4bbbe404f --- /dev/null +++ b/src/main/java/ru/vk/itmo/test/alenkovayulya/report/report.md @@ -0,0 +1,129 @@ +Директория cringe_results - история про то, как не заметить ошибки в скриптах и все замерить неправильно... +Обнаружила я, что мои запросы не выполняются, а просто откидываются, только на этапе профилирования, когда увидела вызов метода handleDefault класса ServerIml вместо работы с дао))) +Поэтому, очевидно, выдерживаемую нагрузку и точки разладки пришлось измерять заново + +Все корректные данные лежат в директории right_results + +Точки разладки я определеяла, постепенно давая большую нагрузку и следя за персентилями. + +Для PUT-запросов анализ выглядел следующим образом: + +**PUT 25K RPS** +50.000% 1.08ms +75.000% 1.79ms +90.000% 2.74ms +99.000% 5.39ms +99.900% 14.48ms +99.990% 18.22ms +99.999% 18.54ms +100.000% 18.61ms + +**PUT 30K RPS** +50.000% 701.00us +75.000% 1.03ms +90.000% 1.98ms +99.000% 5.51ms +99.900% 21.26ms +99.990% 26.51ms +99.999% 26.99ms +100.000% 27.04ms + +**PUT 35K RPS** +50.000% 665.00us +75.000% 0.98ms +90.000% 1.37ms +99.000% 17.26ms +99.900% 37.85ms +99.990% 42.43ms +99.999% 42.81ms +100.000% 42.85ms + +Можно заметить, как постпененно серверу становится хуже и хужи, и вот мы подходим к точке разладки: + +**PUT 40K RPS** +50.000% 921.60ms +75.000% 1.16s +90.000% 1.21s +99.000% 1.25s +99.900% 1.25s +99.990% 1.25s +99.999% 1.25s +100.000% 1.25s + +Таким образом, за стабильную нагрузку ниже точки разладки я приняла 20 000 rps и провела двухминутный тест: + +50.000% 1.41ms +75.000% 2.03ms +90.000% 2.63ms +99.000% 4.53ms +99.900% 14.22ms +99.990% 20.16ms +99.999% 21.63ms +100.000% 22.35ms + +Получила адекватные персентили и среднюю Latency = 1.52ms + +Для GET-запросов, так как LSM на чтение работает медленее, чем на вставку, выдерживаемая нагрузка оказалась поменьше: + +**GET 10K RPS** +50.000% 1.06ms +75.000% 1.66ms +90.000% 2.18ms +99.000% 2.60ms +99.900% 6.24ms +99.990% 9.87ms +99.999% 10.04ms +100.000% 10.06ms + +**GET 20K RPS** - уже здесь можно заметить сильное ухуджение +50.000% 0.86ms +75.000% 1.36ms +90.000% 2.20ms +99.000% 6.82ms +99.900% 33.05ms +99.990% 39.20ms +99.999% 39.77ms +100.000% 39.81ms + +**GET 40K RPS** +50.000% 13.36s +75.000% 14.06s +90.000% 14.31s +99.000% 14.36s +99.900% 14.37s +99.990% 14.37s +99.999% 14.37s +100.000% 14.37s + +Стабильной нагрузкой я посчитала 10K и также проверила сервер под ней в течение двух минут: + +50.000% 1.11ms +75.000% 1.73ms +90.000% 2.18ms +99.000% 4.03ms +99.900% 11.73ms +99.990% 21.25ms +99.999% 22.25ms +100.000% 22.56ms + +Latency 1.23ms + +**Результаты профилирования** +ALLOC GET/ALLOC PUT +На графиках заметно, что больше всего аллокаций приходится на работу библиотеки one nio, связанную с преобразованиями входных и выходных данных +Также значимая часть аллокаций - на преобразование ключей и значений в MemorySegment и обратно + +CPU GET/CPU PUT +Для поиска,стоит отметить работу метода get нашего Dao, в котором большую часть времени тратилось на бинарный поиск. +Для вставкт, соответсвенно, метод upsert того же Dao. +Также для обоих методов большое кол-во времени тратится на работу библиотеки one-nio по процессингу запросов и отправке ответов и внутренние джавовские процессы + + + + + + + + + + diff --git a/src/main/java/ru/vk/itmo/test/alenkovayulya/right_results/right-alloc-get.png b/src/main/java/ru/vk/itmo/test/alenkovayulya/right_results/right-alloc-get.png new file mode 100644 index 000000000..7d4ba76fe Binary files /dev/null and b/src/main/java/ru/vk/itmo/test/alenkovayulya/right_results/right-alloc-get.png differ diff --git a/src/main/java/ru/vk/itmo/test/alenkovayulya/right_results/right-alloc-put.png b/src/main/java/ru/vk/itmo/test/alenkovayulya/right_results/right-alloc-put.png new file mode 100644 index 000000000..d8669d088 Binary files /dev/null and b/src/main/java/ru/vk/itmo/test/alenkovayulya/right_results/right-alloc-put.png differ diff --git a/src/main/java/ru/vk/itmo/test/alenkovayulya/right_results/right-cpu-get.png b/src/main/java/ru/vk/itmo/test/alenkovayulya/right_results/right-cpu-get.png new file mode 100644 index 000000000..5f36b7429 Binary files /dev/null and b/src/main/java/ru/vk/itmo/test/alenkovayulya/right_results/right-cpu-get.png differ diff --git a/src/main/java/ru/vk/itmo/test/alenkovayulya/right_results/right-cpu-put.png b/src/main/java/ru/vk/itmo/test/alenkovayulya/right_results/right-cpu-put.png new file mode 100644 index 000000000..94dd2d319 Binary files /dev/null and b/src/main/java/ru/vk/itmo/test/alenkovayulya/right_results/right-cpu-put.png differ diff --git a/src/main/java/ru/vk/itmo/test/alenkovayulya/right_results/wrk-get-search-break-point.txt b/src/main/java/ru/vk/itmo/test/alenkovayulya/right_results/wrk-get-search-break-point.txt new file mode 100644 index 000000000..44050e208 --- /dev/null +++ b/src/main/java/ru/vk/itmo/test/alenkovayulya/right_results/wrk-get-search-break-point.txt @@ -0,0 +1,315 @@ +MacBook-Pro-Ulia:wrk2-arm yulalenk$ ./wrk -c 1 -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 1 connections + Thread calibration: mean lat.: 1.275ms, rate sampling interval: 10ms + Thread Stats Avg Stdev Max +/- Stdev + Latency 1.14ms 742.67us 10.06ms 64.48% + Req/Sec 10.56k 1.02k 20.55k 72.86% + Latency Distribution (HdrHistogram - Recorded Latency) + 50.000% 1.06ms + 75.000% 1.66ms + 90.000% 2.18ms + 99.000% 2.60ms + 99.900% 6.24ms + 99.990% 9.87ms + 99.999% 10.04ms +100.000% 10.06ms + + Detailed Percentile spectrum: + Value Percentile TotalCount 1/(1-Percentile) + + 0.019 0.000000 2 1.00 + 0.259 0.100000 20053 1.11 + 0.462 0.200000 40019 1.25 + 0.667 0.300000 60029 1.43 + 0.867 0.400000 80026 1.67 + 1.058 0.500000 100019 2.00 + 1.131 0.550000 110021 2.22 + 1.200 0.600000 120074 2.50 + 1.311 0.650000 130020 2.86 + 1.480 0.700000 139991 3.33 + 1.660 0.750000 150007 4.00 + 1.747 0.775000 154959 4.44 + 1.838 0.800000 160008 5.00 + 1.929 0.825000 164981 5.71 + 2.016 0.850000 169956 6.67 + 2.103 0.875000 174988 8.00 + 2.143 0.887500 177565 8.89 + 2.177 0.900000 179971 10.00 + 2.211 0.912500 182617 11.43 + 2.241 0.925000 184993 13.33 + 2.271 0.937500 187583 16.00 + 2.285 0.943750 188781 17.78 + 2.297 0.950000 189952 20.00 + 2.313 0.956250 191218 22.86 + 2.331 0.962500 192515 26.67 + 2.353 0.968750 193775 32.00 + 2.367 0.971875 194377 35.56 + 2.385 0.975000 194952 40.00 + 2.409 0.978125 195621 45.71 + 2.433 0.981250 196208 53.33 + 2.471 0.984375 196837 64.00 + 2.491 0.985938 197151 71.11 + 2.519 0.987500 197464 80.00 + 2.557 0.989062 197761 91.43 + 2.649 0.990625 198077 106.67 + 2.825 0.992188 198386 128.00 + 2.927 0.992969 198543 142.22 + 3.015 0.993750 198697 160.00 + 3.171 0.994531 198853 182.86 + 3.349 0.995313 199009 213.33 + 3.519 0.996094 199167 256.00 + 3.669 0.996484 199246 284.44 + 4.045 0.996875 199322 320.00 + 4.435 0.997266 199400 365.71 + 4.831 0.997656 199479 426.67 + 5.335 0.998047 199556 512.00 + 5.835 0.998242 199595 568.89 + 6.079 0.998437 199635 640.00 + 6.155 0.998633 199677 731.43 + 6.199 0.998828 199715 853.33 + 6.251 0.999023 199752 1024.00 + 6.319 0.999121 199772 1137.78 + 6.399 0.999219 199790 1280.00 + 6.667 0.999316 199810 1462.86 + 7.147 0.999414 199829 1706.67 + 7.679 0.999512 199849 2048.00 + 7.895 0.999561 199859 2275.56 + 8.179 0.999609 199868 2560.00 + 8.511 0.999658 199878 2925.71 + 8.887 0.999707 199888 3413.33 + 9.447 0.999756 199898 4096.00 + 9.583 0.999780 199903 4551.11 + 9.647 0.999805 199907 5120.00 + 9.679 0.999829 199913 5851.43 + 9.711 0.999854 199917 6826.67 + 9.799 0.999878 199922 8192.00 + 9.831 0.999890 199925 9102.22 + 9.911 0.999902 199929 10240.00 + 9.911 0.999915 199929 11702.86 + 9.935 0.999927 199932 13653.33 + 9.951 0.999939 199934 16384.00 + 9.967 0.999945 199937 18204.44 + 9.967 0.999951 199937 20480.00 + 9.983 0.999957 199939 23405.71 + 9.983 0.999963 199939 27306.67 + 9.991 0.999969 199940 32768.00 + 10.007 0.999973 199941 36408.89 + 10.023 0.999976 199942 40960.00 + 10.023 0.999979 199942 46811.43 + 10.039 0.999982 199945 54613.33 + 10.039 0.999985 199945 65536.00 + 10.039 0.999986 199945 72817.78 + 10.039 0.999988 199945 81920.00 + 10.039 0.999989 199945 93622.86 + 10.039 0.999991 199945 109226.67 + 10.039 0.999992 199945 131072.00 + 10.039 0.999993 199945 145635.56 + 10.039 0.999994 199945 163840.00 + 10.039 0.999995 199945 187245.71 + 10.063 0.999995 199946 218453.33 + 10.063 1.000000 199946 inf +#[Mean = 1.141, StdDeviation = 0.743] +#[Max = 10.056, Total count = 199946] +#[Buckets = 27, SubBuckets = 2048] +---------------------------------------------------------- + 299978 requests in 30.00s, 361.89MB read + Non-2xx or 3xx responses: 2 +Requests/sec: 9999.30 +Transfer/sec: 12.06MB + +MacBook-Pro-Ulia:wrk2-arm yulalenk$ ./wrk -c 1 -d 30 -t 1 -L -R 20000 -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 1 connections + Thread calibration: mean lat.: 1.101ms, rate sampling interval: 10ms + Thread Stats Avg Stdev Max +/- Stdev + Latency 1.21ms 1.99ms 39.78ms 94.94% + Req/Sec 21.12k 3.28k 38.00k 79.82% + Latency Distribution (HdrHistogram - Recorded Latency) + 50.000% 0.86ms + 75.000% 1.36ms + 90.000% 2.20ms + 99.000% 6.82ms + 99.900% 33.05ms + 99.990% 39.20ms + 99.999% 39.77ms +100.000% 39.81ms + + Detailed Percentile spectrum: + Value Percentile TotalCount 1/(1-Percentile) + + 0.018 0.000000 6 1.00 + 0.199 0.100000 40069 1.11 + 0.369 0.200000 80021 1.25 + 0.536 0.300000 120104 1.43 + 0.699 0.400000 160031 1.67 + 0.859 0.500000 199995 2.00 + 0.937 0.550000 219955 2.22 + 1.013 0.600000 239994 2.50 + 1.086 0.650000 260156 2.86 + 1.152 0.700000 280085 3.33 + 1.359 0.750000 299937 4.00 + 1.489 0.775000 309944 4.44 + 1.620 0.800000 319960 5.00 + 1.754 0.825000 329953 5.71 + 1.890 0.850000 339931 6.67 + 2.034 0.875000 349908 8.00 + 2.113 0.887500 355019 8.89 + 2.199 0.900000 359946 10.00 + 2.367 0.912500 364913 11.43 + 2.607 0.925000 369909 13.33 + 2.885 0.937500 374898 16.00 + 3.043 0.943750 377394 17.78 + 3.219 0.950000 379891 20.00 + 3.433 0.956250 382390 22.86 + 3.693 0.962500 384882 26.67 + 4.005 0.968750 387388 32.00 + 4.187 0.971875 388655 35.56 + 4.387 0.975000 389882 40.00 + 4.619 0.978125 391131 45.71 + 4.911 0.981250 392381 53.33 + 5.315 0.984375 393638 64.00 + 5.579 0.985938 394255 71.11 + 5.975 0.987500 394881 80.00 + 6.463 0.989062 395508 91.43 + 7.075 0.990625 396132 106.67 + 7.827 0.992188 396754 128.00 + 8.367 0.992969 397066 142.22 + 9.199 0.993750 397380 160.00 + 10.015 0.994531 397692 182.86 + 10.887 0.995313 398003 213.33 + 12.311 0.996094 398315 256.00 + 14.063 0.996484 398472 284.44 + 18.063 0.996875 398628 320.00 + 20.799 0.997266 398784 365.71 + 23.695 0.997656 398940 426.67 + 26.239 0.998047 399099 512.00 + 27.535 0.998242 399175 568.89 + 28.751 0.998437 399253 640.00 + 30.159 0.998633 399331 731.43 + 31.759 0.998828 399409 853.33 + 33.247 0.999023 399487 1024.00 + 33.887 0.999121 399526 1137.78 + 34.495 0.999219 399565 1280.00 + 35.135 0.999316 399606 1462.86 + 35.807 0.999414 399643 1706.67 + 36.575 0.999512 399682 2048.00 + 36.959 0.999561 399703 2275.56 + 37.343 0.999609 399721 2560.00 + 37.791 0.999658 399741 2925.71 + 38.239 0.999707 399761 3413.33 + 38.591 0.999756 399780 4096.00 + 38.751 0.999780 399793 4551.11 + 38.783 0.999805 399800 5120.00 + 38.879 0.999829 399812 5851.43 + 38.911 0.999854 399820 6826.67 + 39.071 0.999878 399830 8192.00 + 39.135 0.999890 399834 9102.22 + 39.231 0.999902 399839 10240.00 + 39.327 0.999915 399844 11702.86 + 39.423 0.999927 399849 13653.33 + 39.487 0.999939 399853 16384.00 + 39.551 0.999945 399857 18204.44 + 39.583 0.999951 399859 20480.00 + 39.615 0.999957 399861 23405.71 + 39.647 0.999963 399863 27306.67 + 39.679 0.999969 399865 32768.00 + 39.711 0.999973 399869 36408.89 + 39.711 0.999976 399869 40960.00 + 39.711 0.999979 399869 46811.43 + 39.743 0.999982 399872 54613.33 + 39.743 0.999985 399872 65536.00 + 39.743 0.999986 399872 72817.78 + 39.775 0.999988 399876 81920.00 + 39.775 0.999989 399876 93622.86 + 39.775 0.999991 399876 109226.67 + 39.775 0.999992 399876 131072.00 + 39.775 0.999993 399876 145635.56 + 39.775 0.999994 399876 163840.00 + 39.775 0.999995 399876 187245.71 + 39.775 0.999995 399876 218453.33 + 39.775 0.999996 399876 262144.00 + 39.775 0.999997 399876 291271.11 + 39.775 0.999997 399876 327680.00 + 39.775 0.999997 399876 374491.43 + 39.807 0.999998 399877 436906.67 + 39.807 1.000000 399877 inf +#[Mean = 1.212, StdDeviation = 1.986] +#[Max = 39.776, Total count = 399877] +#[Buckets = 27, SubBuckets = 2048] +---------------------------------------------------------- + 599954 requests in 30.00s, 723.78MB read + Non-2xx or 3xx responses: 4 +Requests/sec: 19998.49 +Transfer/sec: 24.13MB + +MacBook-Pro-Ulia:wrk2-arm yulalenk$ ./wrk -c 1 -d 30 -t 1 -L -R 40000 -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 1 connections + Thread calibration: mean lat.: 5667.188ms, rate sampling interval: 17203ms + Thread Stats Avg Stdev Max +/- Stdev + Latency 13.20s 958.67ms 14.36s 61.42% + Req/Sec 32.06k 0.00 32.06k 0.00% + Latency Distribution (HdrHistogram - Recorded Latency) + 50.000% 13.36s + 75.000% 14.06s + 90.000% 14.31s + 99.000% 14.36s + 99.900% 14.37s + 99.990% 14.37s + 99.999% 14.37s +100.000% 14.37s + + Detailed Percentile spectrum: + Value Percentile TotalCount 1/(1-Percentile) + + 9158.655 0.000000 33 1.00 + 11943.935 0.100000 69892 1.11 + 12287.999 0.200000 140075 1.25 + 12656.639 0.300000 209225 1.43 + 13025.279 0.400000 279558 1.67 + 13361.151 0.500000 349221 2.00 + 13524.991 0.550000 383231 2.22 + 13680.639 0.600000 418569 2.50 + 13803.519 0.650000 452479 2.86 + 13942.783 0.700000 487932 3.33 + 14057.471 0.750000 523322 4.00 + 14106.623 0.775000 539426 4.44 + 14155.775 0.800000 556574 5.00 + 14213.119 0.825000 576056 5.71 + 14254.079 0.850000 593636 6.67 + 14278.655 0.875000 609293 8.00 + 14295.039 0.887500 618308 8.89 + 14311.423 0.900000 627329 10.00 + 14327.807 0.912500 642115 11.43 + 14335.999 0.925000 649988 13.33 + 14344.191 0.937500 657285 16.00 + 14344.191 0.943750 657285 17.78 + 14352.383 0.950000 669333 20.00 + 14352.383 0.956250 669333 22.86 + 14352.383 0.962500 669333 26.67 + 14360.575 0.968750 692294 32.00 + 14360.575 0.971875 692294 35.56 + 14360.575 0.975000 692294 40.00 + 14360.575 0.978125 692294 45.71 + 14360.575 0.981250 692294 53.33 + 14360.575 0.984375 692294 64.00 + 14360.575 0.985938 692294 71.11 + 14360.575 0.987500 692294 80.00 + 14360.575 0.989062 692294 91.43 + 14360.575 0.990625 692294 106.67 + 14360.575 0.992188 692294 128.00 + 14360.575 0.992969 692294 142.22 + 14360.575 0.993750 692294 160.00 + 14360.575 0.994531 692294 182.86 + 14360.575 0.995313 692294 213.33 + 14368.767 0.996094 695341 256.00 + 14368.767 1.000000 695341 inf +#[Mean = 13198.344, StdDeviation = 958.672] +#[Max = 14360.576, Total count = 695341] +#[Buckets = 27, SubBuckets = 2048] +---------------------------------------------------------- + 729326 requests in 30.00s, 0.86GB read + Non-2xx or 3xx responses: 4 +Requests/sec: 24310.86 +Transfer/sec: 29.33MB \ No newline at end of file diff --git a/src/main/java/ru/vk/itmo/test/alenkovayulya/right_results/wrk-get-stable.txt b/src/main/java/ru/vk/itmo/test/alenkovayulya/right_results/wrk-get-stable.txt new file mode 100644 index 000000000..64431c311 --- /dev/null +++ b/src/main/java/ru/vk/itmo/test/alenkovayulya/right_results/wrk-get-stable.txt @@ -0,0 +1,126 @@ +MacBook-Pro-Ulia:wrk2-arm yulalenk$ ./wrk -c 1 -d 120 -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 2m test @ http://localhost:8080 + 1 threads and 1 connections + Thread calibration: mean lat.: 1.178ms, rate sampling interval: 10ms +^[[A Thread Stats Avg Stdev Max +/- Stdev + Latency 1.23ms 0.98ms 22.54ms 82.90% + Req/Sec 10.57k 1.26k 26.30k 77.74% + Latency Distribution (HdrHistogram - Recorded Latency) + 50.000% 1.11ms + 75.000% 1.73ms + 90.000% 2.18ms + 99.000% 4.03ms + 99.900% 11.73ms + 99.990% 21.25ms + 99.999% 22.25ms +100.000% 22.56ms + + Detailed Percentile spectrum: + Value Percentile TotalCount 1/(1-Percentile) + + 0.016 0.000000 1 1.00 + 0.279 0.100000 110371 1.11 + 0.501 0.200000 220135 1.25 + 0.719 0.300000 330153 1.43 + 0.926 0.400000 440201 1.67 + 1.107 0.500000 550704 2.00 + 1.169 0.550000 605641 2.22 + 1.255 0.600000 660400 2.50 + 1.395 0.650000 715014 2.86 + 1.557 0.700000 770069 3.33 + 1.725 0.750000 825181 4.00 + 1.808 0.775000 852588 4.44 + 1.891 0.800000 880284 5.00 + 1.970 0.825000 907541 5.71 + 2.047 0.850000 935293 6.67 + 2.119 0.875000 962971 8.00 + 2.151 0.887500 976341 8.89 + 2.181 0.900000 990056 10.00 + 2.209 0.912500 1003822 11.43 + 2.237 0.925000 1017792 13.33 + 2.271 0.937500 1032018 16.00 + 2.289 0.943750 1038811 17.78 + 2.309 0.950000 1045310 20.00 + 2.337 0.956250 1051944 22.86 + 2.377 0.962500 1058782 26.67 + 2.443 0.968750 1065577 32.00 + 2.503 0.971875 1069018 35.56 + 2.593 0.975000 1072458 40.00 + 2.727 0.978125 1075902 45.71 + 2.941 0.981250 1079337 53.33 + 3.271 0.984375 1082783 64.00 + 3.471 0.985938 1084482 71.11 + 3.635 0.987500 1086207 80.00 + 3.855 0.989062 1087920 91.43 + 4.183 0.990625 1089636 106.67 + 4.615 0.992188 1091356 128.00 + 4.911 0.992969 1092217 142.22 + 5.275 0.993750 1093077 160.00 + 5.699 0.994531 1093935 182.86 + 6.151 0.995313 1094794 213.33 + 6.755 0.996094 1095653 256.00 + 7.139 0.996484 1096082 284.44 + 7.579 0.996875 1096511 320.00 + 8.107 0.997266 1096942 365.71 + 8.679 0.997656 1097375 426.67 + 9.239 0.998047 1097801 512.00 + 9.535 0.998242 1098019 568.89 + 9.863 0.998437 1098234 640.00 + 10.287 0.998633 1098444 731.43 + 10.975 0.998828 1098658 853.33 + 11.863 0.999023 1098875 1024.00 + 12.479 0.999121 1098981 1137.78 + 12.943 0.999219 1099090 1280.00 + 13.335 0.999316 1099197 1462.86 + 13.831 0.999414 1099303 1706.67 + 14.863 0.999512 1099410 2048.00 + 15.303 0.999561 1099466 2275.56 + 15.943 0.999609 1099520 2560.00 + 16.399 0.999658 1099574 2925.71 + 17.439 0.999707 1099625 3413.33 + 18.527 0.999756 1099679 4096.00 + 19.151 0.999780 1099708 4551.11 + 19.711 0.999805 1099733 5120.00 + 20.159 0.999829 1099760 5851.43 + 20.607 0.999854 1099787 6826.67 + 20.975 0.999878 1099815 8192.00 + 21.103 0.999890 1099827 9102.22 + 21.295 0.999902 1099840 10240.00 + 21.455 0.999915 1099854 11702.86 + 21.567 0.999927 1099868 13653.33 + 21.647 0.999939 1099880 16384.00 + 21.711 0.999945 1099887 18204.44 + 21.791 0.999951 1099894 20480.00 + 21.903 0.999957 1099902 23405.71 + 21.967 0.999963 1099907 27306.67 + 21.983 0.999969 1099914 32768.00 + 21.999 0.999973 1099918 36408.89 + 22.015 0.999976 1099922 40960.00 + 22.031 0.999979 1099924 46811.43 + 22.063 0.999982 1099927 54613.33 + 22.175 0.999985 1099931 65536.00 + 22.191 0.999986 1099932 72817.78 + 22.255 0.999988 1099936 81920.00 + 22.255 0.999989 1099936 93622.86 + 22.287 0.999991 1099937 109226.67 + 22.319 0.999992 1099939 131072.00 + 22.367 0.999993 1099940 145635.56 + 22.383 0.999994 1099941 163840.00 + 22.447 0.999995 1099942 187245.71 + 22.447 0.999995 1099942 218453.33 + 22.511 0.999996 1099943 262144.00 + 22.543 0.999997 1099945 291271.11 + 22.543 0.999997 1099945 327680.00 + 22.543 0.999997 1099945 374491.43 + 22.543 0.999998 1099945 436906.67 + 22.543 0.999998 1099945 524288.00 + 22.559 0.999998 1099947 582542.22 + 22.559 1.000000 1099947 inf +#[Mean = 1.226, StdDeviation = 0.983] +#[Max = 22.544, Total count = 1099947] +#[Buckets = 27, SubBuckets = 2048] +---------------------------------------------------------- + 1199997 requests in 2.00m, 1.41GB read + Non-2xx or 3xx responses: 5 +Requests/sec: 9999.89 +Transfer/sec: 12.06MB diff --git a/src/main/java/ru/vk/itmo/test/alenkovayulya/right_results/wrk-put-search-break-point.txt b/src/main/java/ru/vk/itmo/test/alenkovayulya/right_results/wrk-put-search-break-point.txt new file mode 100644 index 000000000..ac404a58a --- /dev/null +++ b/src/main/java/ru/vk/itmo/test/alenkovayulya/right_results/wrk-put-search-break-point.txt @@ -0,0 +1,439 @@ +MacBook-Pro-Ulia:wrk2-arm yulalenk$ ./wrk -c 1 -d 30 -t 1 -L -R 25000 -s /Users/yulalenk/sem2/2024-highload-dht/src/main/java/ru/vk/itmo/test/alenkovayulya/lua/put.lua http://localhost:8080 +Running 30s test @ http://localhost:8080 + 1 threads and 1 connections + Thread calibration: mean lat.: 1.277ms, rate sampling interval: 10ms + Thread Stats Avg Stdev Max +/- Stdev + Latency 1.37ms 1.29ms 18.59ms 86.65% + Req/Sec 26.39k 4.23k 49.30k 77.29% + Latency Distribution (HdrHistogram - Recorded Latency) + 50.000% 1.08ms + 75.000% 1.79ms + 90.000% 2.74ms + 99.000% 5.39ms + 99.900% 14.48ms + 99.990% 18.22ms + 99.999% 18.54ms +100.000% 18.61ms + + Detailed Percentile spectrum: + Value Percentile TotalCount 1/(1-Percentile) + + 0.013 0.000000 2 1.00 + 0.253 0.100000 50114 1.11 + 0.480 0.200000 100002 1.25 + 0.698 0.300000 150012 1.43 + 0.902 0.400000 199965 1.67 + 1.081 0.500000 250178 2.00 + 1.153 0.550000 275107 2.22 + 1.300 0.600000 299973 2.50 + 1.462 0.650000 325017 2.86 + 1.625 0.700000 350029 3.33 + 1.791 0.750000 374905 4.00 + 1.877 0.775000 387505 4.44 + 1.965 0.800000 399993 5.00 + 2.057 0.825000 412453 5.71 + 2.161 0.850000 424936 6.67 + 2.377 0.875000 437410 8.00 + 2.553 0.887500 443692 8.89 + 2.737 0.900000 449921 10.00 + 2.937 0.912500 456139 11.43 + 3.157 0.925000 462418 13.33 + 3.403 0.937500 468656 16.00 + 3.539 0.943750 471769 17.78 + 3.681 0.950000 474886 20.00 + 3.833 0.956250 478033 22.86 + 4.005 0.962500 481129 26.67 + 4.223 0.968750 484293 32.00 + 4.343 0.971875 485845 35.56 + 4.479 0.975000 487395 40.00 + 4.627 0.978125 488965 45.71 + 4.779 0.981250 490537 53.33 + 4.943 0.984375 492087 64.00 + 5.039 0.985938 492845 71.11 + 5.155 0.987500 493620 80.00 + 5.295 0.989062 494418 91.43 + 5.459 0.990625 495184 106.67 + 5.683 0.992188 495966 128.00 + 5.835 0.992969 496365 142.22 + 6.019 0.993750 496744 160.00 + 6.295 0.994531 497136 182.86 + 6.927 0.995313 497527 213.33 + 8.023 0.996094 497918 256.00 + 8.623 0.996484 498113 284.44 + 9.503 0.996875 498306 320.00 + 10.591 0.997266 498503 365.71 + 11.799 0.997656 498697 426.67 + 12.663 0.998047 498895 512.00 + 13.055 0.998242 498990 568.89 + 13.415 0.998437 499088 640.00 + 13.839 0.998633 499186 731.43 + 14.215 0.998828 499285 853.33 + 14.535 0.999023 499381 1024.00 + 14.791 0.999121 499430 1137.78 + 15.071 0.999219 499479 1280.00 + 15.295 0.999316 499527 1462.86 + 15.519 0.999414 499577 1706.67 + 15.927 0.999512 499624 2048.00 + 16.295 0.999561 499649 2275.56 + 16.527 0.999609 499673 2560.00 + 16.959 0.999658 499698 2925.71 + 17.231 0.999707 499723 3413.33 + 17.535 0.999756 499746 4096.00 + 17.663 0.999780 499759 4551.11 + 17.775 0.999805 499771 5120.00 + 17.887 0.999829 499783 5851.43 + 18.015 0.999854 499796 6826.67 + 18.127 0.999878 499808 8192.00 + 18.191 0.999890 499814 9102.22 + 18.223 0.999902 499823 10240.00 + 18.239 0.999915 499828 11702.86 + 18.271 0.999927 499832 13653.33 + 18.335 0.999939 499839 16384.00 + 18.367 0.999945 499842 18204.44 + 18.383 0.999951 499844 20480.00 + 18.415 0.999957 499848 23405.71 + 18.431 0.999963 499850 27306.67 + 18.463 0.999969 499853 32768.00 + 18.495 0.999973 499857 36408.89 + 18.495 0.999976 499857 40960.00 + 18.511 0.999979 499859 46811.43 + 18.511 0.999982 499859 54613.33 + 18.543 0.999985 499863 65536.00 + 18.543 0.999986 499863 72817.78 + 18.543 0.999988 499863 81920.00 + 18.543 0.999989 499863 93622.86 + 18.559 0.999991 499864 109226.67 + 18.575 0.999992 499866 131072.00 + 18.575 0.999993 499866 145635.56 + 18.575 0.999994 499866 163840.00 + 18.575 0.999995 499866 187245.71 + 18.575 0.999995 499866 218453.33 + 18.591 0.999996 499867 262144.00 + 18.591 0.999997 499867 291271.11 + 18.591 0.999997 499867 327680.00 + 18.591 0.999997 499867 374491.43 + 18.591 0.999998 499867 436906.67 + 18.607 0.999998 499868 524288.00 + 18.607 1.000000 499868 inf +#[Mean = 1.373, StdDeviation = 1.285] +#[Max = 18.592, Total count = 499868] +#[Buckets = 27, SubBuckets = 2048] +---------------------------------------------------------- + 749961 requests in 30.00s, 47.92MB read +Requests/sec: 24998.09 +Transfer/sec: 1.60MB +MacBook-Pro-Ulia:wrk2-arm yulalenk$ ./wrk -c 1 -d 30 -t 1 -L -R 30000 -s /Users/yulalenk/sem2/2024-highload-dht/src/main/java/ru/vk/itmo/test/alenkovayulya/lua/put.lua http://localhost:8080 +Running 30s test @ http://localhost:8080 + 1 threads and 1 connections + Thread calibration: mean lat.: 1.040ms, rate sampling interval: 10ms + Thread Stats Avg Stdev Max +/- Stdev + Latency 0.99ms 1.48ms 27.02ms 92.54% + Req/Sec 31.68k 4.59k 58.67k 82.58% + Latency Distribution (HdrHistogram - Recorded Latency) + 50.000% 701.00us + 75.000% 1.03ms + 90.000% 1.98ms + 99.000% 5.51ms + 99.900% 21.26ms + 99.990% 26.51ms + 99.999% 26.99ms +100.000% 27.04ms + + Detailed Percentile spectrum: + Value Percentile TotalCount 1/(1-Percentile) + + 0.013 0.000000 3 1.00 + 0.156 0.100000 60042 1.11 + 0.293 0.200000 120090 1.25 + 0.430 0.300000 180280 1.43 + 0.566 0.400000 239992 1.67 + 0.701 0.500000 300169 2.00 + 0.768 0.550000 330014 2.22 + 0.835 0.600000 360104 2.50 + 0.902 0.650000 390192 2.86 + 0.968 0.700000 419989 3.33 + 1.033 0.750000 449926 4.00 + 1.066 0.775000 465219 4.44 + 1.098 0.800000 480079 5.00 + 1.130 0.825000 495188 5.71 + 1.178 0.850000 509907 6.67 + 1.546 0.875000 524916 8.00 + 1.759 0.887500 532403 8.89 + 1.983 0.900000 539897 10.00 + 2.213 0.912500 547432 11.43 + 2.463 0.925000 554893 13.33 + 2.745 0.937500 562383 16.00 + 2.901 0.943750 566147 17.78 + 3.075 0.950000 569916 20.00 + 3.303 0.956250 573628 22.86 + 3.581 0.962500 577389 26.67 + 3.919 0.968750 581138 32.00 + 4.091 0.971875 583002 35.56 + 4.271 0.975000 584905 40.00 + 4.443 0.978125 586763 45.71 + 4.623 0.981250 588627 53.33 + 4.867 0.984375 590510 64.00 + 5.015 0.985938 591457 71.11 + 5.183 0.987500 592371 80.00 + 5.379 0.989062 593321 91.43 + 5.639 0.990625 594256 106.67 + 6.335 0.992188 595187 128.00 + 7.171 0.992969 595653 142.22 + 8.067 0.993750 596121 160.00 + 9.375 0.994531 596590 182.86 + 10.799 0.995313 597058 213.33 + 12.199 0.996094 597526 256.00 + 12.991 0.996484 597761 284.44 + 13.695 0.996875 598001 320.00 + 14.119 0.997266 598230 365.71 + 14.719 0.997656 598469 426.67 + 15.055 0.998047 598698 512.00 + 15.695 0.998242 598815 568.89 + 16.671 0.998437 598932 640.00 + 18.271 0.998633 599049 731.43 + 19.823 0.998828 599167 853.33 + 21.487 0.999023 599284 1024.00 + 22.351 0.999121 599343 1137.78 + 22.879 0.999219 599401 1280.00 + 23.391 0.999316 599460 1462.86 + 23.935 0.999414 599519 1706.67 + 24.415 0.999512 599577 2048.00 + 24.687 0.999561 599606 2275.56 + 24.975 0.999609 599636 2560.00 + 25.247 0.999658 599665 2925.71 + 25.503 0.999707 599694 3413.33 + 25.759 0.999756 599724 4096.00 + 25.887 0.999780 599738 4551.11 + 26.015 0.999805 599752 5120.00 + 26.143 0.999829 599767 5851.43 + 26.287 0.999854 599783 6826.67 + 26.415 0.999878 599797 8192.00 + 26.479 0.999890 599806 9102.22 + 26.527 0.999902 599812 10240.00 + 26.591 0.999915 599819 11702.86 + 26.655 0.999927 599826 13653.33 + 26.735 0.999939 599834 16384.00 + 26.767 0.999945 599837 18204.44 + 26.799 0.999951 599841 20480.00 + 26.831 0.999957 599844 23405.71 + 26.863 0.999963 599848 27306.67 + 26.895 0.999969 599852 32768.00 + 26.911 0.999973 599853 36408.89 + 26.927 0.999976 599855 40960.00 + 26.943 0.999979 599858 46811.43 + 26.959 0.999982 599859 54613.33 + 26.975 0.999985 599861 65536.00 + 26.975 0.999986 599861 72817.78 + 26.991 0.999988 599864 81920.00 + 26.991 0.999989 599864 93622.86 + 26.991 0.999991 599864 109226.67 + 27.007 0.999992 599865 131072.00 + 27.007 0.999993 599865 145635.56 + 27.023 0.999994 599867 163840.00 + 27.023 0.999995 599867 187245.71 + 27.023 0.999995 599867 218453.33 + 27.023 0.999996 599867 262144.00 + 27.023 0.999997 599867 291271.11 + 27.039 0.999997 599869 327680.00 + 27.039 1.000000 599869 inf +#[Mean = 0.987, StdDeviation = 1.483] +#[Max = 27.024, Total count = 599869] +#[Buckets = 27, SubBuckets = 2048] +---------------------------------------------------------- + 899960 requests in 30.00s, 57.50MB read +Requests/sec: 29998.76 +Transfer/sec: 1.92MB +MacBook-Pro-Ulia:wrk2-arm yulalenk$ ./wrk -c 1 -d 30 -t 1 -L -R 35000 -s /Users/yulalenk/sem2/2024-highload-dht/src/main/java/ru/vk/itmo/test/alenkovayulya/lua/put.lua http://localhost:8080 +Running 30s test @ http://localhost:8080 + 1 threads and 1 connections + Thread calibration: mean lat.: 6.095ms, rate sampling interval: 12ms + Thread Stats Avg Stdev Max +/- Stdev + Latency 1.17ms 2.97ms 42.82ms 96.21% + Req/Sec 36.61k 5.15k 58.55k 88.49% + Latency Distribution (HdrHistogram - Recorded Latency) + 50.000% 665.00us + 75.000% 0.98ms + 90.000% 1.37ms + 99.000% 17.26ms + 99.900% 37.85ms + 99.990% 42.43ms + 99.999% 42.81ms +100.000% 42.85ms + + Detailed Percentile spectrum: + Value Percentile TotalCount 1/(1-Percentile) + + 0.014 0.000000 18 1.00 + 0.149 0.100000 70018 1.11 + 0.279 0.200000 140339 1.25 + 0.408 0.300000 210159 1.43 + 0.537 0.400000 280255 1.67 + 0.665 0.500000 350193 2.00 + 0.729 0.550000 385293 2.22 + 0.793 0.600000 420124 2.50 + 0.857 0.650000 455061 2.86 + 0.921 0.700000 490222 3.33 + 0.984 0.750000 524990 4.00 + 1.016 0.775000 542602 4.44 + 1.047 0.800000 559865 5.00 + 1.079 0.825000 577718 5.71 + 1.110 0.850000 594953 6.67 + 1.141 0.875000 612629 8.00 + 1.159 0.887500 621155 8.89 + 1.373 0.900000 629856 10.00 + 1.823 0.912500 638592 11.43 + 2.289 0.925000 647350 13.33 + 2.757 0.937500 656088 16.00 + 3.021 0.943750 660461 17.78 + 3.309 0.950000 664830 20.00 + 3.671 0.956250 669200 22.86 + 4.191 0.962500 673585 26.67 + 4.891 0.968750 677967 32.00 + 5.235 0.971875 680150 35.56 + 5.595 0.975000 682343 40.00 + 6.019 0.978125 684508 45.71 + 7.731 0.981250 686693 53.33 + 11.111 0.984375 688880 64.00 + 12.847 0.985938 689971 71.11 + 14.647 0.987500 691065 80.00 + 16.351 0.989062 692162 91.43 + 18.015 0.990625 693253 106.67 + 19.903 0.992188 694349 128.00 + 20.847 0.992969 694892 142.22 + 22.159 0.993750 695439 160.00 + 23.391 0.994531 695987 182.86 + 24.975 0.995313 696534 213.33 + 26.815 0.996094 697080 256.00 + 27.919 0.996484 697353 284.44 + 29.135 0.996875 697629 320.00 + 30.223 0.997266 697899 365.71 + 31.375 0.997656 698172 426.67 + 32.575 0.998047 698447 512.00 + 33.151 0.998242 698588 568.89 + 33.759 0.998437 698719 640.00 + 35.199 0.998633 698856 731.43 + 36.671 0.998828 698994 853.33 + 38.015 0.999023 699129 1024.00 + 38.559 0.999121 699198 1137.78 + 39.039 0.999219 699266 1280.00 + 39.583 0.999316 699338 1462.86 + 40.095 0.999414 699405 1706.67 + 40.607 0.999512 699473 2048.00 + 40.863 0.999561 699509 2275.56 + 41.087 0.999609 699539 2560.00 + 41.343 0.999658 699574 2925.71 + 41.567 0.999707 699611 3413.33 + 41.791 0.999756 699646 4096.00 + 41.887 0.999780 699662 4551.11 + 42.015 0.999805 699679 5120.00 + 42.143 0.999829 699695 5851.43 + 42.271 0.999854 699715 6826.67 + 42.367 0.999878 699729 8192.00 + 42.399 0.999890 699736 9102.22 + 42.463 0.999902 699749 10240.00 + 42.495 0.999915 699754 11702.86 + 42.559 0.999927 699764 13653.33 + 42.591 0.999939 699771 16384.00 + 42.623 0.999945 699776 18204.44 + 42.655 0.999951 699781 20480.00 + 42.687 0.999957 699786 23405.71 + 42.719 0.999963 699792 27306.67 + 42.719 0.999969 699792 32768.00 + 42.751 0.999973 699798 36408.89 + 42.751 0.999976 699798 40960.00 + 42.751 0.999979 699798 46811.43 + 42.783 0.999982 699803 54613.33 + 42.783 0.999985 699803 65536.00 + 42.783 0.999986 699803 72817.78 + 42.815 0.999988 699808 81920.00 + 42.815 0.999989 699808 93622.86 + 42.815 0.999991 699808 109226.67 + 42.815 0.999992 699808 131072.00 + 42.815 0.999993 699808 145635.56 + 42.815 0.999994 699808 163840.00 + 42.847 0.999995 699812 187245.71 + 42.847 1.000000 699812 inf +#[Mean = 1.172, StdDeviation = 2.970] +#[Max = 42.816, Total count = 699812] +#[Buckets = 27, SubBuckets = 2048] +---------------------------------------------------------- + 1049982 requests in 30.00s, 67.09MB read +Requests/sec: 34998.51 +Transfer/sec: 2.24MB +MacBook-Pro-Ulia:wrk2-arm yulalenk$ + +MacBook-Pro-Ulia:wrk2-arm yulalenk$ ./wrk -c 1 -d 30 -t 1 -L -R 40000 -s /Users/yulalenk/sem2/2024-highload-dht/src/main/java/ru/vk/itmo/test/alenkovayulya/lua/put.lua http://localhost:8080 +Running 30s test @ http://localhost:8080 + 1 threads and 1 connections + Thread calibration: mean lat.: 423.231ms, rate sampling interval: 1153ms + Thread Stats Avg Stdev Max +/- Stdev + Latency 931.55ms 196.17ms 1.25s 52.09% + Req/Sec 48.40k 1.16k 49.45k 94.12% + Latency Distribution (HdrHistogram - Recorded Latency) + 50.000% 921.60ms + 75.000% 1.16s + 90.000% 1.21s + 99.000% 1.25s + 99.900% 1.25s + 99.990% 1.25s + 99.999% 1.25s +100.000% 1.25s + + Detailed Percentile spectrum: + Value Percentile TotalCount 1/(1-Percentile) + + 603.135 0.000000 21 1.00 + 677.887 0.100000 97112 1.11 + 740.863 0.200000 192997 1.25 + 807.935 0.300000 290383 1.43 + 846.847 0.400000 386466 1.67 + 921.599 0.500000 486035 2.00 + 936.447 0.550000 531464 2.22 + 954.367 0.600000 579727 2.50 + 989.183 0.650000 627158 2.86 + 1029.631 0.700000 675580 3.33 + 1157.119 0.750000 723739 4.00 + 1173.503 0.775000 748387 4.44 + 1176.575 0.800000 777523 5.00 + 1183.743 0.825000 796306 5.71 + 1191.935 0.850000 820851 6.67 + 1204.223 0.875000 845295 8.00 + 1207.295 0.887500 867172 8.89 + 1208.319 0.900000 870764 10.00 + 1211.391 0.912500 880738 11.43 + 1217.535 0.925000 893284 13.33 + 1223.679 0.937500 907189 16.00 + 1224.703 0.943750 917794 17.78 + 1224.703 0.950000 917794 20.00 + 1225.727 0.956250 925756 22.86 + 1227.775 0.962500 929291 26.67 + 1230.847 0.968750 935752 32.00 + 1232.895 0.971875 939265 35.56 + 1233.919 0.975000 940766 40.00 + 1235.967 0.978125 943947 45.71 + 1240.063 0.981250 947453 53.33 + 1242.111 0.984375 950129 64.00 + 1244.159 0.985938 954072 71.11 + 1244.159 0.987500 954072 80.00 + 1245.183 0.989062 957452 91.43 + 1245.183 0.990625 957452 106.67 + 1245.183 0.992188 957452 128.00 + 1247.231 0.992969 957979 142.22 + 1249.279 0.993750 959452 160.00 + 1249.279 0.994531 959452 182.86 + 1251.327 0.995313 960668 213.33 + 1252.351 0.996094 963577 256.00 + 1252.351 0.996484 963577 284.44 + 1252.351 0.996875 963577 320.00 + 1252.351 0.997266 963577 365.71 + 1252.351 0.997656 963577 426.67 + 1252.351 0.998047 963577 512.00 + 1252.351 0.998242 963577 568.89 + 1252.351 0.998437 963577 640.00 + 1252.351 0.998633 963577 731.43 + 1253.375 0.998828 964712 853.33 + 1253.375 1.000000 964712 inf +#[Mean = 931.547, StdDeviation = 196.173] +#[Max = 1252.352, Total count = 964712] +#[Buckets = 27, SubBuckets = 2048] +---------------------------------------------------------- \ No newline at end of file diff --git a/src/main/java/ru/vk/itmo/test/alenkovayulya/right_results/wrk-stable-put.txt b/src/main/java/ru/vk/itmo/test/alenkovayulya/right_results/wrk-stable-put.txt new file mode 100644 index 000000000..bb903a754 --- /dev/null +++ b/src/main/java/ru/vk/itmo/test/alenkovayulya/right_results/wrk-stable-put.txt @@ -0,0 +1,130 @@ +MacBook-Pro-Ulia:wrk2-arm yulalenk$ ./wrk -c 1 -d 120 -t 1 -L -R 20000 -s /Users/yulalenk/sem2/2024-highload-dht/src/main/java/ru/vk/itmo/test/alenkovayulya/lua/put.lua http://localhost:8080 +Running 2m test @ http://localhost:8080 + 1 threads and 1 connections + Thread calibration: mean lat.: 1.942ms, rate sampling interval: 10ms + Thread Stats Avg Stdev Max +/- Stdev + Latency 1.52ms 1.14ms 22.34ms 79.11% + Req/Sec 15.81k 2.21k 44.30k 77.13% + Latency Distribution (HdrHistogram - Recorded Latency) + 50.000% 1.41ms + 75.000% 2.03ms + 90.000% 2.63ms + 99.000% 4.53ms + 99.900% 14.22ms + 99.990% 20.16ms + 99.999% 21.63ms +100.000% 22.35ms + + Detailed Percentile spectrum: + Value Percentile TotalCount 1/(1-Percentile) + + 0.013 0.000000 1 1.00 + 0.338 0.100000 165382 1.11 + 0.647 0.200000 330097 1.25 + 0.944 0.300000 495173 1.43 + 1.180 0.400000 660346 1.67 + 1.408 0.500000 825575 2.00 + 1.527 0.550000 908153 2.22 + 1.649 0.600000 990405 2.50 + 1.774 0.650000 1072632 2.86 + 1.901 0.700000 1155328 3.33 + 2.029 0.750000 1238099 4.00 + 2.093 0.775000 1279661 4.44 + 2.155 0.800000 1320308 5.00 + 2.219 0.825000 1361485 5.71 + 2.323 0.850000 1402781 6.67 + 2.461 0.875000 1444158 8.00 + 2.539 0.887500 1464624 8.89 + 2.627 0.900000 1485178 10.00 + 2.725 0.912500 1505652 11.43 + 2.841 0.925000 1526203 13.33 + 2.983 0.937500 1546850 16.00 + 3.063 0.943750 1557170 17.78 + 3.151 0.950000 1567630 20.00 + 3.247 0.956250 1577954 22.86 + 3.353 0.962500 1588169 26.67 + 3.479 0.968750 1598447 32.00 + 3.551 0.971875 1603593 35.56 + 3.627 0.975000 1608775 40.00 + 3.709 0.978125 1613877 45.71 + 3.807 0.981250 1619059 53.33 + 3.949 0.984375 1624169 64.00 + 4.055 0.985938 1626744 71.11 + 4.207 0.987500 1629357 80.00 + 4.383 0.989062 1631904 91.43 + 4.655 0.990625 1634486 106.67 + 5.047 0.992188 1637061 128.00 + 5.327 0.992969 1638345 142.22 + 5.635 0.993750 1639639 160.00 + 6.087 0.994531 1640928 182.86 + 6.679 0.995313 1642212 213.33 + 7.419 0.996094 1643500 256.00 + 7.819 0.996484 1644147 284.44 + 8.335 0.996875 1644798 320.00 + 8.815 0.997266 1645441 365.71 + 9.391 0.997656 1646084 426.67 + 10.111 0.998047 1646734 512.00 + 10.423 0.998242 1647050 568.89 + 10.807 0.998437 1647368 640.00 + 11.935 0.998633 1647690 731.43 + 12.871 0.998828 1648012 853.33 + 14.439 0.999023 1648334 1024.00 + 15.247 0.999121 1648497 1137.78 + 15.671 0.999219 1648658 1280.00 + 16.119 0.999316 1648818 1462.86 + 16.415 0.999414 1648985 1706.67 + 16.863 0.999512 1649141 2048.00 + 17.775 0.999561 1649221 2275.56 + 18.623 0.999609 1649301 2560.00 + 19.311 0.999658 1649383 2925.71 + 19.375 0.999707 1649465 3413.33 + 19.503 0.999756 1649559 4096.00 + 19.535 0.999780 1649584 4551.11 + 19.951 0.999805 1649629 5120.00 + 19.983 0.999829 1649667 5851.43 + 19.999 0.999854 1649709 6826.67 + 20.047 0.999878 1649744 8192.00 + 20.111 0.999890 1649766 9102.22 + 20.175 0.999902 1649786 10240.00 + 20.239 0.999915 1649806 11702.86 + 20.303 0.999927 1649827 13653.33 + 20.399 0.999939 1649845 16384.00 + 20.447 0.999945 1649857 18204.44 + 20.479 0.999951 1649865 20480.00 + 20.623 0.999957 1649876 23405.71 + 20.671 0.999963 1649885 27306.67 + 20.719 0.999969 1649903 32768.00 + 20.719 0.999973 1649903 36408.89 + 20.751 0.999976 1649905 40960.00 + 20.863 0.999979 1649911 46811.43 + 21.039 0.999982 1649915 54613.33 + 21.263 0.999985 1649920 65536.00 + 21.391 0.999986 1649923 72817.78 + 21.471 0.999988 1649925 81920.00 + 21.599 0.999989 1649928 93622.86 + 21.679 0.999991 1649930 109226.67 + 21.807 0.999992 1649933 131072.00 + 21.855 0.999993 1649934 145635.56 + 21.903 0.999994 1649935 163840.00 + 21.999 0.999995 1649937 187245.71 + 22.047 0.999995 1649938 218453.33 + 22.095 0.999996 1649939 262144.00 + 22.143 0.999997 1649940 291271.11 + 22.143 0.999997 1649940 327680.00 + 22.191 0.999997 1649941 374491.43 + 22.223 0.999998 1649942 436906.67 + 22.223 0.999998 1649942 524288.00 + 22.271 0.999998 1649943 582542.22 + 22.271 0.999998 1649943 655360.00 + 22.271 0.999999 1649943 748982.86 + 22.319 0.999999 1649944 873813.33 + 22.319 0.999999 1649944 1048576.00 + 22.319 0.999999 1649944 1165084.44 + 22.319 0.999999 1649944 1310720.00 + 22.319 0.999999 1649944 1497965.71 + 22.351 0.999999 1649945 1747626.67 + 22.351 1.000000 1649945 inf +#[Mean = 1.517, StdDeviation = 1.138] +#[Max = 22.336, Total count = 1649945] +#[Buckets = 27, SubBuckets = 2048] +---------------------------------------------------------- \ No newline at end of file