NATION

PASSWORD

RMB search & general server performance

Bug reports, general help, ideas for improvements, and questions about how things are meant to work.
User avatar
[violet]
Executive Director
 
Posts: 16205
Founded: Antiquity

RMB search & general server performance

Postby [violet] » Tue May 21, 2019 7:39 pm

Just a note that I've had to disable RMB search for the time being, since it was leading to a cascade of performance issues.

Things have been pretty bogged down for the last two weeks, but hopefully this improves things somewhat.

User avatar
[violet]
Executive Director
 
Posts: 16205
Founded: Antiquity

Postby [violet] » Fri May 24, 2019 7:05 pm

A few more optimizations:

Fixed a problem related to The Embassy which had become too large to fit within the in-memory cache, thus requiring it to be painstakingly loaded from disk every time. This mainly affected pages that mentioned The Embassy in their Happenings, creating a 5-15s slowdown.

Added a workaround for a problem relating to very large RMBs, where it is quite slow to calculate the pagination of a post when looking it up via its post ID with no other information. This is still slow, but the server doesn't need to figure it out as often. In particular, this should be noticeable when posting a new message and then viewing your own post.

Reduced the amount of logging we do, which has a cascading effect on performance when things get slow.

User avatar
Flanderlion
Minister
 
Posts: 2226
Founded: Nov 25, 2013
Psychotic Dictatorship

Postby Flanderlion » Sat May 25, 2019 8:59 am

[violet] wrote:Just a note that I've had to disable RMB search for the time being, since it was leading to a cascade of performance issues.

Things have been pretty bogged down for the last two weeks, but hopefully this improves things somewhat.

Just saw RMB search was disabled - what's changed that caused this to start being a problem? Not particularly concerned about it being disabled, just more curious as to why it started becoming an issue.
As always, I'm representing myself.
Information
Wishlist

User avatar
[violet]
Executive Director
 
Posts: 16205
Founded: Antiquity

Postby [violet] » Sun May 26, 2019 5:46 pm

Growth of RMBs has meant that the database's inbuilt search just isn't fast enough any more.

User avatar
Great Algerstonia
Minister
 
Posts: 2617
Founded: Mar 21, 2019
Ex-Nation

Postby Great Algerstonia » Sun May 26, 2019 6:12 pm

[violet] wrote:Growth of RMBs has meant that the database's inbuilt search just isn't fast enough any more.

Would it possibly be reintroduced in the future? And is this a threat with forum searches as well?
Anti: Russia
Pro: Prussia
Resilient Acceleration wrote:After a period of letting this discussion run its course without my involvement due to sheer laziness and a new related NS project, I have returned with an answer and that answer is Israel.

User avatar
9003
Diplomat
 
Posts: 624
Founded: Oct 25, 2012
Corporate Police State

Postby 9003 » Sun May 26, 2019 10:15 pm

Could it be reasonable to archive old rbm posts? Even just lopping off some of the ones from 5+years and putting them in a zip for the region rather than haveing the search function have to dig thorugh all of them?
proud member of PETZ people for the Ethical Treatment of Zombies

Active member of The cards market place discord

User avatar
Twilight Sparkle
Bureaucrat
 
Posts: 65
Founded: Apr 02, 2011
Iron Fist Consumerists

Postby Twilight Sparkle » Mon May 27, 2019 1:59 pm

Oh dear, this has some detrimental effects on regions with active RMB roleplaying. I hope this will be fixed soon.
I am Imperatrix Twilight Sparkle, the divine ruler and savior of all Ponykind. Worship me.

User avatar
[violet]
Executive Director
 
Posts: 16205
Founded: Antiquity

Postby [violet] » Mon May 27, 2019 5:06 pm

Great Algerstonia wrote:
[violet] wrote:Growth of RMBs has meant that the database's inbuilt search just isn't fast enough any more.

Would it possibly be reintroduced in the future? And is this a threat with forum searches as well?

