Skip to content

Instantly share code, notes, and snippets.

View shmsr's full-sized avatar
👟
doot doo doo

subham sarkar shmsr

👟
doot doo doo
View GitHub Profile

Keybase proof

I hereby claim:

  • I am shmsr on github.
  • I am xdsarkar (https://keybase.io/xdsarkar) on keybase.
  • I have a public key ASDaD29fTUAHuGJCcLdJvhQcxwChaJL8vBnsO_WPg_BLtwo

To claim this, I am signing this object:

@shmsr
shmsr / flock.go
Created November 12, 2020 18:03 — forked from karrick/flock.go
Examples of using advisory locking with golang.org/x/sys/unix
// These funcitons ought to come with a huge warning. Using them without
// understanding the differences between blocking and non-blocking, or
// between exclusive and shared access, and when to use them will cause
// problems that do not necessarily manifest right away, but rather
// fester in your program and rear their ugly head in the middle of the
// night when you're sleeping.
//
// If you use advisory file locking, *always* use Shared locking every
// single time you read the file, and *always* use Exclusive locking every
// single time you write the file. Period. There are no exceptions. Heed
@shmsr
shmsr / benchmark-commands.txt
Created April 28, 2020 09:37 — forked from jkreps/benchmark-commands.txt
Kafka Benchmark Commands
Producer
Setup
bin/kafka-topics.sh --zookeeper esv4-hcl197.grid.linkedin.com:2181 --create --topic test-rep-one --partitions 6 --replication-factor 1
bin/kafka-topics.sh --zookeeper esv4-hcl197.grid.linkedin.com:2181 --create --topic test --partitions 6 --replication-factor 3
Single thread, no replication
bin/kafka-run-class.sh org.apache.kafka.clients.tools.ProducerPerformance test7 50000000 100 -1 acks=1 bootstrap.servers=esv4-hcl198.grid.linkedin.com:9092 buffer.memory=67108864 batch.size=8196