Network tuning Solaris

Setting up TCP stack for best performance in solaris:

 

set ndd:tcp_wscale_always=1
set ndd:tcp_tstamp_if_wscale=1
set ndd:tcp_max_buf=16777216
set ndd:tcp_cwnd_max=8388608
set ndd:tcp_xmit_hiwat=1048576
set ndd:tcp_recv_hiwat=1048576

ndd -set /dev/ip ip_forwarding 0
ndd -set /dev/tcp tcp_wscale_always 1
ndd -set /dev/tcp tcp_tstamp_if_wscale 1
ndd -set /dev/tcp tcp_max_buf 16777216
ndd -set /dev/tcp tcp_cwnd_max 8388608
ndd -set /dev/tcp tcp_xmit_hiwat 2048576
ndd -set /dev/tcp tcp_recv_hiwat 2048576

# memory interface this is the big gainer
set net.ipv4.tcp_sack = 0
# sets min/default/max TCP read buffer, default 4096 87380 174760
set net.ipv4.tcp_rmem = 10000000 10000000 10000000
# sets min/pressure/max TCP write buffer, default 4096 16384 131072
set net.ipv4.tcp_wmem = 10000000 10000000 10000000
# sets min/pressure/max TCP buffer space, default 31744 32256 32768
set net.ipv4.tcp_mem = 10000000 10000000 10000000
### CORE settings
# maximum receive socket buffer size, default 131071
set net.core.rmem_max = 524287
# maximum send socket buffer size, default 131071
set net.core.wmem_max = 524287
# default receive socket buffer size, default 65535
set net.core.rmem_default = 524287
# default send socket buffer size, default 65535
set net.core.wmem_default = 524287
# maximum amount of option memory buffers, default 10240
set net.core.optmem_max = 524287
# number of unprocessed input packets before kernel starts dropping
# them, default 300
set net.core.netdev_max_backlog = 300000

Solaris – SAN easy way

Hey Everyone,

I know sometime it seems a bit difficult to assign LUN’s to Solaris, here are my goto Steps:

1: Verify HBA port info to ensure assignment is correct:

# fcinfo hba-port -l

2:  find LUN

stmsboot –u

3: Format LUN

‘fdisk’ and ‘label’

4: Put the device names (ending with s2) into /etc/lvm/md.tab

5: Finish off with

metainit dnn

newfs -v /dev/md/rdsk/dnn

set entries in /etc/vfstab so a mount –a

 

and you are done.

Windows 10

What a nightmare, ok so I gave it a Try, Let me give my 2 cent on this. Let’s start with what I liked

  • Interface, no doubt it’s better then Windows 8.1, but I feel it’s not better then Windows 7.
  • Edge Browser
  • Latest and greatest security updates

Now Let’s go with what I didn’t like

  • Edge browser, as my VPN din’t worked with it
  • Updates (Do I need to explain)
  • Terms and Condition
    • Why Microsoft why, how can I agree to sign up where you have control over my software, games and hardware.
    • So if a hardware is not Microsoft recommendation, MSFT have control over disabling them.
    • So does all pirated games and software, Like MSFT have any better.
  • Interface, It’s not revolutionary and doesn’t make it all nice and awesome to use on System, it looks more designed for Portable devices and touch devices, and Frankly I don’t like it for Enterprise or for Work.

For me Windows 10 was a disappointment. It’s becoming quite a trend for MSFT. They need to come up with something better and allow consumers to have power.

Increasing File System in Solaris 10

To increase a File system size, you basically need to follow 4 steps

1: Find which meta belongs to Mount

2: Add Slice to Meta:

metattach d51 /dev/dsk/c11t60060160F87019005E06236CFC36E111d0s0

3: Make sure meta is showing new slice

metastat d51

4: Grow File System

growfs -M /u01 /dev/md/rdsk/d51

Easy …

Solaris Root mirroring Easy way

Hey Everyone,

Something from my old notes: Root mirroring in Solaris:

Root Mirroring

Root disk – c5t500000E010F08540d0
Mirror disk – c5t500000E010EFE890d0

Transfer the partition table
prtvtoc /dev/rdsk/c5t500000E010F08540d0s2 | fmthard -s – /dev/rdsk/c5t500000E010EFE890d0s2

