Skip to content

Instantly share code, notes, and snippets.

View vintagewang's full-sized avatar

Xiaorui Wang vintagewang

View GitHub Profile
@vintagewang
vintagewang / os.sh
Created August 4, 2013 01:59
RocketMQ操作系统调优脚本
#!/bin/sh
#
# 此脚本只允许运行一次
#
echo 'vm.overcommit_memory=1' >> /etc/sysctl.conf
echo 'vm.min_free_kbytes=5000000' >> /etc/sysctl.conf
echo 'vm.drop_caches=1' >> /etc/sysctl.conf
echo 'vm.zone_reclaim_mode=0' >> /etc/sysctl.conf
/**
* Copyright (C) 2010-2013 Alibaba Group Holding Limited
*
* Licensed 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
*
* Unless required by applicable law or agreed to in writing, software
@vintagewang
vintagewang / eclipse.plug
Created October 10, 2012 15:12
Eclipse插件
http://mevenide.codehaus.org/release/eclipse/update/site.xml
@vintagewang
vintagewang / mmap.c
Created September 17, 2012 01:48
test linux virtual memory max size
/**
* $Id: mmap.cpp 1595 2012-07-28 10:33:18Z shijia.wxr $
*/
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include <sys/mman.h>
#include <sys/types.h>
#include <sys/stat.h>
#include <fcntl.h>