Skip to content

Commit

Permalink
prep for 2.2.1 release
Browse files Browse the repository at this point in the history
  • Loading branch information
ehough committed Mar 15, 2019
1 parent 6a306ed commit a3ef44a
Show file tree
Hide file tree
Showing 5 changed files with 37 additions and 26 deletions.
5 changes: 4 additions & 1 deletion CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,11 +4,14 @@ All notable changes to this project will be documented in this file.
The format is based on [Keep a Changelog](http://keepachangelog.com/en/1.0.0/)
and this project adheres to [Semantic Versioning](http://semver.org/spec/v2.0.0.html).

## [2.2.1] - unreleased
## [2.2.1] - 2019-03-15

### Fixed
* `rpc.statd` debug output was invisible

### Changed
* Further de-cluttered non-debug logging output

## [2.2.0] - 2019-03-08

### Added
Expand Down
2 changes: 1 addition & 1 deletion doc/advanced/nfs-versions.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,5 +4,5 @@ By default, this image provides NFS versions 3 and 4 simultaneously. Using the f

| Environment variable | Description | Default |
|-------------------------|--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|-----------|
| `NFS_VERSION` | Set to `3`, `4`, `4.1`, or `4.2` to fine tune the NFS protocol version. Enabling any version will also enable any lesser versions. e.g. `4.2` will enable versions 4.2, 4.1, 4, **and** 3. | `4.2` |
| `NFS_VERSION` | Set to `3`, `4`, `4.1`, or `4.2` to fine tune the NFS protocol version. Enabling any version will also enable any lesser versions. e.g. `4.1` will enable versions 4.1, 4, **and** 3. | `4.2` |
| `NFS_DISABLE_VERSION_3` | Set to a non-empty value (e.g. `NFS_DISABLE_VERSION_3=1`) to disable NFS version 3 and run a version-4-only server. This setting is not compatible with `NFS_VERSION=3` | *not set* |
6 changes: 4 additions & 2 deletions doc/advanced/performance-tuning.md
Original file line number Diff line number Diff line change
@@ -1,7 +1,9 @@
# Performance tuning

The following tips might improve your NFS server's performance.
The NFS server itself requires very little tuning; out-of-the-box it's blazingly fast even under high loads. You'll find that most performance gains will come from setting both the appropriate [mount options](https://linux.die.net/man/5/nfs) in your clients as well as the right [export options](https://linux.die.net/man/5/exports) on your shared filesystems.

That said, the following tips might improve your NFS server's performance.

* Set the **`NFS_SERVER_THREAD_COUNT`** environment variable to control how many server threads `rpc.nfsd` will use. A good minimum is one thread per CPU core, but 4 or 8 threads per core is probably better. The default is one thread per CPU core.

* Running the container with `--network host` *might* improve network performance by 10% - 20% [[1](https://jtway.co/docker-network-performance-b95bce32b4b9),[2](https://www.percona.com/blog/2016/08/03/testing-docker-multi-host-network-performance/)], though this hasn't been tested.
* Running the container with `--network host` *might* improve network performance by 10% - 20% on a heavily-loaded server [[1](https://jtway.co/docker-network-performance-b95bce32b4b9),[2](https://www.percona.com/blog/2016/08/03/testing-docker-multi-host-network-performance/)], though this hasn't been tested.
40 changes: 23 additions & 17 deletions doc/feature/logging.md
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ Normal, non-debug logging will look something like this:
SETTING UP ...
==================================================================
----> building /etc/exports from environment variables
----> collected 4 valid export(s) from NFS_EXPORT_* environment variables
----> collected 3 valid export(s) from NFS_EXPORT_* environment variables
----> setup complete

==================================================================
Expand All @@ -37,8 +37,8 @@ Normal, non-debug logging will look something like this:
----> starting rpcbind
----> starting exportfs
----> starting rpc.mountd on port 32767
----> starting statd on port 32765 (outgoing from port 32766)
----> starting idmapd
----> starting rpc.statd on port 32765 (outgoing from port 32766)
----> starting rpc.idmapd
----> starting rpc.nfsd on port 2049 with 16 server thread(s)
----> starting rpc.svcgssd
----> all services started normally
Expand All @@ -51,7 +51,6 @@ Normal, non-debug logging will look something like this:
----> /nfs/htpc-media *(ro,no_subtree_check,insecure,async)
----> /nfs/homes/staff *(rw,no_subtree_check,insecure,no_root_squash,sec=krb5p)
----> /nfs/homes/ehough *(rw,no_subtree_check,insecure,no_root_squash,sec=krb5p)
----> /nfs/backup/duplicacy *(rw,no_subtree_check,insecure,sec=krb5p,all_squash,anonuid=0,anongid=0)
----> list of container ports that should be exposed:
----> 111 (TCP and UDP)
----> 2049 (TCP and UDP)
Expand All @@ -75,7 +74,7 @@ Debug output will be much more detailed, and it may be very helpful when diagnos
----> log level set to DEBUG
----> will use requested rpc.nfsd thread count of 16
----> building /etc/exports from environment variables
----> collected 4 valid export(s) from NFS_EXPORT_* environment variables
----> collected 3 valid export(s) from NFS_EXPORT_* environment variables
----> kernel module nfs is loaded
----> kernel module nfsd is loaded
----> kernel module rpcsec_gss_krb5 is loaded
Expand All @@ -90,36 +89,36 @@ mount: mount('rpc_pipefs','/var/lib/nfs/rpc_pipefs','rpc_pipefs',0x00008000,'(nu
mount: mount('nfsd','/proc/fs/nfsd','nfsd',0x00008000,'(null)'):0
----> starting rpcbind
----> starting exportfs
exporting *:/nfs/backup/duplicacy
exporting *:/nfs/homes/ehough
exporting *:/nfs/homes/staff
exporting *:/nfs/htpc-media
----> starting rpc.mountd on port 32767
----> starting statd on port 32765 (outgoing from port 32766)
----> starting idmapd
----> starting rpc.statd on port 32765 (outgoing from port 32766)
----> starting rpc.idmapd
----> starting rpc.nfsd on port 2049 with 16 server thread(s)
rpc.nfsd: knfsd is currently down
rpc.nfsd: Writing version string to kernel: -2 +3 +4 +4.1 +4.2
rpc.nfsd: Created AF_INET TCP socket.
rpc.nfsd: Created AF_INET UDP socket.
rpc.nfsd: Created AF_INET6 TCP socket.
rpc.nfsd: Created AF_INET6 UDP socket.
rpc.idmapd: Setting log level to 11
----> starting rpc.svcgssd
rpc.idmapd: libnfsidmap: using domain: hough.matis
rpc.idmapd: libnfsidmap: Realms list: 'HOUGH.MATIS'
rpc.idmapd: libnfsidmap: processing 'Method' list
rpc.idmapd: static_getpwnam: name 'nfs/[email protected]' mapped to 'root'
rpc.idmapd: static_getpwnam: localname 'melissa' for '[email protected]' not found
rpc.idmapd: static_getpwnam: name '[email protected]' mapped to 'ehough'
libtirpc: debug level 3
rpc.idmapd: static_getgrnam: group 'nfs/[email protected]' mapped to 'root'
rpc.idmapd: static_getgrnam: local group 'melissa' for '[email protected]' not found
rpc.idmapd: static_getgrnam: group '[email protected]' mapped to 'ehough'
rpc.idmapd: libnfsidmap: loaded plugin /usr/lib/libnfsidmap/static.so for method static
rpc.idmapd: Expiration time is 600 seconds.
rpc.idmapd: Opened /proc/net/rpc/nfs4.nametoid/channel
rpc.idmapd: Opened /proc/net/rpc/nfs4.idtoname/channel
----> starting rpc.nfsd on port 2049 with 16 server thread(s)
rpc.nfsd: knfsd is currently down
rpc.nfsd: Writing version string to kernel: -2 +3 +4 +4.1 +4.2
rpc.nfsd: Created AF_INET TCP socket.
rpc.nfsd: Created AF_INET UDP socket.
rpc.nfsd: Created AF_INET6 TCP socket.
rpc.nfsd: Created AF_INET6 UDP socket.
----> starting rpc.svcgssd
entering poll
----> all services started normally
Expand All @@ -128,7 +127,6 @@ entering poll
==================================================================
----> list of enabled NFS protocol versions: 4.2, 4.1, 4, 3
----> list of container exports:
----> /nfs/backup/duplicacy *(rw,sync,wdelay,hide,nocrossmnt,insecure,root_squash,all_squash,no_subtree_check,secure_locks,acl,no_pnfs,anonuid=0,anongid=0,sec=krb5p,rw,insecure,root_squash,all_squash)
----> /nfs/homes/ehough *(rw,sync,wdelay,hide,nocrossmnt,insecure,no_root_squash,no_all_squash,no_subtree_check,secure_locks,acl,no_pnfs,anonuid=65534,anongid=65534,sec=krb5p,rw,insecure,no_root_squash,no_all_squash)
----> /nfs/homes/staff *(rw,sync,wdelay,hide,nocrossmnt,insecure,no_root_squash,no_all_squash,no_subtree_check,secure_locks,acl,no_pnfs,anonuid=65534,anongid=65534,sec=krb5p,rw,insecure,no_root_squash,no_all_squash)
----> /nfs/htpc-media *(ro,async,wdelay,hide,nocrossmnt,insecure,root_squash,no_all_squash,no_subtree_check,secure_locks,acl,no_pnfs,anonuid=65534,anongid=65534,sec=sys,ro,insecure,root_squash,no_all_squash)
Expand All @@ -141,6 +139,14 @@ entering poll
==================================================================
READY AND WAITING FOR NFS CLIENT CONNECTIONS
==================================================================
rpc.statd: Version 2.3.2 starting
rpc.statd: Flags: No-Daemon Log-STDERR TI-RPC
rpc.statd: Failed to read /var/lib/nfs/state: Address in use
rpc.statd: Initializing NSM state
rpc.statd: Local NSM state number: 3
rpc.statd: Failed to open /proc/sys/fs/nfs/nsm_local_state: Read-only file system
rpc.statd: Running as root. chown /var/lib/nfs to choose different user
rpc.statd: Waiting for client connections
leaving poll
handling null request
svcgssd_limit_krb5_enctypes: Calling gss_set_allowable_enctypes with 7 enctypes from the kernel
Expand Down
10 changes: 5 additions & 5 deletions entrypoint.sh
Original file line number Diff line number Diff line change
Expand Up @@ -434,7 +434,7 @@ init_exports() {
log "$PATH_FILE_ETC_EXPORTS is baked into the image"
fi

# fallback to environment variables
# fall back to environment variables
else

local count_valid_exports=0
Expand Down Expand Up @@ -576,9 +576,9 @@ boot_helper_start_non_daemon() {

local -r bg_pid=$!

# somewhat arbitrary assumption that if the process isn't dead already, it will die within 1/20 of a second. for our
# somewhat arbitrary assumption that if the process isn't dead already, it will die within a millisecond. for our
# purposes this works just fine, but if someone has a better solution please open a PR.
sleep .05
sleep .001
kill -0 $bg_pid 2> /dev/null
on_failure stop "$process failed"
}
Expand Down Expand Up @@ -660,7 +660,7 @@ boot_main_idmapd() {
func=boot_helper_start_non_daemon
fi

$func 'starting idmapd' $PATH_BIN_IDMAPD "${args[@]}"
$func 'starting rpc.idmapd' $PATH_BIN_IDMAPD "${args[@]}"
}

boot_main_statd() {
Expand Down Expand Up @@ -691,7 +691,7 @@ boot_main_statd() {
func=boot_helper_start_non_daemon
fi

$func "starting statd on port $port_in (outgoing from port $port_out)" $PATH_BIN_STATD "${args[@]}"
$func "starting rpc.statd on port $port_in (outgoing from port $port_out)" $PATH_BIN_STATD "${args[@]}"
}

boot_main_nfsd() {
Expand Down

0 comments on commit a3ef44a

Please sign in to comment.