The forum has a dedicated search service, so it's fine. To fix the RMB situation, we need to add one of those.

User avatar
Lenlyvit
Ambassador
 
Posts: 1370
Founded: Feb 13, 2012
Corrupt Dictatorship

Postby Lenlyvit » Mon May 27, 2019 8:06 pm

[violet] wrote:
Great Algerstonia wrote:Would it possibly be reintroduced in the future? And is this a threat with forum searches as well?

The forum has a dedicated search service, so it's fine. To fix the RMB situation, we need to add one of those.

Possibly a stupid question, but are you working on one in your available time? Also, thanks for finding the problems and actively working to solve them. I know it's a tiresome job, but I just want to remind you admin that if it weren't for you NS would've died long ago and we really appreciate having you around :hug:
World Assembly Secretary-General | Guide to the Security Council | Security Council Ruleset | SC Ideas Thread

Founder of The Hole To Hide In (THTHI Discord)
Chief of Staff and former four time Delegate of 10000 Islands

I've been commended by the Security Council. Author of 19 Security Council Resolutions.

User avatar
[violet]
Executive Director
 
Posts: 16205
Founded: Antiquity

Postby [violet] » Mon May 27, 2019 11:52 pm

Thanks! :) Yep, I have spent time on it and hope to implement soon.

User avatar
Twilight Sparkle
Bureaucrat
 
Posts: 65
Founded: Apr 02, 2011
Iron Fist Consumerists

Postby Twilight Sparkle » Tue May 28, 2019 5:05 am

[violet] wrote:Thanks! :) Yep, I have spent time on it and hope to implement soon.

https://derpibooru.org/62924
I am Imperatrix Twilight Sparkle, the divine ruler and savior of all Ponykind. Worship me.

User avatar
Flanderlion
Minister
 
Posts: 2226
Founded: Nov 25, 2013
Psychotic Dictatorship

Postby Flanderlion » Tue May 28, 2019 6:20 am

[violet] wrote:Thanks! :) Yep, I have spent time on it and hope to implement soon.

We love you [v]
As always, I'm representing myself.
Information
Wishlist

User avatar
The Ambassadors Reception
Bureaucrat
 
Posts: 63
Founded: Sep 16, 2018
Ex-Nation

Postby The Ambassadors Reception » Tue May 28, 2019 3:46 pm

[violet] wrote:A few more optimizations:

Fixed a problem related to The Embassy which had become too large to fit within the in-memory cache, thus requiring it to be painstakingly loaded from disk every time. This mainly affected pages that mentioned The Embassy in their Happenings, creating a 5-15s slowdown.

Added a workaround for a problem relating to very large RMBs, where it is quite slow to calculate the pagination of a post when looking it up via its post ID with no other information. This is still slow, but the server doesn't need to figure it out as often. In particular, this should be noticeable when posting a new message and then viewing your own post.

Reduced the amount of logging we do, which has a cascading effect on performance when things get slow.

I've just spotted this thread. Thanks so much for this enhancement. It has made an enormous difference to my life! That was a painful few weeks of waiting for Embassy pages to load. I look forward to the search update too. You're a star!

User avatar
[violet]
Executive Director
 
Posts: 16205
Founded: Antiquity

Postby [violet] » Tue May 28, 2019 5:39 pm

RMB Search is now reimplemented.

User avatar
Kuriko
Ambassador
 
Posts: 1318
Founded: Oct 31, 2017
Democratic Socialists

Postby Kuriko » Tue May 28, 2019 5:58 pm

[violet] wrote:RMB Search is now reimplemented.

Thanks [v]!!! You're the best!!!!

- Kuriko
Aka Lenlyvit
WA Secretary-General
TITO Tactical Officer of the 10000 Islands
Registrar-General and Chief of Staff of the 10000 Islands
LOVEWHOYOUARE~

