-XX:NativeMemoryTracking=detail
jps
ps -p <PID> -o pcpu,rss,size,vsize
Build times for Apache Hive master on my Mac Book Pro | |
# No source code changes (first build not considered as mvn will download all dependencies and cache it locally) | |
# Base: Clean offline quite build | |
$ time mvn clean install -DskipTests -o -q | |
real 3m9.005s | |
user 7m14.864s | |
sys 0m40.295s |
Notes to make IR shield (made by LinkSprite) work in Raspberry Pi 3 (bought from Amazon [1]). | |
The vendor has some documentation [2] but that is not complete and sufficient for Raspbian Stretch. | |
Following are the changes that I made to make it work. | |
$ sudo apt-get update | |
$ sudo apt-get install lirc | |
# Add the following lines to /etc/modules file | |
lirc_dev | |
lirc_rpi gpio_in_pin=18 gpio_out_pin=17 |
import json | |
import os,sys | |
class ATSFile(object): | |
def __init__(self, name): | |
self.data = json.load(open(name)) | |
self.name = name | |
def dump(self): | |
if "hive_query_id" in self.data: | |
info = self.data["hive_query_id"]["otherinfo"] |
$ cat .git/config | |
[core] | |
repositoryformatversion = 0 | |
filemode = true | |
bare = false | |
logallrefupdates = true | |
ignorecase = true | |
precomposeunicode = true | |
[remote "origin"] | |
url = https://git-wip-us.apache.org/repos/asf/orc.git |
These are tunings from https://github.com/basho/leveldb | |
Video: https://www.youtube.com/watch?v=vo88IdglU_8 | |
https://github.com/google/leveldb/blob/master/include/leveldb/options.h#L83 | |
- write buffer size - default 4MB (increase this for higher performance) (try 10x or 100x will get 72% performance) | |
https://github.com/google/leveldb/blob/master/db/skiplist.h#L98 | |
- if increasing write buffer size, also increase skip list max height. Since skip list is probabilistic, | |
expected number of keys in write buffer has to specified ahead. (change it from 2^12 to 2^17, affects read and write performance) |
# PDSH Usage | |
export PDSH_SSH_ARGS_APPEND="-q -o StrictHostKeyChecking=no -o UserKnownHostsFile=/dev/null -i ~/.ssh/private.key" | |
pdsh -R ssh -w ^slaves.txt | |
# parallel-ssh Usage | |
parallel-ssh -x "-oStrictHostKeyChecking=no -i ~/.ssh/private.key" -i -h slaves.txt "sudo -u root jps | grep "LlapDaemon" | cut -f1 -d' '" | |
# remote heap-dump | |
# Add the following contents to jcmds.sh and use parallel-scp to copy the script to all hosts | |
#!/bin/bash |
-- hot reload init.lua script | |
function reloadConfig(files) | |
doReload = false | |
for _,file in pairs(files) do | |
if file:sub(-4) == ".lua" then | |
doReload = true | |
end | |
end | |
if doReload then | |
hs.reload() |
set vpn_name to "'VPN_NAME'" | |
tell application "System Events" | |
set rc to do shell script "scutil --nc status " & vpn_name | |
if rc starts with "Connected" then | |
do shell script "scutil --nc stop " & vpn_name | |
else | |
-- get current clipboard contents as a string | |
set CurrentClipboard to the clipboard as string | |
# Licensed to the Apache Software Foundation (ASF) under one | |
# or more contributor license agreements. See the NOTICE file | |
# distributed with this work for additional information | |
# regarding copyright ownership. The ASF licenses this file | |
# to you under the Apache License, Version 2.0 (the | |
# "License"); you may not use this file except in compliance | |
# with the License. You may obtain a copy of the License at | |
# | |
# http://www.apache.org/licenses/LICENSE-2.0 | |
# |