For an explanation of the above command line options, and additional options supported run sgload --help or sgload gateload --help
Architecture
Notes:
The gateload runner spawns for and waits for completion for the following goroutines
DocFeeders
Writers
Updaters
Readers
There is a DocFeeder goroutine created for every Writer goroutine, and it continually feeds it docs until there are none left
Writers write docs to Sync Gateway in batches
After a writer writes a doc batch, it pushes these doc id's to a channel which the updaters are listening to
Updaters read docs from the channel shared with the writers and look for new doc id's that are ready to be updated, until they have enough docs (total docs / numupdaters)
Updaters keep updating docs until they have written the number of revisions specified in the numrevsperdoc command line argument
Readers are assigned a subset of the channels (and therefore docs) to pull docs from the changes feed and will continue to pull from the changes feed until all docs are seen.
Design
The docfeeder goroutine spreads the docs among the writers as evenly as possible.
Docs are spread evenly as possible among channels
Can specify existing user credentials or tell the tool to create new users as needed (access to admin port required)
When auto-generating users, the user id's will be unique and not interfere with subsequent runs
Supported scenarios
Gatealod (writer + updater + reader) -- this is the primary scenario