Repository: DiceDB/dice
File: config/config.go (Go)

Code before:
		MaxClients             int           `mapstructure:"maxclients"`
		MaxMemory              int64         `mapstructure:"maxmemory"`
		EvictionPolicy         string        `mapstructure:"evictionpolicy"`
		EvictionRatio          float64       `mapstructure:"evictionratio"`
		KeysLimit              int           `mapstructure:"keyslimit"`
		AOFFile                string        `mapstructure:"aoffile"`
		WriteAOFOnCleanup      bool          `mapstructure:"writeaofoncleanup"`
		LFULogFactor           int           `mapstructure:"lfulogfactor"`
		LogLevel               string        `mapstructure:"loglevel"`
		PrettyPrintLogs        bool          `mapstructure:"prettyprintlogs"`
		EnableMultiThreading   bool          `mapstructure:"enablemultithreading"`
		StoreMapInitSize       int           `mapstructure:"storemapinitsize"`
		WatchChanBufSize       int           `mapstructure:"watchchanbufsize"`
	}{
		Addr:                   DefaultHost,
		Port:                   DefaultPort,
		KeepAlive:              int32(300),
		Timeout:                int32(300),
		MaxConn:                int32(0),
		ShardCronFrequency:     1 * time.Second,
		MultiplexerPollTimeout: 100 * time.Millisecond,
		MaxClients:             20000,
		MaxMemory:              0,
		EvictionPolicy:         EvictAllKeysLFU,
		EvictionRatio:          0.9,
		KeysLimit:              200000000,
		AOFFile:                "./dice-master.aof",
		WriteAOFOnCleanup:      false,
		LFULogFactor:           10,
		LogLevel:               "info",
		PrettyPrintLogs:        false,
		EnableMultiThreading:   false,
		StoreMapInitSize:       1024000,
		WatchChanBufSize:       20000,
	},
	Auth: struct {
		UserName string `mapstructure:"username"`
		Password string `mapstructure:"password"`
	}{
		UserName: "dice",
		Password: RequirePass,
	},
	Network: struct {
		IOBufferLength    int `mapstructure:"iobufferlength"`
		IOBufferLengthMAX int `mapstructure:"iobufferlengthmax"`
	}{
		IOBufferLength:    512,
		IOBufferLengthMAX: 50 * 1024,
	},
}


Review comment (suggestion):
KeysLimit is also getting used at `internal/store` Shall we keep this value small as well by default? We don't need these many keys to consider for eviction. 

Shall we keep KeysLimit and WatchChanBufSize as two different variables? Hope there's no logical correlation between them 

Code after:
		Timeout                int32         `mapstructure:"timeout"`
		MaxConn                int32         `mapstructure:"max-conn"`
		ShardCronFrequency     time.Duration `mapstructure:"shardcronfrequency"`
		MultiplexerPollTimeout time.Duration `mapstructure:"servermultiplexerpolltimeout"`
		MaxClients             int32         `mapstructure:"maxclients"`
		MaxMemory              int64         `mapstructure:"maxmemory"`
		EvictionPolicy         string        `mapstructure:"evictionpolicy"`
		EvictionRatio          float64       `mapstructure:"evictionratio"`
		KeysLimit              int           `mapstructure:"keyslimit"`
		AOFFile                string        `mapstructure:"aoffile"`
		WriteAOFOnCleanup      bool          `mapstructure:"writeaofoncleanup"`
		LFULogFactor           int           `mapstructure:"lfulogfactor"`
		LogLevel               string        `mapstructure:"loglevel"`
		PrettyPrintLogs        bool          `mapstructure:"prettyprintlogs"`
		EnableMultiThreading   bool          `mapstructure:"enablemultithreading"`
		StoreMapInitSize       int           `mapstructure:"storemapinitsize"`
		WatchChanBufSize       int           `mapstructure:"watchchanbufsize"`
	}{
		Addr:                   DefaultHost,
		Port:                   DefaultPort,
		KeepAlive:              int32(300),
		Timeout:                int32(300),
		MaxConn:                int32(0),
		ShardCronFrequency:     30 * time.Second,
		MultiplexerPollTimeout: 100 * time.Millisecond,
		MaxClients:             int32(20000),
		MaxMemory:              0,
		EvictionPolicy:         EvictAllKeysLFU,
		EvictionRatio:          0.9,
		KeysLimit:              DefaultKeysLimit,
		AOFFile:                "./dice-master.aof",
		WriteAOFOnCleanup:      false,
		LFULogFactor:           10,
		LogLevel:               "info",
		PrettyPrintLogs:        false,
		EnableMultiThreading:   false,
		StoreMapInitSize:       1024000,
		WatchChanBufSize:       20000,
	},
	Auth: struct {
		UserName string `mapstructure:"username"`
		Password string `mapstructure:"password"`
	}{
		UserName: "dice",
		Password: RequirePass,
	},
	Network: struct {
		IOBufferLength    int `mapstructure:"iobufferlength"`
		IOBufferLengthMAX int `mapstructure:"iobufferlengthmax"`
	}{
		IOBufferLength:    512,