v2 much slower then v1.6.0 #1255
Labels
area/performance
Performance related issues.
kind/enhancement
Something could be better.
priority/P0
Critical issue that requires immediate attention.
status/accepted
We accept to investigate or work on it.
What version of Go are you using (
go version
)?What version of Badger are you using?
v2.0.2
opts := badger.DefaultOptions(fmt.Sprintf(dir + "/" + name))
opts.SyncWrites = false
opts.ValueLogLoadingMode = options.FileIO
Does this issue reproduce with the latest master?
Yes
What are the hardware specifications of the machine (RAM, OS, Disk)?
Samsung nvme disk SAMSUNG MZPLL3T2HMLS-00003
Linux: 18.04.2 LTS (Bionic Beaver)
What did you do?
As I mentioned in other ticket #1228 I am unable to use Badger v2 version because it's very slow.
What did you expect to see?
I expect Badger v2 version to be similarly fast as v1.6.0
What did you see instead?
One great example is when I run RunValueLogGC function it can take up to 20 minutes. I have rather database (about 10 GB), and with v1.6.0 same operation takes up to 30s.
Have a look at debug/request output:
Processing 100000 entries takes more than 6 minutes! I noticed most of the time is spend here:
https://github.com/dgraph-io/badger/blob/master/value.go#L517
Very often it takes 20-50ms for single lookup. I think this also explains why overall performance of my application is significantly slower when I switch from 1.6.0 to 2
Here is the output of pprof profiling
The text was updated successfully, but these errors were encountered: