Giter VIP home page Giter VIP logo

Comments (7)

robbertvdg avatar robbertvdg commented on August 22, 2024

I was able to lower memory consumption by setting a lower value for the GOGC env variable. My knowledge of the Go garbage collection is not sufficient to know whether this is still an issue or intended behaviour.

from madmin-go.

klauspost avatar klauspost commented on August 22, 2024

@robbertvdg Alloc numbers is typically the total amount allocated, look at Heap In Use.

This looks like intended behavior, but you didn't share the PrintMemUsage(), I cannot know.

from madmin-go.

klauspost avatar klauspost commented on August 22, 2024

Looking at the function, there is nothing there that can really be an issue.

from madmin-go.

robbertvdg avatar robbertvdg commented on August 22, 2024

The function:

func PrintMemUsage() {
	var m run.MemStats
	run.ReadMemStats(&m)
	// For info on each, see: https://golang.org/pkg/runtime/#MemStats
	fmt.Printf("Alloc = %v MiB", bToMb(m.Alloc))
	fmt.Printf("\tTotalAlloc = %v MiB", bToMb(m.TotalAlloc))
	fmt.Printf("\tSys = %v MiB", bToMb(m.Sys))
	fmt.Printf("\tNumGC = %v\n", m.NumGC)
}

from madmin-go.

robbertvdg avatar robbertvdg commented on August 22, 2024

Including m.HeapInUse:

heap = 72 MiB Alloc = 69 MiB TotalAlloc = 159 MiB Sys = 140 MiB NumGC = 13
heap = 107 MiB Alloc = 103 MiB TotalAlloc = 230 MiB Sys = 207 MiB NumGC = 14
heap = 171 MiB Alloc = 167 MiB TotalAlloc = 294 MiB Sys = 273 MiB NumGC = 14
heap = 171 MiB Alloc = 167 MiB TotalAlloc = 294 MiB Sys = 273 MiB NumGC = 14
heap = 171 MiB Alloc = 167 MiB TotalAlloc = 294 MiB Sys = 273 MiB NumGC = 14
heap = 235 MiB Alloc = 231 MiB TotalAlloc = 358 MiB Sys = 339 MiB NumGC = 15
heap = 235 MiB Alloc = 231 MiB TotalAlloc = 358 MiB Sys = 339 MiB NumGC = 15
heap = 299 MiB Alloc = 295 MiB TotalAlloc = 422 MiB Sys = 405 MiB NumGC = 15
heap = 363 MiB Alloc = 359 MiB TotalAlloc = 486 MiB Sys = 471 MiB NumGC = 15
heap = 363 MiB Alloc = 359 MiB TotalAlloc = 486 MiB Sys = 471 MiB NumGC = 15
Cycle completed
heap = 363 MiB Alloc = 359 MiB TotalAlloc = 487 MiB Sys = 471 MiB NumGC = 15
heap = 427 MiB Alloc = 423 MiB TotalAlloc = 551 MiB Sys = 537 MiB NumGC = 15
heap = 427 MiB Alloc = 423 MiB TotalAlloc = 551 MiB Sys = 537 MiB NumGC = 15
heap = 427 MiB Alloc = 423 MiB TotalAlloc = 551 MiB Sys = 537 MiB NumGC = 15
heap = 427 MiB Alloc = 423 MiB TotalAlloc = 551 MiB Sys = 537 MiB NumGC = 15
heap = 428 MiB Alloc = 423 MiB TotalAlloc = 551 MiB Sys = 537 MiB NumGC = 15
heap = 428 MiB Alloc = 423 MiB TotalAlloc = 551 MiB Sys = 537 MiB NumGC = 15
heap = 428 MiB Alloc = 424 MiB TotalAlloc = 551 MiB Sys = 537 MiB NumGC = 15
heap = 428 MiB Alloc = 424 MiB TotalAlloc = 551 MiB Sys = 537 MiB NumGC = 15
heap = 428 MiB Alloc = 424 MiB TotalAlloc = 551 MiB Sys = 537 MiB NumGC = 15

from madmin-go.

klauspost avatar klauspost commented on August 22, 2024

Not really seeing any leak there.

Yes, the function could have pagination so a huge number of users don't take too much memory, but this is not really something that seems to worrysome.

from madmin-go.

harshavardhana avatar harshavardhana commented on August 22, 2024

Not really seeing any leak there.

Yes, the function could have pagination so a huge number of users don't take too much memory, but this is not really something that seems to worrysome.

Yeah this looks like normal and will be relinquished properly to Go runtime as needed.

from madmin-go.

Related Issues (19)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.