Code Monkey home page Code Monkey logo

cg_obup's Introduction

#CG_OBUP

Build Status

This is the CryptoGuru Optimized BURSTcoin Plotter - a BURST coin plotter that generates optimized plot files without the need to run an optimizer after plotting.

It is intended to work on any UNIX system with a sufficiently sane filesystem (able to pre-allocate space), but for now only Linux has been tested. 64bit only!

dcct -> mdcct -> omdcct -> cg_obup

This version has some heritage and several people worked on the code base until the result was what you see here.

Markus Tervooren <[email protected]>           (BURST-R5LP-KEL9-UYLG-GFG6T)
Cerr Janror <[email protected]>           (BURST-LNVN-5M4L-S9KP-H5AAC)
Niksa Franceschi <[email protected]> (BURST-RQW7-3HNW-627D-3GAEV)
a.k.a Mirkic7 <[email protected]>
Peter Kristolaitis <[email protected]>       (BURST-WQ52-PUBY-N9WB-6J3DY)
Brynjar Eide <[email protected]>            (BURST-5WLT-TP7V-6B7S-CZRQP)
Jake-B (MacOS Build)                          (BURST-ZGEK-VQ86-M9FV-7SDWY)

and finally

rico666 [email protected] (Don't donate)

Installing

git clone https://github.com/rico666/cg_obup
cd cg_obup
make

Usage:

./plot64 -k KEY [-x <core>] [-d <dir>] [-s <startnonce>] [-n <nonces>] [-m <staggersize>] [-t <threads>] [-a]
  -a
    Flag to use asynchronous writing mode. If this is set, the plotter can work
    even while data is being written to disk. It will give you more speed at the
    cost of more memory usage (will use double the memory!). Default is OFF.

  -b <maxmemory>
    Maximum amount of memory to use. Will automatically be halved when used in
    combination with -a.

  -R
    Resume from last position in an existing plot file.
    IMPORTANT: The plot file has to be created with the resume option to make resume work!
               Don't use the resume option if the plot file was created without the resume option!

  -d <directory>
    Which directory to use. You can give relative as well as absolute paths.
    If you omit this, plots are written into the 'plots' directory in the
    current path.

  -f <diskspace>
    When -n is not specified, leave this much disk space while calculating number
    of nonces to plot.

  -m <staggersize>
    In this version, you can think of this as the memory cache used by the program
    before a write to the disk is necessary. Obviously the more you give here, the
    less I/O is necessary. If not given, the program tries to use 80% of the free
    memory of the machine. Please be aware that in combination with the -a parameter
    the memory requirement is doubled!

  -n <nonces|spacedef>
    The number of nonces to plot. Each nonce is 256KB in size. If you do not
    give the number of nonces, the program will try to plot the maximum number
    of nonces that are possible according to the free disk space where
    <directory> resides.

  -p <plotfilesize>
    Attempt to create a plot file of this size. May not be combined with -n, since
    the amount of nonces will be calculated from the file size.

  -s <startnonce>
    The offset from which to start plotting nonces. If not given, the program will
    simply choose an offset randomly.

  -t <threads>
    Number of threads to use when plotting. There is no "more is better".
    Depending on the number of physical cores of your CPU, and the core
    (see below) used, there will be an optimum. Probably the number of physical
    cores your CPU has.

  -v
    Verbose mode.
    
  -x <core>
    Define which SHABAL256 hashing core to use. Possible values are:
      0 - default core (*)
      1 - SSE4 core
      2 - AVX2 core
    Of course, SSE4 and AVX2 will work only on CPU architectures supporting
    these instruction sets. Otherwise the program will throw an "illegal instruction"
    error. You can assume a roughly 2x speed increase default->SSE4->AVX2 with
    AVX2 being roughly 4x faster than default. See also "Notes" below!
Notes

Calling the program with wrong or incomplete command line, will print a rudimentary usage information.

The file name will have a '.plotting' suffix while the file is incomplete, and then renamed to the standard format if plotting is successful.

AVX2/SSE4 usage: In order to achieve best performance, you must make sure that the number of nonces to plot will match the number of threads like this:

  • for SSE4: nonces is a multiple of threads * 4
  • for AVX2: nonces is a multiple of threads * 8

If you do not match these numbers, the plotter will refuse to work for SSE4 and AVX2 cores, the default core will work on any arbitrary number of nonces.

For <startnonce>, <staggersize>, <nonces>, <maxmemory>, <plotfilesize> and <diskspace> you can either define just a number or add the T/t, G/g, M/m or K/k suffix. E.g. "-s 1234k"

  • K/k = 1024
  • M/m = 10242
  • G/g = 10243
  • T/t = 10244 in which case the definitions for <staggersize> and <nonces> are not the number of nonces, but the memory used.

Tuning tipps for ext4 users:

If your drive only contains plot files then following tuning options are recommended. Execute the following command on unmounted partitions.

  1. Disable journal. Improves plot performance and is not needed when mining:

tune2fs -O ^has_journal /dev/sdX

  1. Disable reserved blocks for root (gives you 5% more disk space):

tune2fs -m 0 /dev/sdX

  1. To be sure the file system is clean:

fsck /dev/sdX

  1. Adjust mount options for further tuning:

UUID=<UUID> <mount-point> ext4 defaults,x-gvfs-show,noatime,nodiratime,nobarrier 0 2

When mining it is recommended to add the option ro to avoid sudden damages of the file system.

TODO:

  • thorough test suite
  • optimizations

cg_obup's People

Contributors

rico666 avatar jake-b avatar brynjare avatar brmmm3 avatar spebern avatar kristian-popov avatar

Watchers

James Cloos avatar  avatar

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.