Skip to content

Instantly share code, notes, and snippets.

View tominal's full-sized avatar
👨‍💻
Creating stuff

tom tominal

👨‍💻
Creating stuff
View GitHub Profile
@zrruziev
zrruziev / NUMA node problem.md
Last active June 24, 2024 12:42
Fixing "successful NUMA node read from SysFS had negative value (-1), but there must be at least one NUMA node, so returning NUMA node zero" problem

What is NUMA (Non-Uniformed Memory Access)

Non-Uniform Memory Access (NUMA) is one of the computer memory design methods used in multiprocessor systems, and the time to access the memory varies depending on the relative position between the memory and the processor. In the NUMA architecture, when a processor accesses its local memory, it is faster than when it accesses the remote memory. Remote memory refers to memory that is connected to another processor, and local memory refers to memory that is connected to its own processor. In other words, it is a technology to increase memory access efficiency while using multiple processors on one motherboard. When a specific processor runs out of memory, it monopolizes the bus by itself, so other processors have to play. , and designate 'access only here', and call it a NUMA node.

1. Check Nodes

lspci | grep -i nvidia
  
01:00.0 VGA compatible controller: NVIDIA Corporation TU106 [GeForce RTX 2060 12GB] (rev a1)
@rahulhaque
rahulhaque / CustomWebsocketOneController.php
Created June 25, 2020 10:56
Ratchet Websocket Server Routing Example Laravel
<?php
namespace App\Http\Controllers;
use Ratchet\ConnectionInterface;
use Ratchet\WebSocket\MessageComponentInterface;
use React\EventLoop\LoopInterface;
use SplObjectStorage;
class CustomWebsocketOneController implements MessageComponentInterface
@amiantos
amiantos / index.js
Last active July 9, 2024 14:52
Zip Multiple Files from S3 using AWS Lambda Function
// Lambda S3 Zipper
// http://amiantos.net/zip-multiple-files-on-aws-s3/
//
// Accepts a bundle of data in the format...
// {
// "bucket": "your-bucket",
// "destination_key": "zips/test.zip",
// "files": [
// {
// "uri": "...", (options: S3 file key or URL)
// step 1 install java
sudo add-apt-repository ppa:webupd8team/java
sudo apt-get update
sudo apt-get install oracle-java7-installer
sudo npm install java --save
// step 2 using
var java = require("java");
var jarfile = "jarfileName.jar";
java.classpath.push(jarPath);