size_lru 0.1.5

Size-aware cache maximizing hit density via LHD algorithm / 基于 LHD 算法最大化命中密度的大小感知缓存
{
  "config": {
    "mem_budget": 16777216,
    "read_ratio": 90,
    "write_ratio": 9,
    "delete_ratio": 1,
    "real_miss_ratio": 5,
    "zipf_s": 1.0,
    "ops_per_loop": 30000000,
    "loops": 3
  },
  "miss_latency_ns": 1377,
  "miss_latency_method": "NVMe 4KB random read (16MB tempfile, 100 iterations)",
  "stats": {
    "total_size_bytes": 526813121,
    "item_count": 56046,
    "avg_item_size": 9399,
    "min_item_size": 16,
    "max_item_size": 1041040,
    "mem_budget": 16777216,
    "size_distribution": [
      {
        "label": "16-100B",
        "count": 22140,
        "percent": 39.50326517503479,
        "total_size_bytes": 1264304,
        "size_percent": 0.23999098534221966
      },
      {
        "label": "100B-1KB",
        "count": 19875,
        "percent": 35.46194197623381,
        "total_size_bytes": 11035129,
        "size_percent": 2.0946951699025735
      },
      {
        "label": "1-10KB",
        "count": 11228,
        "percent": 20.033543874674375,
        "total_size_bytes": 63019784,
        "size_percent": 11.962455278330093
      },
      {
        "label": "10-100KB",
        "count": 2243,
        "percent": 4.002069728437355,
        "total_size_bytes": 127104640,
        "size_percent": 24.12708319768672
      },
      {
        "label": "100KB-1MB",
        "count": 560,
        "percent": 0.9991792456196696,
        "total_size_bytes": 324389264,
        "size_percent": 61.57577536873839
      }
    ]
  },
  "results": [
    {
      "lib": "size_lru",
      "hit_rate": 0.6982971698403801,
      "ops_per_second": 8025396.814073513,
      "effective_ops": 1851683.0480176674,
      "memory_kb": 16816.6484375
    },
    {
      "lib": "moka",
      "hit_rate": 0.7055475435771262,
      "ops_per_second": 2773913.291315219,
      "effective_ops": 1305546.8272094668,
      "memory_kb": 16044.890625
    },
    {
      "lib": "mini-moka",
      "hit_rate": 0.6986775702605885,
      "ops_per_second": 2120073.1312385853,
      "effective_ops": 1127900.7561774543,
      "memory_kb": 16023.296875
    },
    {
      "lib": "clru",
      "hit_rate": 0.5518651071368795,
      "ops_per_second": 5970158.461438423,
      "effective_ops": 1274564.8652725243,
      "memory_kb": 16187.3203125
    },
    {
      "lib": "lru",
      "hit_rate": 0.5449411577513703,
      "ops_per_second": 7307344.005982007,
      "effective_ops": 1309818.3332131584,
      "memory_kb": 15551.546875
    },
    {
      "lib": "hashlink",
      "hit_rate": 0.5442964202742658,
      "ops_per_second": 7140004.63620493,
      "effective_ops": 1302830.1523052442,
      "memory_kb": 15361.328125
    },
    {
      "lib": "schnellru",
      "hit_rate": 0.5452306556565198,
      "ops_per_second": 7664687.1131492965,
      "effective_ops": 1321552.386177,
      "memory_kb": 16443.8359375
    }
  ]
}