Skip to content

Instantly share code, notes, and snippets.

View jserviceorg's full-sized avatar

Juergen Gotteswinter jserviceorg

  • Regensburg - DE
View GitHub Profile
@jserviceorg
jserviceorg / sd.conf
Created June 27, 2017 13:56
illumos -> openindiana, omnios, smartos etc sd.conf for 4k drives
sd-config-list=
"*", "retries-timeout:1,retries-busy:1,retries-reset:1,retries-victim:2,physical-block-size=4096",
"DELL PERC H710", "cache-nonvolatile:true",
"DELL PERC H700", "cache-nonvolatile:true",
"DELL PERC/6i", "cache-nonvolatile:true",
"DELL PERC H200", "cache-nonvolatile:true, power-condition:false";
@jserviceorg
jserviceorg / gist:e8479c6cc1b485cacf21682ebb22bd27
Last active November 16, 2017 20:46
Freebsd Xen Dom0 Patch - Bootloop Problem pvh disabling due to errata
Patch against emulation/xen-kernel (tested with 4.8)
diff --git a/xen/arch/x86/hvm/io.c b/xen/arch/x86/hvm/io.c
index 68fb890..b2f1ce4 100644
--- a/xen/arch/x86/hvm/io.c
+++ b/xen/arch/x86/hvm/io.c
@@ -84,8 +84,6 @@ int handle_mmio(void)
struct hvm_vcpu_io *vio = &curr->arch.hvm_vcpu.hvm_io;
int rc;
@jserviceorg
jserviceorg / xml
Created November 15, 2017 19:07
smartos varnish smf
<?xml version='1.0'?>
<!DOCTYPE service_bundle SYSTEM '/usr/share/lib/xml/dtd/service_bundle.dtd.1'>
<service_bundle type='manifest' name='export'>
<service name='network/varnish' type='service' version='0'>
<create_default_instance enabled='true'/>
<single_instance/>
<dependency name='network' grouping='require_all' restart_on='error' type='service'>
<service_fmri value='svc:/milestone/network:default'/>
</dependency>
<dependency name='filesystem' grouping='require_all' restart_on='error' type='service'>
@jserviceorg
jserviceorg / gist:32349f4c182b7724dcee0efa08615187
Created November 16, 2017 11:30
Identify Disk Devicenames for sd.conf on Illumos, Openindiana, SmartOS & Omnios
echo "::walk sd_state | ::grep '.!=0' | ::print struct sd_lun un_sd | \
::print struct scsi_device sd_inq | ::print struct scsi_inquiry \
inq_vid inq_pid" | mdb -k
### Use next-gen MRSAS drivers in place of MFI for device supporting it
# This solve lot's of [mfi] COMMAND 0x... TIMEOUT AFTER ## SECONDS
hw.mfi.mrsas_enable="1"
### Tune some global values ###
net.fibs="16" # Numbers of FIB
hw.usb.no_pf="1" # Disable USB packet filtering
### Intel NIC tuning ###
hw.igb.rx_process_limit="-1"
@jserviceorg
jserviceorg / gist:2a843fd272ebe7e24f9ffe5e25c4e008
Created November 16, 2017 11:56
Freebsd sysctl.conf Networking Optimized
net.bpf.zerocopy_enable=1
net.inet.raw.maxdgram=16384
net.inet.raw.recvspace=16384
net.route.netisr_maxqlen=2048
net.bpf.optimize_writers=1
net.inet.ip.redirect=0
hw.intr_storm_threshold=9000
net.inet.icmp.reply_from_interface=1
{
"brand": "lx",
"kernel_version": "3.16.0",
"image_uuid": "e74a9cd0-f2d0-11e6-8b69-b3acf2ef87f7",
"alias": "i_did_not_configure_this",
"hostname": "i_did_not_configure_this",
"max_physical_memory": 8192,
"quota": 3000,
"resolvers": ["192.168.180.1", "8.8.8.8"],
"nics": [
http://codegist.net/code/mysql-optimize-repair-all-tables/
@jserviceorg
jserviceorg / mysql-convert-myisam-to-innodb.sh
Created December 6, 2017 16:21 — forked from ablyler/mysql-convert-myisam-to-innodb.sh
Convert all MyISAM tables in all databases on a server to InnoDB
#!/bin/bash
for t in $(mysql --batch --column-names=false -e "select concat(TABLE_SCHEMA, '.', TABLE_NAME) from INFORMATION_SCHEMA.TABLES where ENGINE = 'MyISAM' and TABLE_TYPE = 'BASE TABLE' and TABLE_SCHEMA <> 'mysql'" mysql); do
mysql -e "alter table $t type=InnoDB";
done
@jserviceorg
jserviceorg / gist:56dc495031567cbdda8e170532181f30
Created February 19, 2018 10:37
illumos slow zfs scrubs - make scrubs fast again
echo "zfs_scrub_delay/W0t1" | mdb -kw
echo "zfs_scan_idle/W0t2" | mdb -kw