Former TITO Tactical Officer
Former Commander of TGW, UDSAF, and FORGE
Proud founder of The Hole To Hide In
Person behind the Regional Officer resignation button
Person behind the Offsite Chat tag and the Jump Point tag
WA Character limit increase to 5,000 characters

User avatar
Flanderlion
Minister
 
Posts: 2226
Founded: Nov 25, 2013
Psychotic Dictatorship

Postby Flanderlion » Tue May 28, 2019 7:27 pm

[violet] wrote:RMB Search is now reimplemented.

3 char etc. searches. Not just reimplemented, massively improved. Thank you so much.
As always, I'm representing myself.
Information
Wishlist

User avatar
Jar Wattinree
Ambassador
 
Posts: 1700
Founded: Dec 14, 2016
Psychotic Dictatorship

Postby Jar Wattinree » Tue May 28, 2019 7:49 pm

[violet] wrote:RMB Search is now reimplemented.

You are amazing. :bow:
By the Holy Flaming Hammer of Unholy Cosmic Frost
I will voyage 'cross the Multiverse to fight for what was lost!
From this realm of nuclear chaos, to a world beyond the stars
I will quest forever onwards, so far;
I will wield the Holy Hammer of Flame!
Unholy cosmic frost!

Ecce Princeps Dundonensis Imperator Ascendit In Astra Eterna!

User avatar
Phydios
Minister
 
Posts: 2569
Founded: Dec 06, 2014
Left-Leaning College State

Postby Phydios » Tue May 28, 2019 8:46 pm

[violet] wrote:RMB Search is now reimplemented.

Thank you for being so quick- and improving the search function at the same time! There's years of discussion on our RMB, and I feared that finding old conversations would no longer be easy.
If you claim to be religious but don’t control your tongue, you are fooling yourself, and your religion is worthless. Pure and genuine religion in the sight of God the Father means caring for orphans and widows in their distress and refusing to let the world corrupt you. | Not everyone who calls out to me, ‘Lord! Lord!’ will enter the Kingdom of Heaven. Only those who actually do the will of my Father in heaven will enter. On judgment day many will say to me, ‘Lord! Lord! We prophesied in your name and cast out demons in your name and performed many miracles in your name.’ But I will reply, ‘I never knew you. Get away from me, you who break God’s laws.’
James 1:26-27, Matthew 7:21-23

User avatar
Trotterdam
Postmaster-General
 
Posts: 10541
Founded: Jan 12, 2012
Left-Leaning College State

Postby Trotterdam » Tue May 28, 2019 9:31 pm

I notice there's been a change in how multiple-word searches work.

Previously, a search for "aaaa bbbb cccc" would use an implied logical OR, so it would find posts that contain any one of those three words. To find only posts that include all three, you needed to type "+aaaa +bbbb +cccc".

Now, it appears to default to a logical AND, so "aaaa bbbb cccc" finds only posts that include all three words. I found through simple experimentation with formats used by other search engines that "OR" is simply treated as a search term rather than a logical operator, but "|" does work, so "aaaa | bbbb | cccc" finds all posts that include at least one of the words (in 0.00 seconds! yay).

I don't mind this, but it would be nice to have some documentation on which operators are implemented in the RMB search.

User avatar
Aclion
Negotiator
 
Posts: 6249
Founded: Apr 12, 2016
Ex-Nation

Postby Aclion » Tue May 28, 2019 10:01 pm

[violet] wrote:RMB Search is now reimplemented.

\o/
A popular Government, without popular information, or the means of acquiring it, is but a Prologue to a Farce or a Tragedy; or, perhaps both. - James Madison.

User avatar
[violet]
Executive Director
 
Posts: 16205
Founded: Antiquity

Postby [violet] » Wed May 29, 2019 12:18 am

Trotterdam wrote:I don't mind this, but it would be nice to have some documentation on which operators are implemented in the RMB search.

