-
Notifications
You must be signed in to change notification settings - Fork 2
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
initial review notes #1
Comments
I've added a checkpoint prototype function that is called in once per 'end' event received from findObjects.
Agreed, this will remain the default batch size.
Done.
Database filenames are now formatted as in
I've made this configurable by adding a
I think having an array of srvDomains for shards we want to assign to the feeder is reasonable. This could probably look similar to
Do you have a good litmus test for this? My first thought would be to run the process for a while and look at the output of I will make sure that the
I will profile this while listing a large directory in my test environment. What tools would you use to determine which part of the code is consuming the most time?
I have changed the feeder to use a separate writeStream for each instruction object listing (1 per storage node). The feeder will created these streams when it starts up and close them in done state. Do you think that running in a Manta with many storage nodes (~1,000) might lead to memory issues? I'm not sure how large the objects associated with each stream are, but I could look into that. Do you have a suggestion for how I could find this information? |
For both the memory leak check and CPU profiling, it may make sense to sanity-check it in a test environment, but the results could be different in prod (particularly for CPU profiling), so I wouldn't necessarily spend a ton of time on it. I think it would be better to prioritize making it possible to iterate in prod.
I would just run it for an extended period and see if the RSS usage stabilizes. That's the only way I know to tell.
I would use
This will profile at 97Hz for 60 seconds. Then I'd copy this to your laptop and use stackvis:
to generate a flame graph. You can open this in your browser. There are a few notes about this process:
|
I kicked off a test run of the latest commit in us-east (409a14c) in our ops zone there.
After writing out around 50,000 instructions, the process held a steady RSS of about 64M:
Here's an example of the output of
Here's the flamegraph: http://us-east.manta.joyent.com/jan.wyszynski/public/flamegraph.htm. If I'm reading that correctly I think this process is bottlenecked on crc checksum validation when decoding fast message buffers in the node-moray client. This data is from a process assigned one shard in us-east. Roughly, the process was able to list write 300,000 instructions to a listing file in 45 minutes of execution. To list 1,000,000 instruction objects at this rate would take 150 minutes (around 2.5 hours). |
Here are some datapoints from a lister process running with two assigned shards in us-east:
RSS holds steady at 61M (slightly higher than the process running with 1 shard. This process spends slightly more time in user mode:
Here's the flamegraph for a process with two shards assigned to it: http://us-east.manta.joyent.com/jan.wyszynski/public/flamegraph-2-shards.htm. After 17 minutes of execution, the process juggling 2 shards wrote out 395,549 instructions (this is a sum across multiple storage nodes). |
4-shards
RSS is not significantly affected:
Here's the flamegraph: http://us-east.manta.joyent.com/jan.wyszynski/public/flamegraph-4-shards.htm 8-shards: There's significantly more USR time here:
But rss seems to stabilize with not too much growth compared to the 4-shards case:
Here's the flamegraph: http://us-east.manta.joyent.com/jan.wyszynski/public/flamegraph-8-shards.htm |
I'm filing this issue as a place to put feedback from my initial review. I reviewed commit d5fb9d6.
First, this is great -- a lot of work for a short time! Most of my major feedback relates to performance and operational considerations.
Here are the major issues I think we definitely want to address:
Here are the operational considerations we'll need to answer:
(uncompressed)
From the above: I think it would be safest if we can deploy this to a new CN on the Manta network.
I'm not sure how big an issue this will be:
The text was updated successfully, but these errors were encountered: