Giter Club home page Giter Club logo

Comments (11)

iamsmooth avatar iamsmooth commented on July 26, 2024 5

Switching to Monero's LMDB is already in progress.

from aeon-legacy.

jtgrassie avatar jtgrassie commented on July 26, 2024 1

@iamsmooth is there a repo somewhere with the work in progress? I'm happy to help.

from aeon-legacy.

lisergey avatar lisergey commented on July 26, 2024

The impact is also that during saving to disk aeond doesn't respond to stratum-protol software, so miners get "pool is not responding", and that could be for up to several minutes. With big hashrate that is loss of income. Then, with eventual increase of chain length, it would be more and more demanding and devastating.

This 'feature' would impose a requirement for pools to run at least two nodes independently and keep care to run saving to disk at non-intersecting time. That's excessive burdensome.

Is it possible to make periodic "chekpoints" so that everything below that block is pushed out of memory? Thus keeping only last thousand or two blocks?
When comes a request to use all the chain, fork a separate process with minimal priority (and possible own cpu- and io- limits imposed by operating system) and do read-calculate-store in it?

from aeon-legacy.

jtgrassie avatar jtgrassie commented on July 26, 2024

The problem with current saving is that the whole chain is in-memory. Then when it's saved, the whole object is serialized and saved to a temp file which is then moved to the final destination. This whole process is slow and resource intensive.

Your periodic 'checkpoints' idea I think would require a fair amount of work but certainly another option for debate. I do like the idea of not having to hold the whole thing in memory.

Using a memory mapped file for the blockchain could solve both issues as it does address the loading and saving of very large files more efficiently. Boost has portable versions too which would work with the current serialization.

from aeon-legacy.

lisergey avatar lisergey commented on July 26, 2024

Why not to leave memory-specific issues to Operating System? It has really very good optimizations and could benefit from IO-operations with big cache, asynchronous reads/writes and so on and so on.
From sysadmin perspective, if aeond needs 'a quick file', then to speedup one could move it to SSD- or NVMe- storage, or to memory-mapped filesystem. That really works very fast.
Then aeond should just effectively read-write to a large file, and the rest takes care the OS.

from aeon-legacy.

lisergey avatar lisergey commented on July 26, 2024

Also, with this approach a sysadmin could get more metrics from filesystem to do bottleneck analysis, and measurably throw resources at it, comparing to a process which reads/writes to just vram.

BTW, if an OS decides that some pages in memory are not often necessary, it pushes them to swap.
Then all the program-side optimizations get ruined.
Instead, if the process just reads and writes to a file, the OS could speed up alot with its IO-cache, and not swapping the memory pages of a process.

from aeon-legacy.

jtgrassie avatar jtgrassie commented on July 26, 2024

Why not to leave memory-specific issues to Operating System?

Well that's the current implementation and that's the problem.

if an OS decides that some pages in memory are not often necessary, it pushes them to swap.

Again. Same issue. It's all slow.

Instead, if the process just reads and writes to a file, the OS could speed up alot with its IO-cache, and not swapping the memory pages of a process.

And that's where a memory mapped file could help, or refactoring to use something like LMDB or your 'checkpoints' suggestion and only loading what's needed in memory at any given operation.

Requirements will always require whole blockchain on disk and at least some, if not all, in memory at any given time. The question is what's the most efficient way to meet these requirements without a huge overhead on the system and causing other issues.

from aeon-legacy.

lisergey avatar lisergey commented on July 26, 2024

I do see that RDBMS like PostgreSQL can handle very sophisticated operations on large amount of data, obviously not placing it in memory as a whole thing. And relatively quick, and without blocking everything else from normal work.

I believe that these io-speed and data size bottleneck could be solved by invoking corresponding algorithms. To seek those, we need clarity in bottleneck sources, that is why @jtgrassie, would you please describe in more detail the algorithm of current saving the blockchain implementation?

from aeon-legacy.

wishmerhill avatar wishmerhill commented on July 26, 2024

Hi. I just installed AEON on an old but well working machine: I really can't use it as downloading the blockchain to memory makes my computer useless.

from aeon-legacy.

DeltaManiac avatar DeltaManiac commented on July 26, 2024

@iamsmooth me too

from aeon-legacy.

aeonix avatar aeonix commented on July 26, 2024

Bounty open and discussed on reddit and bitcointalk thread

from aeon-legacy.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.