Skip to content

Why on linux slower than on win10? #1084

@chengjing1181122598

Description

@chengjing1181122598

What version of Go are you using (go version)?

$ go version
1.13

What version of Badger are you using?

v1.6.0

Does this issue reproduce with the latest master?

yes

What are the hardware specifications of the machine (RAM, OS, Disk)?

win10 : i5-7500, 16G RAM, SSD
linux : Intel(R) Xeon(R) CPU E5-2637 v3 @ 3.50GHz, 64G RAM, SSD

What did you do?

db, err := badger.Open(badger.DefaultOptions("badger"))
if err != nil {
	panic(err)
}
defer db.Close()
for i := 0; i < 10_0000; i++ {
	bs := make([]byte, 8)
	binary.BigEndian.PutUint64(bs, uint64(time.Now().UnixNano())+rand.Uint64())
	err := db.Update(func(txn *badger.Txn) error {
		return txn.Set(bs, bs)
	})
	if err != nil {
		panic(err)
	}
}

What did you expect to see?

win10 is is similar to linux

What did you see instead?

It spends 3s on win10 but 30s on linux. The linux is a machine of production env, can you try on your win10 and linux? Maybe my linux has some problem?

Metadata

Metadata

Assignees

No one assigned

    Labels

    area/performancePerformance related issues.kind/questionSomething requiring a responseplatform/windowsIssues specific to Windowsskip/staleSkip stalebotstatus/needs-attentionThis issue needs more eyes on it, more investigation might be required before accepting/rejecting it

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions