HOW TO SET KERNEL VALUES TO IMPROVE PERFORMANCE IN SOLARIS SERVERS


 (A) set maxphys
 To improve basic disk performance
 maxphys is the maximum size of physical I/O requests. If a driver sees a request larger than this size, the driver breaks the request into maxphys size chunks. File systems can and do impose their own limit. This value should be higher than all other settings (vol_maxio, vol_maxspecialio etc) such as in Filesystems/Volume Manager etc. maxphys is set in bytes.
 Maximum number of page I/O requests that can be queued by the paging system. This number is divided by 4 to get the actual maximum used by the paging system. It is used to throttle the number of requests as well as to control process swapping. maxpgio is in I/O's. 




C)Set FastScan (Is Calculated by Multipliying 32678 for Physical Memory


D)Set Handspreadpages(Is Calculated by Multipliying 32678 for Physical Memory

 The Solaris environment uses a two-handed clock algorithm to look for pages that are candidates for reclaiming when memory is low. The first hand of the clock walks through memory marking pages as unused. The second hand walks through memory some distance after the first hand, checking to see if the page is still marked as unused. If so, the page is subject to reclaim. The distance between the front hand and the back hand is handspreadpages.
 Along with tune_t_flushr, autoup controls the amount of memory examined for dirty pages in each invocation and frequency of file system sync operations.
 Specifies the number of seconds between fsflush invocations.
 Turn on buffer overflow protection
 Enable the Logging of Executable Stack Messages.
 It should be the 20% of physical memory to limit the use by ZFS
 (J)zfs:zfs_vdev_max_pending   
  
 Example  /etc/system server with physical memory (10 GB RAM) some parameter are obsoletes
 10 GB de Memoria in my test server
exclude: drv/ohci
set maxphys=0x800000
set maxpgio=327680   
set fastscan=327680   
set handspreadpages=327680
set autoup=50
set tune_t_fsflushr=1
set noexec_user_stack=1
set noexec_user_stack_log=1
set pg_contig_disable=1
set zfs:zfs_immediate_write_sz=0x20000
set zfs:metaslab_df_free_pct=4
set zfs:zfs_nocacheflush=1
set zfs:zfs_arc_max=2147483648 
set rlim_fd_max=65536
set rlim_fd_cur=65536
set zfs:zfs_vdev_max_pending=20   
set ssd:ssd_max_throttle=20
set ssd:ssd_max_throttle=20

It very important that you distribute the I/O in different LUN's for example in Oracle Installation Data Files, Redos and Archivelogs in different LUNs to improve the performance
If you want more information you can consult the Oracle Document:
Roger
(Values calculated with a server with 10 GB)


 (B) set maxpgio
 (E) set autohup (value is calculated by multiplying the physical memory for 5)
 (F) set tune_t_fsflushr
 (G) set noexec_user_stack
 (H) set noexec_user_stack_log
 (I) zfs_arc_max
(number of LUNs * ZFS_VDEV_MAX_PENDING)  In a legacy storage environment, the ssd_max_throttle and sd_max_throttle parameters define the maximum number of concurrent I/Os that the driver can send to the storage. By setting the zfs_vdev_max_pending default value equal to the value of the [s]sd_max_throttle parameter, we prevent ZFS from queuing I/O to yet another unnecessary SD layer.
* OS Tunning
 * ZFS tuning
 * Limit ARC
The values if you are using zfs for the max_throttle and zfs_vdev_max_pending should be the same
set zfs:zfs_vdev_max_pending=20   


Comments

Unknown said…
Setting
set maxphys=0x800000

in /etc/system or in /etc/system.d/
when using an Ldoms (a.k.a. Oracle VM Server for SPARC) guest domain with a vhba (virtual HBA) configuration causes boot failures of the guest domain with errors such as:

Boot device:
/virtual-devices@100/channel-devices@200/scsi@0/disk@w21020002ac0199fe,0:a
File and args:
WARNING: use-nvramrc? variable is set, continuing with signature verification
SunOS Release 5.11 Version 11.3 64-bit
Copyright (c) 1983, 2018, Oracle and/or its affiliates. All rights reserved.
WARNING: vio_dring_bind:[4] dring_bind: (12, Not enough space)
WARNING: vio_conn_negotiate:[4] DringRegistration failed
WARNING: vio_dring_bind:[4] dring_bind: (12, Not enough space)
WARNING: vio_conn_negotiate:[4] DringRegistration failed
WARNING: vio_dring_bind:[4] dring_bind: (12, Not enough space)
WARNING: vio_conn_negotiate:[4] DringRegistration failed
WARNING: vio_dring_bind:[4] dring_bind: (12, Not enough space)

I am uncertain why such a large value for maxphys 0x800000 is 8MB is being suggested, the default is 128K.