I haven't quite figured it out myself, but it should be either this or this. Maybe you could write up a nice dispatch!
Last edited by [violet] on Wed May 29, 2019 12:22 am, edited 1 time in total.

User avatar
Trotterdam
Postmaster-General
 
Posts: 10541
Founded: Jan 12, 2012
Left-Leaning College State

Postby Trotterdam » Wed May 29, 2019 2:29 am

[violet] wrote:
Trotterdam wrote:I don't mind this, but it would be nice to have some documentation on which operators are implemented in the RMB search.
I haven't quite figured it out myself, but it should be either this or this. Maybe you could write up a nice dispatch!
Looks like the latter. Almost everything on there seems to work, including some of the more obscure operators like ^, $, <<, ""~, and NEAR/, as well as the more important |, -, "", and ().

Although I don't understand the purpose of the = operator, since everything already seems to do exact matches anyway (a search for "cat" did not find a post with only "cats", a search for "Pokemon" did not find a post with only "Pokémon", or to use the manual's own example, a search for "runs" did not find a post with only "running" - I'm guessing that feature only works with a dictionary that NationStates doesn't have), or the MAYBE operator, since searching for x MAYBE y seems to do the same as just searching for x (maybe it affects priority when sorting by relevance?). Also the field stuff would be inapplicable since we don't actually have multiple fields, except the author field, which is treated separately on the search form.

SENTENCE and PARAGRAPH also don't seem to quite work reliably, even though they are recognized. I suppose there's not much call for those, though.

One feature we seem to have lost is partial word matches, as in trot* matching Trotterdam. Combined with only exact matches being found, that means you'd often need to type stuff like cat | cats if you're not sure of the exact form a word will be in.

Another minor nitpick is that entering an invalid search query (for example, -invalid, since a query must contain at least one positive term) gives "System Error (eval) at <date/time>." rather than a more informative error message.

Aside from that, everything works great! Thanks for implementing this.

User avatar
[violet]
Executive Director
 
Posts: 16205
Founded: Antiquity

Postby [violet] » Wed May 29, 2019 5:29 pm

Aha, thanks. I've created an RMB Search Help dispatch.

Trotterdam wrote:Although I don't understand the purpose of the = operator, since everything already seems to do exact matches anyway

Ah yes... that's probably for setups that have morphology enabled, which we don't. The search engine can attempt to reduce words down to stems and match on the root, but in my testing it often returned a lot of unrelated results, I think because we have a database full of invented words.
Last edited by [violet] on Wed May 29, 2019 5:29 pm, edited 1 time in total.

User avatar
Nakarisaune
Ambassador
 
Posts: 1760
Founded: Sep 17, 2011
Inoffensive Centrist Democracy

Postby Nakarisaune » Thu May 30, 2019 12:56 pm

When searching for something with more than 1000 results, the pagination only allows me to get to page 50 (981–1000) and there doesn't seem to be a way to find posts further back. Is this a bug or a limitation of the search system?
"Nakari won best WW player, awarded to the person who is best at lying." - Fratt

"I wanted you to see what real courage is, instead of getting the idea that courage is a point with a hundred endorsements. It's when you know you're licked before you begin, but you begin anyway and see it through no matter what."

User avatar
[violet]
Executive Director
 
Posts: 16205
Founded: Antiquity

Postby [violet] » Thu May 30, 2019 6:06 pm

Nakarisaune wrote:When searching for something with more than 1000 results, the pagination only allows me to get to page 50 (981–1000) and there doesn't seem to be a way to find posts further back. Is this a bug or a limitation of the search system?

The latter. I think the idea is that if you're getting that many hits, you should narrow your search terms, rather than start paging through thousands of posts.

Next

Advertisement

Remove ads

Return to Technical

Who is online

Users browsing this forum: Assassins BrotherHoodd, Athinya, Dremaur, Ebonhand, Elutherias, Ferneus, Havalland, Loveable Dogs, Opiachus, Phydios

Advertisement

Remove ads