h2non / imaginary

Fast, simple, scalable, Docker-ready HTTP microservice for high-level image processing
https://fly.io/docs/app-guides/run-a-global-image-service/
MIT License
5.5k stars 455 forks source link

`-cpus <num>` doesn’t seem to set the number of cores #420

Open shivaraj-bh opened 8 months ago

shivaraj-bh commented 8 months ago

Here’s the command used to start the server:

imaginary -a=localhost -p=8088 -cpus=1

And this is what I get when I call the health endpoint:

$ curl 127.0.0.1:8088/health
{"uptime":18,"allocatedMemory":0.6,"totalAllocatedMemory":0.6,"goroutines":6,"completedGCCycles":0,"cpus":4,"maxHeapUsage":3.69,"heapInUse":0.6,"objectsInUse":1217,"OSMemoryObtained":7.35}

As you can see in the output, the number of cpus is still 4.

shivaraj-bh commented 8 months ago
$ imaginary -v
1.2.4