📜 ⬆️ ⬇️

Results: which is stronger - assembler or habraeffekt?

Passions otshumeli after my first article on Habré.


The topic was about the web site on the assembler, so there is nothing surprising in the number of comments to the article, as well as in Habraeffect on the site. During the first few days, thousands of people visited the AsmBB demo site.


The site has already been once under a similar influx of visitors - when in August someone posted a link to the site simultaneously on Twitter, FB and Reddit.


But, judging by the visitor counter, Habrahabr was twice as bad as the bourgeois sites, and this time the demo site was loaded significantly more than last time.


As expected, the miracle happened. Despite the fact that hosting is extremely weak (I took it on purpose), despite the fact that the site uses a SQLite database, which everyone thinks is very slow, the forum did not fall. He didn't even slow down. All the time the site worked properly and served all visitors.


Let's see how the Habraeffect looks from the inside:


Visitor statistics


The article on Habré was published on January 2nd. For those several days while Habraeffekt lasted, she was viewed about 40,000 times. A number of people who read the article have also visited the AsmBB demo. These visits look like this:


dateVisitorsPagesRequestsTrafficTime
CPU [s]
Time obs.
reservations [ms]
02 Jan63744611222463.06 MB15212.43
03 Jan54023645384876385.48 MB7959.37
04 Jan19611453133445171.60 MB3259.72
05 Jan74352201250453.17 MB17013.6
Jan 063432370542123.21 MB6912.73
In total908663035148470696.52 MB

Visitors and request


From the load curve of the CPU, it can be seen that the website was about half full on January 3rd. That is, it could serve approximately 180,000 requests or 12,000 visitors per day before the server started to blunt due to restrictions on the CPU.


In peak traffic, the web server (Apache) ran no more than 6 FastCGI forum processes. This means 6 simultaneous connections to the database.


SQLite, despite the pessimistic opinions in the comments, behaved perfectly all the time, especially without slowing down. While the forum engine actively writes to the database, not only when visitors publish posts, but also when they only read. There is a statistics visit, there is a counter for each post, for each guest or user, the time of the last activity is recorded. All this is constantly written to the database.


SQLite settings are:


PRAGMA journal_mode = WAL; PRAGMA foreign_keys = TRUE; PRAGMA synchronous = OFF; PRAGMA threads = 2; PRAGMA secure_delete = FALSE; 

Visitors


Quite expectedly, visitors were 90% from Russia, Ukraine and Belarus.


I should note that these visitors were much more active and involved than Westerners. I really liked it, because it helped test the site not only for speed, but also for code flaws. During the Habraeffect and discussion of the article, several bugs were identified and fixed, including critical ones.


32 new users have registered, who have written dozens of posts, trying to test the forum for strength.


Thanks guys! You really helped.


Here and the list of corrections which have been made during Habraeffekta. There are not only bug fixes, but also new features:


  1. Error causing exception
  2. XSS vulnerability and another error causing an exception
  3. Error in caching client-side avatars
  4. HTML caching

Regarding clause 4, I have to say that I decided to make this function, measuring the implementation time, as proof that the code in assembler is much easier to maintain than it is considered.


The implementation time is exactly 78 minutes. Perhaps this is somewhat more than the JAVA, but still quite a normal result.


findings


And draw your own conclusions.




Thanks gearbox for editing assistance.


')

Source: https://habr.com/ru/post/319028/


All Articles