Just realized I now to use taskset to make sure all the goroutine run on
the same CPU
sudo taskset -c 7 ./sche -r 0.3s
and It's working now
On Thursday, September 26, 2024 at 11:49:53 AM UTC+8 Zhao Weng wrote:
> Hi gophers,
> I'm doing a research on how to prioritise some goroutines over other
Hi gophers,
I'm doing a research on how to prioritise some goroutines over others.So I
can allocate more CPU resource to more important part of the program.
I try to do it by calling runtime.LockOSThread to assign the goroutine
needs to be prioritise to a designated OS thread, and unix.SchedSetA
Hi gophers,
We have a web service running with high minor page fault and I'm trying to
understand why. I start by using linux perf:
```bash
sudo perf record -e minor-faults -c 1 -C 0-2 -ag -- sleep 15
sudo perf script > perf.out
```
and in the output file perf.out, I found many strange trace reco
vice which has a long-lived
>>>>> map[int]int in memory, we constantly add new data to it and maintain its
>>>>> size by calling delete() when oversize, we assume there should not
>>>>> result
>>>>> in GC overhead growth as time goes by.
>
Dear Gophers:
I have some questions about GC and map[int]int, please help.
consider the following program:
```go
package main
import (
"fmt"
"os"
"runtime/pprof"
)
func main() {
f, err := os.OpenFile("memory.pb.gz", os.O_RDWR|os.O_CREATE|os.O_TRUNC, 0666
)
if err != nil {
panic(err)
}
m := ma
Dear Gophers:
I have some questions about GC and map[int]int, please help.
consider the following program:
```go
package main
import (
"fmt"
"os"
"runtime/pprof"
)
func main() {
f, err := os.OpenFile("memory.pb.gz", os.O_RDWR|os.O_CREATE|os.O_TRUNC, 0666
)
if err != nil {
panic(err)
}
m := ma
Dear Gophers:
I have some questions about GC and map[int]int, please help.
consider the following program:
```go
package main
import (
"fmt"
"os"
"runtime/pprof"
)
func main() {
f, err := os.OpenFile("memory.pb.gz", os.O_RDWR|os.O_CREATE|os.O_TRUNC, 0666
)
if err != nil {
panic(err)
}
m := ma
consider the following program:
```go
package main
import (
"fmt"
"os"
"runtime/pprof"
)
func main() {
f, err := os.OpenFile("memory.pb.gz", os.O_RDWR|os.O_CREATE|os.O_TRUNC, 0666
)
if err != nil {
panic(err)
}
m := make(map[int]int)
for i := 0; i < 10e6; i++ {
m[i] = 2 * i
}
if err := pprof.W
sorry for being not specific.
my question is:
according to my understanding about memstat ( correct me if I'm wrong)
with GOGC set to 50, I can see from the graph above that GCGoal is ~ 26GB
and heapIdle - heapReleased is how much memory go runtime retain from OS
for later usage, how can it (he