I saw in some places that Scrypt uses a lot of memory, therefore a good supply of system RAM is needed to hash with it. however, I saw in other places stating that is ONLY uses L2 Memory. which one does it use?

2 Answers 2


The amount of memory that scrypt uses can be adjusted to get the desired behavior. If a particular CPU has enough L2 memory to hold all that's needed for a particular scrypt use case, then the performance of system memory will not be relevant. Scrypt-based coins can increase the memory requirements dynamically as one way of increasing the mining difficulty.


Litecoin use scrypt with 128 KB of memory (source), therefore it can be stored in the CPU cache.

Scrypt is a sequential memory-hard hash function. You can tell it, how much memory it should use to generate a hash. You can even tell it to use GBs, in fact. The problem is, you always need that much memory to verify a hash. This will make hardware very expensive and the generation rate will be much lower.

  • in my experience it seems to run out of memory only when the GPU does, so it doesn't seem to be using the system RAM(I can tell because the limit is higher for some GPUs than others, even with the same amount of system ram)
    – ZCoder
    Jan 9, 2014 at 21:47
  • Litecoin uses low scrypt parameters to allow clients to verify the computed result fast enough. In case of proof-of-work cryptocurrency, all clients need to be able to verify the proof of work and if scrypt were used with high parameter values, that verification would be too costly. Jul 6, 2018 at 11:35

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.