Steemit Engineering Update: Condenser Split & Mira

in steem •  6 years ago 

Hello Steemians, in an effort to keep you informed, we are continuing to provide updates about the different projects we’re working on. Our engineering teams follow a 2-week-sprint cadence, so some of our updates will be more substantive than others. You can view our last engineering update here.

Condenser/Wallet Split

We are nearly done with Stage 1 of the Condenser split. A wallet-only app will be launched at a separate domain. On the Social app we will implement a warning dialog for when the user attempts to log in with anything other than their Posting Key. This is in preparation for restrictions that will coincide with the removal of wallet functionality from the Social app and will disallow logging in with the Master Password entirely. To learn more about your Private Keys and how to use them properly, check out our recent post.

There is additional work to be done after this, specifically relating to improving user experience and security, but when the final stage goes live it will be extremely exciting as the two dedicated apps will be more secure and cost much less to run than the old Condenser while enabling us to add new functionalities more rapidly.

Cost Reductions

We're still on the path to adjusting instance sizes and tuning auto scaling for all applications. In the process of performing this task for Jussi we discovered that a relatively large portion of our data transfer costs are coming from inefficient 3rd party applications and bots. We have a short term plan that will mitigate the worst offenders and then we can continue adjusting instance sizes and autoscaling for Jussi along with the rest of our applications. These changes should not impact 99% of applications that utilize api.steemit.com, and the few that it does can likely solve their problem by requesting data that does not change frequently.

Mira/RocksDB

We would like to share a little more about the process that we are using to optimize Mira. We are iteratively profiling the steemd reindex to identify slow spots that we can further optimize. When we started this process, we were only reindexing the first 500,000 blocks and that took several minutes. We were able to optimize some low hanging fruit which has allowed us to reindex more of the blockchain and profile that performance. The tricky thing that we are running into now is that some performance optimizations result in increased performance over some blocks, but a decrease for others because the workload of the blockchain is not static.

A great example of this is a slowdown that we observed last week around block 19,000,000. For whatever reason, reindex performance ground to a halt and was averaging one block every 1.15 seconds. That is not acceptable for live performance, and is horrendous while reindexing. The volume and/or types of operations happening on the blockchain changed around that time which resulted in a degradation of performance. Upon investigation we found that some common queries such as, "What is the next comment that is going to be rewarded?" were taking far too long and consuming nearly all of our runtime. We decided to implement a system that caches the first key in an index so that queries like the one above are quicker to answer. You can find the commit that introduced this optimization here.

When we reindexed with that change, we got to block 19 million in record time for Mira, (18 hours) and have been able to progress beyond block 19 million at a rate of approximately one block every 0.012s! Previously we were reindexing up to blocks 500,000 and 2,000,000. With this change, our reindex time to 500,000 was slightly slower, if it changed at all. For 2,000,000 blocks it represented an increase of less than 1%, but for the longer reindex we have observed a performance increase of over 9000%!

This outlines the primary challenge still ahead of us as we continue to optimize Mira. Because our largest gains are only realized on longer reindex times, there is an inherent latency in identifying and optimizing slow downs. We have a small handful of problems that we are actively working to optimize while we continue to identify the next targets for optimization. While there is still much work to be done, we are getting tantalizingly close to running a live steemd node on Mira.

As you can see from this update, one of the unique challenges we face as a team is that our attention is divided between cutting-edge blockchain work, and cutting-edge front-end development work. Most, if not all, of these challenges are a consequence of the unparalleled traffic (in the blockchain sector) that is generated by steemit.com and the ecosystem of Steem apps. While this certainly makes our jobs more challenging, we believe it is our willingness to tackle these challenges head on that has enabled us to remain years ahead of the competition.

Be sure to follow @steemitblog if you would like to see more engineering updates like these!

The Steemit Team

Authors get paid when people like you upvote their post.
If you enjoyed what you read here, create your account today and start earning FREE STEEM!
Sort Order:  

