Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Slow scan #858

Open
rnz opened this issue Dec 6, 2024 · 5 comments
Open

Slow scan #858

rnz opened this issue Dec 6, 2024 · 5 comments

Comments

@rnz
Copy link

rnz commented Dec 6, 2024

Describe the bug

root@n02-test-podman:~# time redis-cli -2 --pipe < genkeys.resp
All data transferred. Waiting for the last reply...
Last reply received from server.
errors: 0, replies: 31073611

real	0m26.517s
user	0m3.915s
sys	0m22.356s

root@n02-test-podman:~# redis-cli
127.0.0.1:6379> scan 0 count 10
1) "464"
2)  1) "KEY_0"
    2) "KEY_100"
    3) "KEY_200"
    4) "KEY_300"
    5) "KEY_1"
    6) "KEY_400"
    7) "KEY_101"
    8) "KEY_500"
    9) "KEY_201"
   10) "KEY_600"

127.0.0.1:6379> get KEY_0
"value"

Garnet 1.0.46 (processor_count: 336):

root@n02-test-memtier:~# time memtier_benchmark -s n02-test-podman -p6379 -Predis --hide-histogram --command="SCAN 0 MATCH * COUNT 1000" -c 10 -t 4
Writing results to stdout
[RUN #1] Preparing benchmark client...
[RUN #1] Launching threads now...
[RUN #1 100%, 368 secs]  0 threads:      400000 ops,    1360 (avg:    1085) ops/sec, 17.92MB/sec (avg: 14.29MB/sec), 29.48 (avg: 36.84) msec latency

4         Threads
10        Connections per thread
10000     Requests per client


ALL STATS
==================================================================================================
Type         Ops/sec    Avg. Latency     p50 Latency     p99 Latency   p99.9 Latency       KB/sec 
--------------------------------------------------------------------------------------------------
Scans        1089.79        36.83830        30.71900       102.91100       137.21500     14694.03 
Totals       1089.79        36.83830        30.71900       102.91100       137.21500     14694.03 

real	6m14.180s
user	0m41.107s
sys	0m18.153s

Dragonfly 1.25.3 (thread_count: 336):

Type         Ops/sec    Avg. Latency     p50 Latency     p99 Latency   p99.9 Latency       KB/sec 
--------------------------------------------------------------------------------------------------
Scans        3495.85        11.73090        11.51900        14.97500        19.58300     64403.59 
Totals       3495.85        11.73090        11.51900        14.97500        19.58300     64403.59 

real	2m19.963s
user	0m51.196s
sys	5m47.557s

Keydb 6.3.4 (server-threads 16):

Type         Ops/sec    Avg. Latency     p50 Latency     p99 Latency   p99.9 Latency       KB/sec 
--------------------------------------------------------------------------------------------------
Scans        5339.23         7.49620         7.51900         9.53500        16.12700     97847.62 
Totals       5339.23         7.49620         7.51900         9.53500        16.12700     97847.62 

real	1m16.046s
user	0m36.528s
sys	0m17.320s

Valkey 8.0.1 (--io-threads 64):

Type         Ops/sec    Avg. Latency     p50 Latency     p99 Latency   p99.9 Latency       KB/sec 
--------------------------------------------------------------------------------------------------
Scans        7965.11         4.96724         4.95900         7.83900        12.47900    145643.20 
Totals       7965.11         4.96724         4.95900         7.83900        12.47900    145643.20 

real	0m51.056s
user	0m36.227s
sys	0m16.611s

Steps to reproduce the bug

  1. run garnet server
  2. generate data printf "set KEY_%d value\n" $(seq 0 31073609) > genkeys.txt
  3. import redis-cli < genkeys.txt (this is slow, after first generation you can dump to resp with ghcr.io/yannh/redis-dump-go for fast import next time)
  4. run memtier with args time memtier_benchmark -s <host> -p<port> -Predis --hide-histogram --command="SCAN 0 MATCH * COUNT 1000" -c 10 -t 4

Expected behavior

Fastest scan

Screenshots

No response

Release version

v1.0.46

IDE

No response

OS version

debian 12

Additional context

# cat /opt/garnet/etc/garnet.conf
{
	"Port" : 6379,
	"Address" : null, 
	"MemorySize" : "100g",
	"PageSize" : "512m",
	"SegmentSize" : "1g",
	"IndexSize" : "128m",
	"IndexMaxSize": "",
	"MutablePercent" : 90,
	"ObjectStoreHeapMemorySize" : "",
	"ObjectStoreLogMemorySize" : "32m",
	"ObjectStorePageSize" : "2m",
	"ObjectStoreSegmentSize" : "32m",
	"ObjectStoreIndexSize" : "128m",
	"ObjectStoreIndexMaxSize": "",
	"ObjectStoreMutablePercent" : 90,
	"EnableStorageTier" : true,
	"CopyReadsToTail" : false,
	"ObjectStoreCopyReadsToTail" : false,
	"LogDir" : "/data",
	"CheckpointDir" : null,
	"Recover" : true,
	"DisablePubSub" : false,
	"EnableIncrementalSnapshots" : false,
	"PubSubPageSize" : "4k",
	"DisableObjects" : false,
	"EnableCluster" : false,
	"CleanClusterConfig" : false,
	"AuthenticationMode" : "NoAuth",
	"Password" : null,
	"ClusterUsername" : null,
	"ClusterPassword" : null,
	"AclFile" : null,
	"AadAuthority" : "https://login.host.com",
	"AadAudiences" : null,
	"AadIssuers" : null,
	"AuthorizedAadApplicationIds" : null,
	"AadValidateUsername": false,
	"EnableAOF" : false,
	"AofMemorySize" : "64m",
	"AofPageSize" : "4m",
	"AofReplicationRefreshFrequencyMs": 10,
	"SubscriberRefreshFrequencyMs": 0,
	"CommitFrequencyMs" : 0,
	"WaitForCommit" : false,
	"AofSizeLimit" : "",
	"CompactionFrequencySecs" : 300,
	"CompactionType" : "Lookup",
	"CompactionForceDelete": false,
	"CompactionMaxSegments" : 32,
	"ObjectStoreCompactionMaxSegments" : 32,
	"EnableLua" : false,
	"LuaTransactionMode" : false,
	"GossipSamplePercent" : 100,
	"GossipDelay" : 5,
	"ClusterTimeout" : 60,
	"ClusterTlsClientTargetHost" : "GarnetTest",
	"EnableTLS" : false,
	"CertFileName" : null,
	"CertPassword" : null,
	"CertSubjectName" : null,
	"CertificateRefreshFrequency" : 0,
	"ClientCertificateRequired" : true,
	"ServerCertificateRequired" : true,
	"CertificateRevocationCheckMode" : "NoCheck",
	"IssuerCertificatePath" : "",
	"LatencyMonitor" : true,
	"MetricsSamplingFrequency" : 1,
	"QuietMode" : false,
	"LogLevel" : "Trace",
	"LoggingFrequency" : "10",
	"DisableConsoleLogger" : false,
	"FileLogger" : null,
	"ThreadPoolMinThreads" : 0,
	"ThreadPoolMaxThreads" : 0,
	"UseAzureStorage" : false,
	"AzureStorageConnectionString" : null,
	"CheckpointThrottleFlushDelayMs" : 0,
	"EnableFastCommit" : true,
	"FastCommitThrottleFreq" : 1000,
	"NetworkSendThrottleMax" : 100,
	"EnableScatterGatherGet" : false,
	"ReplicaSyncDelayMs" : 5,
	"MainMemoryReplication" : false,
	"OnDemandCheckpoint" : false,
	"UseAofNullDevice" : false,
	"UseNativeDeviceLinux" : true,
	"RevivBinRecordSizes" : null,
	"RevivBinRecordCounts" : null,
	"RevivifiableFraction" : 1.0,
	"EnableRevivification" : false,
	"RevivNumberOfBinsToSearch" : 0,
	"RevivBinBestFitScanLimit" : 0,
	"RevivInChainOnly" : false,
	"RevivObjBinRecordCount" : 512,
	"ObjectScanCountLimit" : 100000,
	"ExtensionBinPaths": null,
	"ExtensionAllowUnsignedAssemblies": false,
	"IndexResizeFrequencySecs": 60,
	"IndexResizeThreshold": 50,
	"LoadModuleCS": null
}
@badrishc
Copy link
Contributor

badrishc commented Dec 7, 2024

Can you expand on step 2, what is the exact data you are seeing this on? Perhaps link a genkeys.resp file here. Also, share the exact garnet configuration json.

@rnz
Copy link
Author

rnz commented Dec 9, 2024

@badrishc
2. generate data printf "set KEY_%d value\n" $(seq 0 31073609) > genkeys.txt
3. import time redis-cli < genkeys.txt (this is slow, after first generation you can dump to resp with ghcr.io/yannh/redis-dump-go for fast import next time)

Configuration added to issue description.

@rnz
Copy link
Author

rnz commented Dec 9, 2024

@badrishc
also garnet crash on
memtier_benchmark -s n02-test-podman -p6379 -Predis --hide-histogram --command="SCAN 0 MATCH * COUNT 100000" -c 10 -t 4

07::15::22 crit: Session[0] [10.100.227.246:48886] [02D068F3] ProcessMessages threw a GarnetException: Garnet.common.GarnetException: Failed to write to response buffer    at Garnet.common.GarnetException.Throw(String message, LogLevel logLevel) in /src/libs/common/GarnetException.cs:line 57    at Garnet.server.RespServerSession.NetworkSCAN[TGarnetApi](TGarnetApi& storageApi) in /src/libs/server/Resp/ArrayCommands.cs:line 382    at Garnet.server.RespServerSession.ProcessOtherCommands[TGarnetApi](RespCommand command, TGarnetApi& storageApi) in /src/libs/server/Resp/RespServerSession.cs:line 700    at Garnet.server.RespServerSession.ProcessArrayCommands[TGarnetApi](RespCommand cmd, TGarnetApi& storageApi) in /src/libs/server/Resp/RespServerSession.cs:line 570    at Garnet.server.RespServerSession.ProcessMessages() in /src/libs/server/Resp/RespServerSession.cs:line 437    at Garnet.server.RespServerSession.TryConsumeMessages(Byte* reqBuffer, Int32 bytesReceived) in /src/libs/server/Resp/RespServerSession.cs:line 312
07::15::22 trce: GarnetServer[0] Accept socket was disposed at RecvEventArg_Completed
07::15::22 dbug: Session[0] [10.100.227.246:48886] [02D068F3] Disposing RespServerSession Id=3586
07::15::22 crit: Session[0] [10.100.227.246:48794] [02070F9A] ProcessMessages threw a GarnetException: Garnet.common.GarnetException: Failed to write to response buffer    at Garnet.common.GarnetException.Throw(String message, LogLevel logLevel) in /src/libs/common/GarnetException.cs:line 57    at Garnet.server.RespServerSession.NetworkSCAN[TGarnetApi](TGarnetApi& storageApi) in /src/libs/server/Resp/ArrayCommands.cs:line 382    at Garnet.server.RespServerSession.ProcessOtherCommands[TGarnetApi](RespCommand command, TGarnetApi& storageApi) in /src/libs/server/Resp/RespServerSession.cs:line 700    at Garnet.server.RespServerSession.ProcessArrayCommands[TGarnetApi](RespCommand cmd, TGarnetApi& storageApi) in /src/libs/server/Resp/RespServerSession.cs:line 570    at Garnet.server.RespServerSession.ProcessMessages() in /src/libs/server/Resp/RespServerSession.cs:line 437    at Garnet.server.RespServerSession.TryConsumeMessages(Byte* reqBuffer, Int32 bytesReceived) in /src/libs/server/Resp/RespServerSession.cs:line 312
07::15::22 trce: GarnetServer[0] Accept socket was disposed at RecvEventArg_Completed
07::15::22 dbug: Session[0] [10.100.227.246:48794] [02070F9A] Disposing RespServerSession Id=3585
Fatal error. System.AccessViolationException: Attempted to read or write protected memory. This is often an indication that other memory is corrupt.
   at Garnet.server.RespServerSession.NetworkSCAN[[Garnet.server.GarnetApi`2[[Tsavorite.core.BasicContext`8[[Tsavorite.core.SpanByte, Tsavorite.core, Version=1.0.46.0, Culture=neutral, PublicKeyToken=b93f59e18c9c8d6b],[Tsavorite.core.SpanByte, Tsavorite.core, Version=1.0.46.0, Culture=neutral, PublicKeyToken=b93f59e18c9c8d6b],[Garnet.server.RawStringInput, Garnet.server, Version=1.0.46.0, Culture=neutral, PublicKeyToken=b93f59e18c9c8d6b],[Tsavorite.core.SpanByteAndMemory, Tsavorite.core, Version=1.0.46.0, Culture=neutral, PublicKeyToken=b93f59e18c9c8d6b],[System.Int64, System.Private.CoreLib, Version=8.0.0.0, Culture=neutral, PublicKeyToken=7cec85d7bea7798e],[Garnet.server.MainSessionFunctions, Garnet.server, Version=1.0.46.0, Culture=neutral, PublicKeyToken=b93f59e18c9c8d6b],[Tsavorite.core.StoreFunctions`4[[Tsavorite.core.SpanByte, Tsavorite.core, Version=1.0.46.0, Culture=neutral, PublicKeyToken=b93f59e18c9c8d6b],[Tsavorite.core.SpanByte, Tsavorite.core, Version=1.0.46.0, Culture=neutral, PublicKeyToken=b93f59e18c9c8d6b],[Tsavorite.core.SpanByteComparer, Tsavorite.core, Version=1.0.46.0, Culture=neutral, PublicKeyToken=b93f59e18c9c8d6b],[Tsavorite.core.SpanByteRecordDisposer, Tsavorite.core, Version=1.0.46.0, Culture=neutral, PublicKeyToken=b93f59e18c9c8d6b]], Tsavorite.core, Version=1.0.46.0, Culture=neutral, PublicKeyToken=b93f59e18c9c8d6b],[Tsavorite.core.SpanByteAllocator`1[[Tsavorite.core.StoreFunctions`4[[Tsavorite.core.SpanByte, Tsavorite.core, Version=1.0.46.0, Culture=neutral, PublicKeyToken=b93f59e18c9c8d6b],[Tsavorite.core.SpanByte, Tsavorite.core, Version=1.0.46.0, Culture=neutral, PublicKeyToken=b93f59e18c9c8d6b],[Tsavorite.core.SpanByteComparer, Tsavorite.core, Version=1.0.46.0, Culture=neutral, PublicKeyToken=b93f59e18c9c8d6b],[Tsavorite.core.SpanByteRecordDisposer, Tsavorite.core, Version=1.0.46.0, Culture=neutral, PublicKeyToken=b93f59e18c9c8d6b]], Tsavorite.core, Version=1.0.46.0, Culture=neutral, PublicKeyToken=b93f59e18c9c8d6b]], Tsavorite.core, Version=1.0.46.0, Culture=neutral, PublicKeyToken=b93f59e18c9c8d6b]], Tsavorite.core, Version=1.0.46.0, Culture=neutral, PublicKeyToken=b93f59e18c9c8d6b],[Tsavorite.core.BasicContext`8[[System.__Canon, System.Private.CoreLib, Version=8.0.0.0, Culture=neutral, PublicKeyToken=7cec85d7bea7798e],[System.__Canon, System.Private.CoreLib, Version=8.0.0.0, Culture=neutral, PublicKeyToken=7cec85d7bea7798e],[Garnet.server.ObjectInput, Garnet.server, Version=1.0.46.0, Culture=neutral, PublicKeyToken=b93f59e18c9c8d6b],[Garnet.server.GarnetObjectStoreOutput, Garnet.server, Version=1.0.46.0, Culture=neutral, PublicKeyToken=b93f59e18c9c8d6b],[System.Int64, System.Private.CoreLib, Version=8.0.0.0, Culture=neutral, PublicKeyToken=7cec85d7bea7798e],[Garnet.server.ObjectSessionFunctions, Garnet.server, Version=1.0.46.0, Culture=neutral, PublicKeyToken=b93f59e18c9c8d6b],[Tsavorite.core.StoreFunctions`4[[System.__Canon, System.Private.CoreLib, Version=8.0.0.0, Culture=neutral, PublicKeyToken=7cec85d7bea7798e],[System.__Canon, System.Private.CoreLib, Version=8.0.0.0, Culture=neutral, PublicKeyToken=7cec85d7bea7798e],[System.__Canon, System.Private.CoreLib, Version=8.0.0.0, Culture=neutral, PublicKeyToken=7cec85d7bea7798e],[Tsavorite.core.DefaultRecordDisposer`2[[System.__Canon, System.Private.CoreLib, Version=8.0.0.0, Culture=neutral, PublicKeyToken=7cec85d7bea7798e],[System.__Canon, System.Private.CoreLib, Version=8.0.0.0, Culture=neutral, PublicKeyToken=7cec85d7bea7798e]], Tsavorite.core, Version=1.0.46.0, Culture=neutral, PublicKeyToken=b93f59e18c9c8d6b]], Tsavorite.core, Version=1.0.46.0, Culture=neutral, PublicKeyToken=b93f59e18c9c8d6b],[Tsavorite.core.GenericAllocator`3[[System.__Canon, System.Private.CoreLib, Version=8.0.0.0, Culture=neutral, PublicKeyToken=7cec85d7bea7798e],[System.__Canon, System.Private.CoreLib, Version=8.0.0.0, Culture=neutral, PublicKeyToken=7cec85d7bea7798e],[Tsavorite.core.StoreFunctions`4[[System.__Canon, System.Private.CoreLib, Version=8.0.0.0, Culture=neutral, PublicKeyToken=7cec85d7bea7798e],[System.__Canon, System.Private.CoreLib, Version=8.0.0.0, Culture=neutral, PublicKeyToken=7cec85d7bea7798e],[System.__Canon, System.Private.CoreLib, Version=8.0.0.0, Culture=neutral, PublicKeyToken=7cec85d7bea7798e],[Tsavorite.core.DefaultRecordDisposer`2[[System.__Canon, System.Private.CoreLib, Version=8.0.0.0, Culture=neutral, PublicKeyToken=7cec85d7bea7798e],[System.__Canon, System.Private.CoreLib, Version=8.0.0.0, Culture=neutral, PublicKeyToken=7cec85d7bea7798e]], Tsavorite.core, Version=1.0.46.0, Culture=neutral, PublicKeyToken=b93f59e18c9c8d6b]], Tsavorite.core, Version=1.0.46.0, Culture=neutral, PublicKeyToken=b93f59e18c9c8d6b]], Tsavorite.core, Version=1.0.46.0, Culture=neutral, PublicKeyToken=b93f59e18c9c8d6b]], Tsavorite.core, Version=1.0.46.0, Culture=neutral, PublicKeyToken=b93f59e18c9c8d6b]], Garnet.server, Version=1.0.46.0, Culture=neutral, PublicKeyToken=b93f59e18c9c8d6b]](Garnet.server.GarnetApi`2<Tsavorite.core.BasicContext`8<Tsavorite.core.SpanByte,Tsavorite.core.SpanByte,Garnet.server.RawStringInput,Tsavorite.core.SpanByteAndMemory,Int64,Garnet.server.MainSessionFunctions,Tsavorite.core.StoreFunctions`4<Tsavorite.core.SpanByte,Tsavorite.core.SpanByte,Tsavorite.core.SpanByteComparer,Tsavorite.core.SpanByteRecordDisposer>,Tsavorite.core.SpanByteAllocator`1<Tsavorite.core.StoreFunctions`4<Tsavorite.core.SpanByte,Tsavorite.core.SpanByte,Tsavorite.core.SpanByteComparer,Tsavorite.core.SpanByteRecordDisposer>>>,Tsavorite.core.BasicContext`8<System.__Canon,System.__Canon,Garnet.server.ObjectInput,Garnet.server.GarnetObjectStoreOutput,Int64,Garnet.server.ObjectSessionFunctions,Tsavorite.core.StoreFunctions`4<System.__Canon,System.__Canon,System.__Canon,Tsavorite.core.DefaultRecordDisposer`2<System.__Canon,System.__Canon>>,Tsavorite.core.GenericAllocator`3<System.__Canon,System.__Canon,Tsavorite.core.StoreFunctions`4<System.__Canon,System.__Canon,System.__Canon,Tsavorite.core.DefaultRecordDisposer`2<System.__Canon,System.__Canon>>>>> ByRef)
   at Garnet.server.RespServerSession.ProcessOtherCommands[[Garnet.server.GarnetApi`2[[Tsavorite.core.BasicContext`8[[Tsavorite.core.SpanByte, Tsavorite.core, Version=1.0.46.0, Culture=neutral, PublicKeyToken=b93f59e18c9c8d6b],[Tsavorite.core.SpanByte, Tsavorite.core, Version=1.0.46.0, Culture=neutral, PublicKeyToken=b93f59e18c9c8d6b],[Garnet.server.RawStringInput, Garnet.server, Version=1.0.46.0, Culture=neutral, PublicKeyToken=b93f59e18c9c8d6b],[Tsavorite.core.SpanByteAndMemory, Tsavorite.core, Version=1.0.46.0, Culture=neutral, PublicKeyToken=b93f59e18c9c8d6b],[System.Int64, System.Private.CoreLib, Version=8.0.0.0, Culture=neutral, PublicKeyToken=7cec85d7bea7798e],[Garnet.server.MainSessionFunctions, Garnet.server, Version=1.0.46.0, Culture=neutral, PublicKeyToken=b93f59e18c9c8d6b],[Tsavorite.core.StoreFunctions`4[[Tsavorite.core.SpanByte, Tsavorite.core, Version=1.0.46.0, Culture=neutral, PublicKeyToken=b93f59e18c9c8d6b],[Tsavorite.core.SpanByte, Tsavorite.core, Version=1.0.46.0, Culture=neutral, PublicKeyToken=b93f59e18c9c8d6b],[Tsavorite.core.SpanByteComparer, Tsavorite.core, Version=1.0.46.0, Culture=neutral, PublicKeyToken=b93f59e18c9c8d6b],[Tsavorite.core.SpanByteRecordDisposer, Tsavorite.core, Version=1.0.46.0, Culture=neutral, PublicKeyToken=b93f59e18c9c8d6b]], Tsavorite.core, Version=1.0.46.0, Culture=neutral, PublicKeyToken=b93f59e18c9c8d6b],[Tsavorite.core.SpanByteAllocator`1[[Tsavorite.core.StoreFunctions`4[[Tsavorite.core.SpanByte, Tsavorite.core, Version=1.0.46.0, Culture=neutral, PublicKeyToken=b93f59e18c9c8d6b],[Tsavorite.core.SpanByte, Tsavorite.core, Version=1.0.46.0, Culture=neutral, PublicKeyToken=b93f59e18c9c8d6b],[Tsavorite.core.SpanByteComparer, Tsavorite.core, Version=1.0.46.0, Culture=neutral, PublicKeyToken=b93f59e18c9c8d6b],[Tsavorite.core.SpanByteRecordDisposer, Tsavorite.core, Version=1.0.46.0, Culture=neutral, PublicKeyToken=b93f59e18c9c8d6b]], Tsavorite.core, Version=1.0.46.0, Culture=neutral, PublicKeyToken=b93f59e18c9c8d6b]], Tsavorite.core, Version=1.0.46.0, Culture=neutral, PublicKeyToken=b93f59e18c9c8d6b]], Tsavorite.core, Version=1.0.46.0, Culture=neutral, PublicKeyToken=b93f59e18c9c8d6b],[Tsavorite.core.BasicContext`8[[System.__Canon, System.Private.CoreLib, Version=8.0.0.0, Culture=neutral, PublicKeyToken=7cec85d7bea7798e],[System.__Canon, System.Private.CoreLib, Version=8.0.0.0, Culture=neutral, PublicKeyToken=7cec85d7bea7798e],[Garnet.server.ObjectInput, Garnet.server, Version=1.0.46.0, Culture=neutral, PublicKeyToken=b93f59e18c9c8d6b],[Garnet.server.GarnetObjectStoreOutput, Garnet.server, Version=1.0.46.0, Culture=neutral, PublicKeyToken=b93f59e18c9c8d6b],[System.Int64, System.Private.CoreLib, Version=8.0.0.0, Culture=neutral, PublicKeyToken=7cec85d7bea7798e],[Garnet.server.ObjectSessionFunctions, Garnet.server, Version=1.0.46.0, Culture=neutral, PublicKeyToken=b93f59e18c9c8d6b],[Tsavorite.core.StoreFunctions`4[[System.__Canon, System.Private.CoreLib, Version=8.0.0.0, Culture=neutral, PublicKeyToken=7cec85d7bea7798e],[System.__Canon, System.Private.CoreLib, Version=8.0.0.0, Culture=neutral, PublicKeyToken=7cec85d7bea7798e],[System.__Canon, System.Private.CoreLib, Version=8.0.0.0, Culture=neutral, PublicKeyToken=7cec85d7bea7798e],[Tsavorite.core.DefaultRecordDisposer`2[[System.__Canon, System.Private.CoreLib, Version=8.0.0.0, Culture=neutral, PublicKeyToken=7cec85d7bea7798e],[System.__Canon, System.Private.CoreLib, Version=8.0.0.0, Culture=neutral, PublicKeyToken=7cec85d7bea7798e]], Tsavorite.core, Version=1.0.46.0, Culture=neutral, PublicKeyToken=b93f59e18c9c8d6b]], Tsavorite.core, Version=1.0.46.0, Culture=neutral, PublicKeyToken=b93f59e18c9c8d6b],[Tsavorite.core.GenericAllocator`3[[System.__Canon, System.Private.CoreLib, Version=8.0.0.0, Culture=neutral, PublicKeyToken=7cec85d7bea7798e],[System.__Canon, System.Private.CoreLib, Version=8.0.0.0, Culture=neutral, PublicKeyToken=7cec85d7bea7798e],[Tsavorite.core.StoreFunctions`4[[System.__Canon, System.Private.CoreLib, Version=8.0.0.0, Culture=neutral, PublicKeyToken=7cec85d7bea7798e],[System.__Canon, System.Private.CoreLib, Version=8.0.0.0, Culture=neutral, PublicKeyToken=7cec85d7bea7798e],[System.__Canon, System.Private.CoreLib, Version=8.0.0.0, Culture=neutral, PublicKeyToken=7cec85d7bea7798e],[Tsavorite.core.DefaultRecordDisposer`2[[System.__Canon, System.Private.CoreLib, Version=8.0.0.0, Culture=neutral, PublicKeyToken=7cec85d7bea7798e],[System.__Canon, System.Private.CoreLib, Version=8.0.0.0, Culture=neutral, PublicKeyToken=7cec85d7bea7798e]], Tsavorite.core, Version=1.0.46.0, Culture=neutral, PublicKeyToken=b93f59e18c9c8d6b]], Tsavorite.core, Version=1.0.46.0, Culture=neutral, PublicKeyToken=b93f59e18c9c8d6b]], Tsavorite.core, Version=1.0.46.0, Culture=neutral, PublicKeyToken=b93f59e18c9c8d6b]], Tsavorite.core, Version=1.0.46.0, Culture=neutral, PublicKeyToken=b93f59e18c9c8d6b]], Garnet.server, Version=1.0.46.0, Culture=neutral, PublicKeyToken=b93f59e18c9c8d6b]](Garnet.server.RespCommand, Garnet.server.GarnetApi`2<Tsavorite.core.BasicContext`8<Tsavorite.core.SpanByte,Tsavorite.core.SpanByte,Garnet.server.RawStringInput,Tsavorite.core.SpanByteAndMemory,Int64,Garnet.server.MainSessionFunctions,Tsavorite.core.StoreFunctions`4<Tsavorite.core.SpanByte,Tsavorite.core.SpanByte,Tsavorite.core.SpanByteComparer,Tsavorite.core.SpanByteRecordDisposer>,Tsavorite.core.SpanByteAllocator`1<Tsavorite.core.StoreFunctions`4<Tsavorite.core.SpanByte,Tsavorite.core.SpanByte,Tsavorite.core.SpanByteComparer,Tsavorite.core.SpanByteRecordDisposer>>>,Tsavorite.core.BasicContext`8<System.__Canon,System.__Canon,Garnet.server.ObjectInput,Garnet.server.GarnetObjectStoreOutput,Int64,Garnet.server.ObjectSessionFunctions,Tsavorite.core.StoreFunctions`4<System.__Canon,System.__Canon,System.__Canon,Tsavorite.core.DefaultRecordDisposer`2<System.__Canon,System.__Canon>>,Tsavorite.core.GenericAllocator`3<System.__Canon,System.__Canon,Tsavorite.core.StoreFunctions`4<System.__Canon,System.__Canon,System.__Canon,Tsavorite.core.DefaultRecordDisposer`2<System.__Canon,System.__Canon>>>>> ByRef)
   at Garnet.server.RespServerSession.ProcessArrayCommands[[Garnet.server.GarnetApi`2[[Tsavorite.core.BasicContext`8[[Tsavorite.core.SpanByte, Tsavorite.core, Version=1.0.46.0, Culture=neutral, PublicKeyToken=b93f59e18c9c8d6b],[Tsavorite.core.SpanByte, Tsavorite.core, Version=1.0.46.0, Culture=neutral, PublicKeyToken=b93f59e18c9c8d6b],[Garnet.server.RawStringInput, Garnet.server, Version=1.0.46.0, Culture=neutral, PublicKeyToken=b93f59e18c9c8d6b],[Tsavorite.core.SpanByteAndMemory, Tsavorite.core, Version=1.0.46.0, Culture=neutral, PublicKeyToken=b93f59e18c9c8d6b],[System.Int64, System.Private.CoreLib, Version=8.0.0.0, Culture=neutral, PublicKeyToken=7cec85d7bea7798e],[Garnet.server.MainSessionFunctions, Garnet.server, Version=1.0.46.0, Culture=neutral, PublicKeyToken=b93f59e18c9c8d6b],[Tsavorite.core.StoreFunctions`4[[Tsavorite.core.SpanByte, Tsavorite.core, Version=1.0.46.0, Culture=neutral, PublicKeyToken=b93f59e18c9c8d6b],[Tsavorite.core.SpanByte, Tsavorite.core, Version=1.0.46.0, Culture=neutral, PublicKeyToken=b93f59e18c9c8d6b],[Tsavorite.core.SpanByteComparer, Tsavorite.core, Version=1.0.46.0, Culture=neutral, PublicKeyToken=b93f59e18c9c8d6b],[Tsavorite.core.SpanByteRecordDisposer, Tsavorite.core, Version=1.0.46.0, Culture=neutral, PublicKeyToken=b93f59e18c9c8d6b]], Tsavorite.core, Version=1.0.46.0, Culture=neutral, PublicKeyToken=b93f59e18c9c8d6b],[Tsavorite.core.SpanByteAllocator`1[[Tsavorite.core.StoreFunctions`4[[Tsavorite.core.SpanByte, Tsavorite.core, Version=1.0.46.0, Culture=neutral, PublicKeyToken=b93f59e18c9c8d6b],[Tsavorite.core.SpanByte, Tsavorite.core, Version=1.0.46.0, Culture=neutral, PublicKeyToken=b93f59e18c9c8d6b],[Tsavorite.core.SpanByteComparer, Tsavorite.core, Version=1.0.46.0, Culture=neutral, PublicKeyToken=b93f59e18c9c8d6b],[Tsavorite.core.SpanByteRecordDisposer, Tsavorite.core, Version=1.0.46.0, Culture=neutral, PublicKeyToken=b93f59e18c9c8d6b]], Tsavorite.core, Version=1.0.46.0, Culture=neutral, PublicKeyToken=b93f59e18c9c8d6b]], Tsavorite.core, Version=1.0.46.0, Culture=neutral, PublicKeyToken=b93f59e18c9c8d6b]], Tsavorite.core, Version=1.0.46.0, Culture=neutral, PublicKeyToken=b93f59e18c9c8d6b],[Tsavorite.core.BasicContext`8[[System.__Canon, System.Private.CoreLib, Version=8.0.0.0, Culture=neutral, PublicKeyToken=7cec85d7bea7798e],[System.__Canon, System.Private.CoreLib, Version=8.0.0.0, Culture=neutral, PublicKeyToken=7cec85d7bea7798e],[Garnet.server.ObjectInput, Garnet.server, Version=1.0.46.0, Culture=neutral, PublicKeyToken=b93f59e18c9c8d6b],[Garnet.server.GarnetObjectStoreOutput, Garnet.server, Version=1.0.46.0, Culture=neutral, PublicKeyToken=b93f59e18c9c8d6b],[System.Int64, System.Private.CoreLib, Version=8.0.0.0, Culture=neutral, PublicKeyToken=7cec85d7bea7798e],[Garnet.server.ObjectSessionFunctions, Garnet.server, Version=1.0.46.0, Culture=neutral, PublicKeyToken=b93f59e18c9c8d6b],[Tsavorite.core.StoreFunctions`4[[System.__Canon, System.Private.CoreLib, Version=8.0.0.0, Culture=neutral, PublicKeyToken=7cec85d7bea7798e],[System.__Canon, System.Private.CoreLib, Version=8.0.0.0, Culture=neutral, PublicKeyToken=7cec85d7bea7798e],[System.__Canon, System.Private.CoreLib, Version=8.0.0.0, Culture=neutral, PublicKeyToken=7cec85d7bea7798e],[Tsavorite.core.DefaultRecordDisposer`2[[System.__Canon, System.Private.CoreLib, Version=8.0.0.0, Culture=neutral, PublicKeyToken=7cec85d7bea7798e],[System.__Canon, System.Private.CoreLib, Version=8.0.0.0, Culture=neutral, PublicKeyToken=7cec85d7bea7798e]], Tsavorite.core, Version=1.0.46.0, Culture=neutral, PublicKeyToken=b93f59e18c9c8d6b]], Tsavorite.core, Version=1.0.46.0, Culture=neutral, PublicKeyToken=b93f59e18c9c8d6b],[Tsavorite.core.GenericAllocator`3[[System.__Canon, System.Private.CoreLib, Version=8.0.0.0, Culture=neutral, PublicKeyToken=7cec85d7bea7798e],[System.__Canon, System.Private.CoreLib, Version=8.0.0.0, Culture=neutral, PublicKeyToken=7cec85d7bea7798e],[Tsavorite.core.StoreFunctions`4[[System.__Canon, System.Private.CoreLib, Version=8.0.0.0, Culture=neutral, PublicKeyToken=7cec85d7bea7798e],[System.__Canon, System.Private.CoreLib, Version=8.0.0.0, Culture=neutral, PublicKeyToken=7cec85d7bea7798e],[System.__Canon, System.Private.CoreLib, Version=8.0.0.0, Culture=neutral, PublicKeyToken=7cec85d7bea7798e],[Tsavorite.core.DefaultRecordDisposer`2[[System.__Canon, System.Private.CoreLib, Version=8.0.0.0, Culture=neutral, PublicKeyToken=7cec85d7bea7798e],[System.__Canon, System.Private.CoreLib, Version=8.0.0.0, Culture=neutral, PublicKeyToken=7cec85d7bea7798e]], Tsavorite.core, Version=1.0.46.0, Culture=neutral, PublicKeyToken=b93f59e18c9c8d6b]], Tsavorite.core, Version=1.0.46.0, Culture=neutral, PublicKeyToken=b93f59e18c9c8d6b]], Tsavorite.core, Version=1.0.46.0, Culture=neutral, PublicKeyToken=b93f59e18c9c8d6b]], Tsavorite.core, Version=1.0.46.0, Culture=neutral, PublicKeyToken=b93f59e18c9c8d6b]], Garnet.server, Version=1.0.46.0, Culture=neutral, PublicKeyToken=b93f59e18c9c8d6b]](Garnet.server.RespCommand, Garnet.server.GarnetApi`2<Tsavorite.core.BasicContext`8<Tsavorite.core.SpanByte,Tsavorite.core.SpanByte,Garnet.server.RawStringInput,Tsavorite.core.SpanByteAndMemory,Int64,Garnet.server.MainSessionFunctions,Tsavorite.core.StoreFunctions`4<Tsavorite.core.SpanByte,Tsavorite.core.SpanByte,Tsavorite.core.SpanByteComparer,Tsavorite.core.SpanByteRecordDisposer>,Tsavorite.core.SpanByteAllocator`1<Tsavorite.core.StoreFunctions`4<Tsavorite.core.SpanByte,Tsavorite.core.SpanByte,Tsavorite.core.SpanByteComparer,Tsavorite.core.SpanByteRecordDisposer>>>,Tsavorite.core.BasicContext`8<System.__Canon,System.__Canon,Garnet.server.ObjectInput,Garnet.server.GarnetObjectStoreOutput,Int64,Garnet.server.ObjectSessionFunctions,Tsavorite.core.StoreFunctions`4<System.__Canon,System.__Canon,System.__Canon,Tsavorite.core.DefaultRecordDisposer`2<System.__Canon,System.__Canon>>,Tsavorite.core.GenericAllocator`3<System.__Canon,System.__Canon,Tsavorite.core.StoreFunctions`4<System.__Canon,System.__Canon,System.__Canon,Tsavorite.core.DefaultRecordDisposer`2<System.__Canon,System.__Canon>>>>> ByRef)
   at Garnet.server.RespServerSession.ProcessMessages()
   at Garnet.server.RespServerSession.TryConsumeMessages(Byte*, Int32)
   at Garnet.networking.NetworkHandler`2[[System.__Canon, System.Private.CoreLib, Version=8.0.0.0, Culture=neutral, PublicKeyToken=7cec85d7bea7798e],[System.__Canon, System.Private.CoreLib, Version=8.0.0.0, Culture=neutral, PublicKeyToken=7cec85d7bea7798e]].OnNetworkReceive(Int32)
   at Garnet.common.TcpNetworkHandlerBase`2[[System.__Canon, System.Private.CoreLib, Version=8.0.0.0, Culture=neutral, PublicKeyToken=7cec85d7bea7798e],[System.__Canon, System.Private.CoreLib, Version=8.0.0.0, Culture=neutral, PublicKeyToken=7cec85d7bea7798e]].RecvEventArg_Completed(System.Object, System.Net.Sockets.SocketAsyncEventArgs)
   at System.Threading.ExecutionContext.RunInternal(System.Threading.ExecutionContext, System.Threading.ContextCallback, System.Object)
   at System.Net.Sockets.SocketAsyncEventArgs.TransferCompletionCallbackCore(Int32, System.Memory`1<Byte>, System.Net.Sockets.SocketFlags, System.Net.Sockets.SocketError)
   at System.Net.Sockets.SocketAsyncEngine.System.Threading.IThreadPoolWorkItem.Execute()
   at System.Threading.ThreadPoolWorkQueue.Dispatch()
   at System.Threading.PortableThreadPool+WorkerThread.WorkerThreadStart()

@badrishc
Copy link
Contributor

badrishc commented Dec 9, 2024

  1. import time redis-cli -2 --pipe < genkeys.txt

This does not seem to work, as the genkeys.txt is not RESP formatted.

@rnz
Copy link
Author

rnz commented Dec 10, 2024

@badrishc yep, this work without --pipe

Script for generate RESP formated file:

#!/usr/bin/env bash
count=$1
for ((i=0; i<=$count-1; i++)); do
   CMD=$(printf "set KEY_%d value-%d\n" $i $i)
   XS=($CMD)
   printf "*${#XS[@]}\r\n"
   for X in $CMD; do printf "\$${#X}\r\n$X\r\n"; done
done

Use: script 30000 > genkeys.resp

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants