Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

importer: increase default batch, job_count, worker_count. #3

Merged
merged 3 commits into from
Jun 29, 2017
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 3 additions & 3 deletions importer/config.go
Original file line number Diff line number Diff line change
Expand Up @@ -33,9 +33,9 @@ func NewConfig() *Config {
fs.StringVar(&cfg.TableSQL, "t", "", "create table sql")
fs.StringVar(&cfg.IndexSQL, "i", "", "create index sql")

fs.IntVar(&cfg.WorkerCount, "c", 1, "parallel worker count")
fs.IntVar(&cfg.JobCount, "n", 1, "total job count")
fs.IntVar(&cfg.Batch, "b", 1, "insert batch commit count")
fs.IntVar(&cfg.WorkerCount, "c", 2, "parallel worker count")
Copy link
Collaborator

@IANTHEREAL IANTHEREAL Jun 28, 2017

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

2? 16 come on

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I make it 2 because default JobCount is 10000;

Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

how about 10,1000,10000?

fs.IntVar(&cfg.JobCount, "n", 10000, "total job count")
fs.IntVar(&cfg.Batch, "b", 1000, "insert batch commit count")

fs.StringVar(&cfg.DBCfg.Host, "h", "127.0.0.1", "set the database host ip")
fs.StringVar(&cfg.DBCfg.User, "u", "root", "set the database user")
Expand Down
7 changes: 4 additions & 3 deletions importer/config.toml
Original file line number Diff line number Diff line change
Expand Up @@ -6,9 +6,10 @@ index-sql = "create unique index u_b on t(b);"

log-level = "info"

worker-count = 1
job-count = 10
batch = 1
worker-count = 2
job-count = 10000
# batch insert rows
batch = 1000

[db]
host = "127.0.0.1"
Expand Down