I am really happy to see the steemit team now going to substantion work. This update provides a very good insight into parts of your work and solutions you are offering. Keep up this work and you can make steem a great project!
Also like the DBZ reference xD

I love you guys for using the DBZ meme.

I regret they didnt use it as the thumbnail tho

Lol same here

Posted using Partiko Android

I continue to be impressed by the dramatic blockchain engineering improvements that Steemit Inc is coming out with.
The crisis has focused you on your most important function and you are doing it really well now.
Thank you and keep it the good work!

Posted using Partiko iOS

  ·  6 years ago (edited)

Well written, much appreciated.
Certainly much progress and great POW.

Looking forward to understanding the potential of SMT.

Check out SteemSpeak today, it was a riot! And Ackza is such an inventor, I think he speced out 3 different new DAPPS today.

He is right when he says, the organization needs to be more of a "incubator format" and that's not to say there is any lack of results. More, it's chaotic and could be roadmapped so much more rationally for the "Next 100 DAPPS on the STEEM Blockchain" or whatever.

ReSteemed

Hey guys, thanks for an update. You're doing a very important job now. Hopefully everything will work out great and we'll have a badass low consuming scalable high performing blockchain. Keep it up.

By the way, wanted to know if there will be any changes to your api sometime soon?

I assume the split will make some changes, just wanted to make sure people are aware of them. I'm currently creating a fresh steem explorer with a full focus on dapps, so if there's something that will soon change in a way you handle requests and display data, would like to know.

I'm not sure why you want to remove the wallet functionality from the social app, it's just going to be a pain in the ass for no reason and ultimately end up forcing us to trust third-party extensions to accomplish what we can already do on steemit.

That's my only concern with this post.

You are not understanding it right, the wallet will continue working and for you as a user the difference will be small. Mainly in the backend they will be separate.

oh ok. I thought it was also on the frontend.

Nice update. Congratulations on your optimization.

Would you guys ever consider having someone do tutorial style posts on the Steem code base, teaching people who have an understanding of programming how sections of the code work, and why you chose to do things certain ways?

I'm so happy you've managed to reindex the lowhanging fruit, profile-optimized each 3rd party code flip, and mitigated transfer application functionality!!
But for the small portion of Steem's user base that are merely simple content-creators, what does this technobabble mean? Is it anything we need to be aware of? If not, why is it forced into my feed? If so, can you please rephrase in common English?

Good update, does this have anything to do with what happened yesterday?

Posted using Partiko Android

What happened yesterday? (thunder sound)

Laggy network

Posted using Partiko Android

Excellent work.

we have observed a performance increase of over 9000%!

For me this shows the uncharted that we are in the efforts required to attempt something for the first time. Keep up the good work M* and S*

first

rip

Ahaha, acidyo faster! :D

Update much appreciated. Keep up the good work!

Posted using Partiko Android

Let’s get that SMT’s up and running 😀

Posted using Partiko iOS

Will nodes be able to differentiate between innefficiant programs and high-workload programs?

Posted using Partiko Android

Thx for the update, it is really amazing that the Steem blockchain can handle this amount of traffic 👍

  ·  6 years ago 

Great updates! Nice to see ongoing development

Thank you for the updates.

It's great to see these updates. It installs confidence and breeds positivity!

Wow! A 9000% increase in performance is outstanding. I commend you on effective and substantial results from your work to improve Steem.

Great job!

  ·  6 years ago (edited)

We appreciate you take a slice of your limited time to keep us updated on progress! Thank you!

api.steemjs.com doesn't work now.

That one is not run by Steemit, we run api.steemit.com though - which MANY Steem applications rely on.

Is there any Rest API, directly use by web browser?

You got me at over 9000!

Posted using Partiko Android

Thanks for the continued communication and progress towards making a more sustainable ecosystem for us to enjoy and builld upon!

Posted using Partiko iOS