-
Notifications
You must be signed in to change notification settings - Fork 0
[$200] Post performance updates #567
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
Comments
Challenge https://www.topcoder.com/challenges/ced12554-3a2e-4f8b-9a78-128ba5f0cb43 has been created for this ticket. |
Challenge https://www.topcoder.com/challenges/ced12554-3a2e-4f8b-9a78-128ba5f0cb43 has been assigned to obog. |
@jmgasper
https://app.tideways.io/o/Topcoder/Discussions/trace/qsSby3gBhnQ2FlZ7mdQN/
|
@jmgasper I am working on it. Notifications can be sent with a cron job in Vanilla. I'll update with details tomorrow. |
Perfect, thanks! |
@jmgasper Please apply PR-#574. Thanks! I’ve enabled The main problems with email notificationsEmail notifications are currently queued up and sent in the middle of the request, after the post has been saved and before the post is rendered. Vanilla has The main problems with email notifications in Vanilla:
We haven’t seen this issue because groups have only 5-13 members on DEV. So the response times are <= 1 secs. Sending emails (PROD)This section provides a small report on the current system performance when sending emails. Therefore, it is necessary to fix this problem before the implementation of the notification tasks (#522 (comment)) On PROD In other words, X users are watching a category, Vanilla will notify at least X users when a new comment/discussion posted. There may be more users in some cases. The response times: You can see the 'WAIT' labels in Tidewyas. This label is displayed when the trace has significant unaccounted CPU wait time. You can also see a big time gap for the posting requests: Posting a discussion/comment in a group with 100+ members: I’ve posted a comment in a group with 120+ members to create a callgraph on PROD. 120 members were notified. The response time was 16.8 secs. Sending emails was 14.4 secs: https://app.tideways.io/o/Topcoder/Discussions/trace/HL2e0HgBmm2oVpuHKduw The traces for other requests https://discussions.topcoder.com/group/764 - 157 members SchedulerVanilla Scheduler adds a Message Queue functionality. The scheduler takes jobs during the normal request processing, and dispatches them at the end of the request. Using The callgraph of a job if SolutionSending notifications in fewer emails will improve performance. Users having the same notification regarding the same record will be lumped into email messages as BCC recipients in batches. Users are grouped on emails based on the notifications sharing the following: activity type, record type, record ID, subject and body. If all these align, emails are reused for up to X users. This includes a refactor of emailing in ActivityModel. No functional changes should be observed here for the current notification email flow. These changes should only impact batch email sending. Since this feature only affects comments and discussions TestingIt'd be better to create several groups with 50-200-500-1000 members for testing on DEV. If testers need help to generate data let me know. I’ll write a sql script to generate ‘dummy’ data. From a functional point of view, there is no difference, but we can see performance problems in advance. |
@atelomycterus - Thanks for this, it makes sense. From a user standpoint, if we enable |
Yes, the response times will be shorter for groups with more participants.
Sending emails will happen almost immediately, but in a new thread. Let me know if I should work on batch-sending of notification emails or we will put it aside for now and do tasks with |
@atelomycterus - Let's just enable We'll test in prod (another deployment on Sunday) and see if we need to do the batch-sending, thanks! |
@jmgasper Ok. I enabled it yesterday, now this feature is enabled on Dev. I’ll verify it. |
@jmgasper I've checked Dev env, it works as expected. Let's test it in PROD on Sunday. |
Payment task has been updated: https://www.topcoder.com/challenges/ced12554-3a2e-4f8b-9a78-128ba5f0cb43 |
@atelomycterus For testing can you help in creating the data set you mentioned in you comment above? I am not sure how I can add that many users to the groups. Thanks.
|
@sdgun I can help with that. Give me links to the groups to which you want to add users + let me know how many users to add to which group. |
@atelomycterus Please add below users to the given groups, thanks. |
@atelomycterus Hope you added the users to above groups. I cannot see if they have been added because the members page is not available anymore. Verified in Dev. Verified in Dev. Posting in all above groups took only around 1 second: |
@sdgun I got a forbidden exception on DEV because 'vanilla' account doesn't have privileges to create/execute stored procedures. |
@atelomycterus - As discussed with the performance, there may be a couple things we can do to help with post delays. Can you implement something that may help here please?
The text was updated successfully, but these errors were encountered: