notifications are actually slow for reals
-
Duration(ms) Duration(%) Segment Drilldown Timestamp 5,140 100.00% //socket.io/notifications.get 0.000s 8.44 0.16% Redis get 0.000s 0.108 0.00% Callback: anonymous 0.009s 17.6 0.34% MongoDB objects toArray 0.009s 0.263 0.01% Callback: anonymous 0.026s 12.1 0.24% MongoDB objects toArray 0.027s 1.56 0.03% Callback: anonymous 0.039s 6.33 0.12% MongoDB objects toArray 0.039s 0.0973 0.00% Callback: anonymous 0.045s 6.03 0.12% MongoDB objects toArray 0.040s 0.312 0.01% Callback: anonymous 0.046s 10.7 0.21% MongoDB objects toArray 0.046s 1.05 0.02% Callback: anonymous 0.057s 2.82 0.05% MongoDB objects findOne 0.057s 1.3 0.03% Callback: anonymous 0.060s 5.77 0.11% MongoDB objects toArray 0.060s 0.214 0.00% Callback: anonymous 0.066s 3.57 0.07% MongoDB objects toArray 0.061s 0.0344 0.00% Callback: anonymous 0.064s 2.02 0.04% MongoDB objects toArray 0.058s 0.0593 0.00% Callback: anonymous 0.060s 20.6 0.40% MongoDB objects toArray 0.009s 0.263 0.01% Callback: anonymous 0.030s 10.8 0.21% MongoDB objects toArray 0.030s 2.78 0.05% Callback: anonymous 0.041s 4.76 0.09% MongoDB objects toArray 0.041s 0.0878 0.00% Callback: anonymous 0.046s 6.85 0.13% MongoDB objects toArray 0.041s 0.124 0.00% Callback: anonymous 0.048s 8.3 0.16% MongoDB objects toArray 0.041s 0.0706 0.00% Callback: anonymous 0.050s 9.72 0.19% MongoDB objects toArray 0.042s 0.0981 0.00% Callback: anonymous 0.052s 12.6 0.24% MongoDB objects toArray 0.042s 0.0866 0.00% Callback: anonymous 0.055s 13.0 0.25% MongoDB objects toArray 0.042s 0.102 0.00% Callback: anonymous 0.055s 13.1 0.25% MongoDB objects toArray 0.043s 0.0814 0.00% Callback: anonymous 0.056s 13.1 0.25% MongoDB objects toArray 0.043s 0.093 0.00% Callback: anonymous 0.056s 13.0 0.25% MongoDB objects toArray 0.043s 0.102 0.00% Callback: anonymous 0.056s 13.0 0.25% MongoDB objects toArray 0.043s 0.418 0.01% Callback: anonymous 0.056s 9.7 0.19% MongoDB objects toArray 0.057s 0.975 0.02% Callback: anonymous 0.066s 2.89 0.06% MongoDB objects findOne 0.066s 3.91 0.08% Callback: anonymous 0.069s 7.44 0.14% MongoDB objects toArray 0.069s 0.0305 0.00% Callback: anonymous 0.077s 17.2 0.33% MongoDB objects toArray 0.070s 0.0408 0.00% Callback: anonymous 0.088s 11.6 0.22% MongoDB objects toArray 0.071s 0.0302 0.00% Callback: anonymous 0.083s 4,790 93.12% MongoDB objects toArray 0.072s 6.43 0.13% Callback: anonymous 4.862s 4,520 87.88% MongoDB objects toArray 0.072s 6.3 0.12% Callback: anonymous 4.593s 4,720 91.71% MongoDB objects toArray 0.072s 6.36 0.12% Callback: anonymous 4.789s 4,850 94.21% MongoDB objects toArray 0.072s 6.47 0.13% Callback: anonymous 4.918s 5,050 98.26% MongoDB objects toArray 0.073s 14.8 0.29% Callback: anonymous 5.127s 4,820 93.67% MongoDB objects toArray 0.073s 6.46 0.13% Callback: anonymous 4.891s 4,380 85.23% MongoDB objects toArray 0.073s 6.3 0.12% Callback: anonymous 4.457s 2.24 0.04% MongoDB objects toArray 0.067s 0.0515 0.00% Callback: anonymous 0.069s /cc @julianlam
-
Can we have RSBMSs now?
-
Are we using Redis and MongDB?
-
@loopback0 ALL THE BUZZWORDS!
-
@loopback0 said in notifications are actually slow for reals:
Are we using Redis and MongDB?
redis just handles session synchronizing between the instances. Currently, only one instance is accessible because @psychobunny inadvertently broke
nodebb.min.js
from loading on non-primary instances.MongoDB holds all the data. Redis doesn't save data to disk.
-
-
The will get fast soon. Just lubricate the thrads!
-
@Nagesh Silly Nagesh, Node doesn't use threads.
-
@Yamikuronue Lies!
See? That's some pretty nice threads if you ask me.
Edit: not sure if I broke the image, can't verify due to shitty connection
-
@Onyx Put that on Irish Girl and I'll gladly provide the lubrication.
-
@Yamikuronue said in notifications are actually slow for reals:
@Nagesh Silly Nagesh, Node doesn't use threads.
Are you for real?
-
@Nagesh I seem to exist in what I can only assume is the real world, so tentatively yes?
-
@Nagesh said in notifications are actually slow for reals:
@Yamikuronue said in notifications are actually slow for reals:
@Nagesh Silly Nagesh, Node doesn't use threads.
Are you for real?
OK, it uses one thread...
-
@Onyx actual serious question for @ben_lubar or whoever: How strongly coupled is nodebb to Mango? Would it be theoretically possible to write a connector to a stodgy old RDBMS?
-
@Weng sure, just rewrite the functions in this folder: https://github.com/NodeBB/NodeBB/tree/master/src/database/mongo
-
@Weng i looked into porting it to posrgre. It's not impossible, but the document databases don't have a schema as such, so we'd need to maintain it ourselves, and we'd probably have fun problems with plgins altering the document schema.
I only spent a few hours, but I didn't consider it worthwhile.
-
@ben_lubar There any... Like, functional or design documentation or anything?
-
@swayde I'm thinking hybrid. Mango stays, but we double-write some data and preferentially hit the RDBMS.
-
@Weng It's mostly based on redis's API, so for example, https://github.com/NodeBB/NodeBB/blob/v1.0.2/src/database/mongo/sorted.js#L8 corresponds to http://redis.io/commands/zadd
-
@Weng might as well use postgre document store then, I think.
-
@Weng I assume it will be more work to create a good schema than to actually get the data to and from Node.
-
@Onyx Sane, performant database schemas are my thing.
-
@swayde I guess that depends on if the plugins have their own database access code or they go through the normal mechanisms.
-
@Weng I believe they go through normal stuff. But a "document" is just json, so it's easy to just put whatever you want to put in there and have use a default value if you retrieve the document and the thing you want isn't there.
-
@boomzilla That makes sense so I wasn't entirely expecting it to be the way it would be done
-
@Weng i think you (or they) can do whatever you want to.
https://docs.nodebb.org/en/latest/plugins/create.html#example-library-method
https://github.com/NodeBB/NodeBB/blob/master/src/posts.js#L156They seem to be able to add properties at will, if I understand the code correctly
-
@Weng said in notifications are actually slow for reals:
@Onyx actual serious question for @ben_lubar or whoever: How strongly coupled is nodebb to Mango? Would it be theoretically possible to write a connector to a stodgy old RDBMS?
In theory it is possible to do many thing at same time. In practice it is almost always difficult.
#MilesbetweenBeijingAndBangalore
-
@ben_lubar said in notifications are actually slow for reals:
Currently, only one instance is accessible because @psychobunny inadvertently broke nodebb.min.js from loading on non-primary instances.
He ended up fixing this, right? You guys are back on two cores I hope.
-
@julianlam he fixed it and we're back on four instances.
-
Why is "mark all as read" so slow and getting slower literally every day? Shlemiel the Painter algorithm?
-
lets just migrate it to something that doesn't use silly tech like mongo and JavaScript
flarum will have an importer for phpbb, just saying