Creation of meta databases
metadb -c 2 -a -f /dev/dsk/c5t500000E010F08540d0s7 /dev/dsk/c5t500000E010EFE890d0s7

Initialising the meta devices
metainit -f d10 1 1 c5t500000E010F08540d0s0
metainit d20 1 1 c5t500000E010EFE890d0s0
metainit -f d17 1 1 c5t500000E010F08540d0s7
metainit d27 1 1 c5t500000E010EFE890d0s7

Creating the mirrors
metainit -f d0 -m d10
metainit -f d7 -m d17

#Activate root meta
metaroot d0

Modify the vfstab for other metadevice entries for d7

Modify the system file

echo “set md:mirrored_root_flag=1” >> /etc/system

Modify the OBP boot device to boot with the mirror
eeprom “nvramrc=devalias mirror /scsi_vhci/ssd@g500000e010f08540:a devalias mirror-a /scsi_vhci/ssd@g500000e010f08541:a”
Install the boot block on the mirror disk
installboot /usr/platform/sun4u/lib/fs/ufs/bootblk /dev/rdsk/c5t500000E010EFE890d0s0

Attaching the mirror disk sub mirrors
metattach d0 d20
metattach d7 d27

metasync

———————–
Ruchir Gaur
“In Your life, There is no such a thing as you can do it or you can’t, but it’s a matter of ‘doing it or not doing it.’ “

Windows vs Linux – RAM Comparison

Hey Everyone,

I know i am a Nix fanboy, but I have been managing a team which works 60+% on Wintel and I found how RAM hungry Windows is for real.

So back in days I use to have ubuntu Laptop with 2 GB RAM, and our VPN use to work only on windows. So I ended up using virtualbox on top of Ubuntu. Use to keep 1GM for host OS and give rest to Windows to ensure VM is working properly. Use to use all my application (Video, Music, Youtube etc) on ubuntu and work only on WinXP VM.

Now we shifted to Win 7. Condition with Ubuntu still seems to be same. 1 GB RAM usually work but 1GB RAM for Win7 is low. I had a desktop with AMD FX4000 (Quad Core) with 8GB RAM. I ran Oracle app (FI+HRMS) on it on top of RHEL. Worked great.

Now while my SCCM team tried to setup SCCM LAB, and they are complaining hosts with SSD+16GB RAM. Running 3-4 VM’s on top of Server 2008 R2. Where my desktop, same config system, I run Mint host+Virtual box, and is running (3 work VM of Win 7 + 1 Ubuntu Server + 1 CentOS 7 Server + 1 Oracle Solaris 11.2), and I have no complains.

I am amazed how resource hogging Windows Server and Windows Hyper-v is, and worst of all it’s not even Free. Where my Entire host is free+Update supported+ I can control VM’s with CLI (bandwidth friendly).

——–
Ruchir Gaur
“In Your life, There is no such a thing as you can do it or you can’t, but it’s a matter of ‘doing it or not doing it.’ “

Virtualbox is Awesome

So I’ll start with something I use a lot in personal and professional life.

Oracle – VirtualBox : and all I can say it’s very awesome if you want to use something for free and want to take max out from your machine. I use it on my Linux desktop as GUI, as every-time I go on VPN it’s not very easy to use VNC, so I prefer using putty and CLI for VirtualBox.

Here are some things I use most of times:

1: Remove non running machine
vboxmanage unregister VMNAME –delete

2: Clone a VM
vboxmanage clonevm SNAPSHOT_Name –name NewVMName –register

3: Start NewVM
vboxmanage startvm VMNAME

One more pain is when you have DHCP in your environment and you have assigned Bridge adopter to machine, so this comes very Handy

4: Find IP assigned to machine
VBoxManage guestproperty get VMNAME "/VirtualBox/GuestInfo/Net/0/V4/IP" | awk '{split($0,a," "); print a[2]}'

5: Controlling VM
Reset
vboxmanage controlvm VMNAME reset

Poweroff
vboxmanage controlvm VMNAME poweroff

I’ll post my Vitualbox-headless running on Ubuntu server with remotebox for GUI for Virtualbox. It’s probably best 1 host VM solution you can get for free.

Ruchir Gaur
“In Your life, There is no such a thing as you can do it or you can’t, but it’s a matter of ‘doing it or not doing it.’ “