Big_Boys_Mother wrote:
What I have noticed is upon revisit of a thread, the total number of "views" documented, does not increase, as previously.
When a particular thread is "viewed" by the same participant, the number of views remains stagnant (the same). Hence, this gives MV the actual number of "real viewers." Using the word, HENCE, again, gives MV, the actual number of real users!??
It's a bit subtler than that, but you're right in that it is a relatively recent change in behavior.
When I switched to the new database, I was alarmed at how much write IO was happening. MV's usage model
should be read-heavy, with occasional writes for the occasional post, plus statistics and such. It was the opposite -- much more write operations than read operations. Worse, the SSD storage limits how many total IOPS I can have in a given period of time, and we were definitely pushing the boundaries of usage.
Digging in to some of the neglected innards of the forum software, I first started (as one does) with low-hanging fruit. Every time someone views a thread, it was writing to the database to increment the number of views. I didn't want to give up that functionality, but with all the search engines hammering the site, that was bound to be responsible for a lot of the write operations. So I created a mechanism whereby all the topic views are tallied up in a memory-based table, and then added to the "real" on-disk table every 5 minutes. Every successive view will still be added to the table, but not in real-time.
There were other performance involving memory-based tables, too. The problem with this kind of table is that if the database CPU goes down, all the information in the table is lost. So really, you can only put information in one of those tables that you don't mind losing. Every session record is in one of those tables, which would at worst require everyone to log in if the CPU went down. Hourly statistics are in a memory table as well, as we can certainly afford to lose one hour's worth of statistics.
The rest of the optimizations (all of which happened over a three-week period) were just basic database optimizations that happened to reduce the number of write ops. And eventually, I got the write ops down to the point where I felt it was stable and acceptable.