Browse Source

Change -cpus default, update README

Ask Bjørn Hansen 2 years ago
parent
commit
d06f974f42
3 changed files with 14 additions and 19 deletions
  1. 4 0
      CHANGES.md
  2. 8 15
      README.md
  3. 2 4
      geodns.go

+ 4 - 0
CHANGES.md

@@ -1,5 +1,9 @@
 # GeoDNS Changelog
 
+## Next
+- Avro logging feature
+- Default to use all CPUs on the system.
+
 ## 3.2.3 June 2023
 - querylog: Add software version, answer data and IsTCP fields
 - Make Go module paths semantic versions

+ 8 - 15
README.md

@@ -105,26 +105,19 @@ cluster the server is part of, etc. This is used in (future) reporting/statistic
 Enable to get lots of extra logging, only useful for testing and debugging. Absolutely not
 recommended in production unless you get very few queries (less than 1-200/second).
 
-* -cpus=1
+* -cpus=4
 
-Maximum number of CPUs to use. Set to 0 to match the number of CPUs available on the system.
-Only "1" (the default) has been extensively tested.
+Maximum number of CPUs to use. Set to 0 to match the number of CPUs
+available on the system (also the default).
 
-## WebSocket interface
+## Prometheus metrics
 
-geodns runs a WebSocket server on port 8053 that outputs various performance
-metrics. The WebSocket URL is `/monitor`. There's a "companion program" that can
-use this across a cluster to show aggregate statistics, email for more information.
+`/metrics` on the http port provides a number of metrics in Prometheus format.
 
-## Runtime status
+### Runtime status page, Websocket metrics & StatHat integration
 
-There's a page with various runtime information (queries per second, queries and
-most frequently requested labels per zone, etc) at `/status`.
-
-## StatHat integration
-
-GeoDNS can post runtime data to [StatHat](http://www.stathat.com/).
-([Documentation](https://github.com/abh/geodns/wiki/StatHat))
+The runtime status page, websocket feature and StatHat integration have
+been replaced with Prometheus metrics.
 
 ## Country and continent lookups
 

+ 2 - 4
geodns.go

@@ -62,7 +62,7 @@ var (
 	flagport         = flag.String("port", "53", "default port number")
 	flaghttp         = flag.String("http", ":8053", "http listen address (:8053)")
 	flaglog          = flag.Bool("log", false, "be more verbose")
-	flagcpus         = flag.Int("cpus", 1, "Set the maximum number of CPUs to use")
+	flagcpus         = flag.Int("cpus", 0, "Set the maximum number of CPUs to use")
 	flagLogFile      = flag.String("logfile", "", "log to file")
 	flagPrivateDebug = flag.Bool("privatedebug", false, "Make debugging queries accepted only on loopback")
 
@@ -148,9 +148,7 @@ func main() {
 		return
 	}
 
-	if *flagcpus == 0 {
-		runtime.GOMAXPROCS(runtime.NumCPU())
-	} else {
+	if *flagcpus > 0 {
 		runtime.GOMAXPROCS(*flagcpus)
 	}