Skip to content

Commit

Permalink
Prepare for release 0.5.7 (Velocidex#973)
Browse files Browse the repository at this point in the history
  • Loading branch information
scudette authored Mar 15, 2021
1 parent 661fab5 commit 21f75df
Show file tree
Hide file tree
Showing 4 changed files with 12 additions and 18 deletions.
4 changes: 2 additions & 2 deletions config/config.go
Original file line number Diff line number Diff line change
Expand Up @@ -143,8 +143,8 @@ func GetDefaultConfig() *config_proto.Config {
Resources: &config_proto.FrontendResourceControl{
ExpectedClients: 10000,
ConnectionsPerSecond: 100,
Concurrency: 60,
TargetHeapSize: 1000000000, // 1Gb
Concurrency: 0, // By default 2 * CPU count
TargetHeapSize: 0, // Set to control concurrency to match target heap size.
NotificationsPerSecond: 10,
MaxUploadSize: constants.MAX_MEMORY * 2,
},
Expand Down
9 changes: 1 addition & 8 deletions config/validate.go
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,6 @@ package config
import (
"fmt"
"regexp"
"runtime"
"strings"

errors "github.com/pkg/errors"
Expand Down Expand Up @@ -49,7 +48,7 @@ func ValidateClientConfig(config_obj *config_proto.Config) error {
}

if config_obj.Client.MaxPoll == 0 {
config_obj.Client.MaxPoll = 60
config_obj.Client.MaxPoll = 60 // One minute
}

if config_obj.Client.PinnedServerName == "" {
Expand Down Expand Up @@ -130,12 +129,6 @@ func ValidateFrontendConfig(config_obj *config_proto.Config) error {
resources.ConnectionsPerSecond = 1000
}

// By default concurrency should be about 2 * available CPU
// cores.
if resources.Concurrency == 0 {
resources.Concurrency = 2 * uint64(runtime.GOMAXPROCS(0))
}

if resources.NotificationsPerSecond == 0 {
resources.NotificationsPerSecond = 10
}
Expand Down
5 changes: 5 additions & 0 deletions gui/velociraptor/src/dark-mode.css
Original file line number Diff line number Diff line change
Expand Up @@ -336,3 +336,8 @@
.dark-mode .overlay .fa-spinner {
filter: invert(1);
}

/* Shell output */
.dark-mode .notebook-output pre {
filter: invert(1);
}
12 changes: 4 additions & 8 deletions server/server.go
Original file line number Diff line number Diff line change
Expand Up @@ -192,15 +192,11 @@ func NewServer(config_obj *config_proto.Config) (*Server, error) {
}

heap_size := config_obj.Frontend.Resources.TargetHeapSize
if heap_size == 0 {
heap_size = 2000000000
}

result.logger.Info("Targetting heap size %v, with maximum concurrency %v",
heap_size, concurrency)
if heap_size > 0 {
// If we are targetting a heap size then modulate concurrency
result.logger.Info("Targetting heap size %v, with maximum concurrency %v",
heap_size, concurrency)

// If we are targetting a heap size then modulate concurrency
if config_obj.Frontend.Resources.TargetHeapSize > 0 {
go result.ManageConcurrency(concurrency, heap_size)
}

Expand Down

0 comments on commit 21f75df

Please sign in to comment.