-
Notifications
You must be signed in to change notification settings - Fork 10
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
pit-cs: Remove extra goroutine and Mutex #40
Conversation
This deadlocks for some reason, but only when I have multiple faces/producers. Any ideas why? |
I have no idea. Could you show me how you run it? |
Just running two ndnputchunks on different prefixes using a 1G file. Then two ndncatchunks in parallel for both the files. |
Thanks. Let me have a try. |
Unfortunately I cannot reproduce this on my computer. One thing you can try is to add a buffer to the channel: pitCs.updateTimer = make(chan struct{}, 5) and see if that solves the problem. If the problem is still there, you could add a |
Another possible reason could be that there are too many expiring entries that blocks the channel |
Hello. I pushed another commit. Please see if it fixes the problem. |
@zjkmxy doesn't lock up for me anymore, but I'm trying to figure out why performance is 25-50% worse. Right now it seems to me that map deletes are simply slow, so doing them on the same thread makes it slower. But that's unrelated to this PR, so this looks good to me. |
OK. Let me see if there is solution. |
Right ... maybe I need to stop testing with ndnputchunks What I currently observe is that if I comment the following line then the aggregate throughput with two instances of putchunks-catchunks, the throughput (content store off) goes from ~3gbps to ~4.5gbps Though I realise now that this could simply be because of the increased GC overhead ... |
Another possibility is YaNFD does not use PIT Token due to bugs. I'm not sure if this is the case.
Then, probably using a memory pool for PIT-CS table could be a better choice. The implementation of csMap |
Since this PR is closed. Let's continue further discussion (if there is) on #42. |
pit-cs: Remove extra goroutine and Mutex Fix: #38
Ref: #38