computer tips

this is pile of tips for users and admins that work with computer systems; in no particular order.

this page makes the following assumptions:

sections
  1. RT-AC68U drops connections
  2. ext4lazyinit

RT-AC68U drops connections

ASUS RT-AC68U routers running the AsusWRT-Merlin firmware may drop all connections while the system log is flooded with the following messages:

the solution is as follows:

  1. read the procfs file. cat /proc/sys/net/ipv4/tcp_max_tw_buckets
  2. increase the value. echo "8196" > /proc/sys/net/ipv4/tcp_max_tw_buckets

by default, ours was 4096. 8196 worked well to stop the connection dropping, but we opted for 12288 to be safe. this is a rather annoying issue that should've been solved quite a long time ago, but alas, if you want something done right, you gotta do it yourself.


ext4lazyinit

within linux, the ext4 filesystem features lazy initialization, which is aimed at speeding up the formatting of partitions. it does so by writing a partition's (sector's) inodes and journal gradually, instead of all at once. while in principle this sounds good, in practice -- and in particular, on large storage devices and arrays -- this can lead to the ext4lazyinit process chewing up cpu cycles and, more importantly, stifling data transfer speeds. in this situation, it may be desirable to disable this lazy initialization, which can be performed with the following extended arguments:

if a partition has already been formatted and is undergoing a lazy initialization, and you wish to speed it up, the following mount option can be passed:

examples of use:

[user@host ~]$ lsblk

NAME MAJ:MIN RM SIZE RO TYPE MOUNTPOINTS

sda 8:0 0 1T 0 disk

└─sda1 8:1 0 1T 0 part

[user@host ~]$ sudo mkfs.ext4 -E \

> lazy_itable_init=0,lazy_journal_init=0 /dev/sda1


[user@host ~]$ lsblk

NAME MAJ:MIN RM SIZE RO TYPE MOUNTPOINTS

sda 8:0 0 1T 0 disk

└─sda1 8:1 0 1T 0 part

[user@host ~]$ sudo mount -o init_itable=0

> /dev/sda1 /mnt/aux/