upped buffer sizes and switched to 2xlarge to increase speed
This commit is contained in:
parent
1df9a234cf
commit
8dce702e8d
5 changed files with 10 additions and 8 deletions
|
|
@ -48,7 +48,7 @@ func main() {
|
|||
flag.StringVar(&cfg.DBUrl, "db", "", "Postgres connection string (required)")
|
||||
flag.StringVar(&cfg.IconsDir, "icons-dir", "icons", "Directory to store downloaded icons")
|
||||
flag.IntVar(&cfg.BatchSize, "batch-size", 5000, "Rows to claim per batch")
|
||||
flag.IntVar(&cfg.Concurrency, "concurrency", 2500, "Number of concurrent goroutines")
|
||||
flag.IntVar(&cfg.Concurrency, "concurrency", 5000, "Number of concurrent goroutines")
|
||||
flag.IntVar(&cfg.Limit, "limit", 0, "Max icons to process (0 = all)")
|
||||
flag.DurationVar(&cfg.Timeout, "timeout", 10*time.Second, "HTTP request timeout")
|
||||
flag.Int64Var(&cfg.MaxSize, "max-size", 512*1024, "Max icon download size in bytes")
|
||||
|
|
@ -116,7 +116,7 @@ func main() {
|
|||
stats := &Stats{StartedAt: time.Now()}
|
||||
|
||||
// Feed icons into a channel so workers never starve waiting for batch claims
|
||||
iconCh := make(chan IconRow, cfg.BatchSize)
|
||||
iconCh := make(chan IconRow, 20000)
|
||||
go func() {
|
||||
defer close(iconCh)
|
||||
claimed := 0
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue