Livepeer GPU Miner Update

Eric Tang
Livepeer
Published in
3 min readOct 4, 2019
Test Miner at the Livepeer Office

A key component for the upcoming Livepeer Streamflow update is new software that allows GPU crypto miners to concurrently run the Livepeer video transcoding software. The video transcoding software takes advantage of the idle video processing ASICs on most commercial GPUs, thus effectively transcodes video while causing minimal disruption to the GPU’s hashrate. This enables GPU miners to participate in the Livepeer network without any additional capital expenditure and dramatically increases the reliability and affordability for the Livepeer network. Since our initial research, the engineering team has made significant progress towards this goal. We would like to share some initial benchmarking results with the Livepeer community.

Hardware Spec

To test the software performance, we built a basic test mining rig with the following spec:

GPU: 1xNvidia 1080ti (Pascal encoder/decoder)
GPU Connection: PCIE
CPU: Intel Pentium 3.1GHz
RAM: 16GB

Note that we used a single GPU card. Usually miners can fit 6–12 GPU cards per node. The Livepeer software can do basic load balancing across multiple GPU cards on the same node, but the optimal load balancing mechanism remains an active area of research.

Performance Baseline

Before benchmarking, we established our performance baseline by running a live stream transcoding task without also running the mining software. The transcoding task is from a 720p 24fps input video to a {720p 30fps, 360p 30fps, 240p 30fps} multi-bitrate output video. We used H264 as the video codec and HLS as the video communication protocol. This is a common setting for live streaming on the web today.

Baseline Transcoding Performance For a Single 1080ti GPU

We can see in the performance baseline, that the software running on a 1080ti starts to drop video segments when attempting to transcode more than four concurrent streams.

Benchmark

The first benchmark we attempted is simulating an HD live video transcoding workflow while running Ethminer. In this workflow, a live video stream is segmented into 4-second video segments. These segments are streamed into the transcoder in real-time while the mining rig is running Ethminer in a separate process. As we can see from the test result, there is minimal disruption to the hashrate. This is because the GPU can do mining and transcoding on separate resources, thus causing very little resource sharing between the mining and transcoding process.

Benchmarking result for HD live transcoding + Ethminer

Note we really only care about results with input streams less than 4 because the transcoding tasks start to drop segments after 4 concurrent streams. But it’s nice to see hashrate disruption increases linearly even after 4 concurrent streams.

Load Testing

After getting this preliminary result, we wanted to know how much we can push the GPUs. So instead of simulating a live transcoding workflow, we fed video as quickly as possible to the GPUs, aiming to utilize 100% of the transcoding capacity. The results we got shows under full video transcoding load, the hashrate remains at around 80%. We suspect the 20% reduction in hashrate is due to a combination of software factors such as the driver serializing the jobs, and hardware factors like resource sharing on the memory and I/O of the GPU. Note that our benchmarking setup is quite naive — running the video transcoding and mining tasks as separate processes and completely relying on the driver to determine resource allocation.

We also observed an interesting behavior — the power consumption went down slightly when mining and transcoding happened simultaneously. We suspect this is due to lower overall GPU utilization caused by serialization across mining & transcoding jobs, and see this as a hint for future improvement in the transcoding / mining software.

Conclusion

Building a decentralized video transcoding network is an ambitious undertaking. We have observed some encouraging data around the video mining opportunity, but clearly there is still much more work to be done. We encourage the community to help us benchmark in their own environment following these instructions, and we would love to hear your feedback in our Discord channel or on the Livepeer forum.

If you would like to follow our progress with video mining, or would like to learn more about participating as a video miner, please sign up to the Livepeer transcoder mailing list.

Special thanks to Michael Ira Krufky for the benchmarking work, Josh Allmann for authoring much of the transcoding software, and many other Livepeer engineering team members for their contribution.

--

--

Eric Tang
Livepeer

Engineer +Entrepreneur, Building Livepeer. Previously CTO @wildcard. @carnegiemellon alum.