G
gcooper
Guest
I guest for compatibility/reliability reasons Asynchronous IO is enabled by default now....
I did it because it was the path of least resistance, but yes.. previously the setting was explicitly off, which was in fact a bug with how port options were specified in freenas-common.
Is Synchronous IO used if AIO is disabled?
Yes(-ish). The code path that finally calls aio_read/aio_write is incredibly obfuscated, but bottom line is that the stub always returns -1/sets errno to ENOSYS if WITH_AIO != 1 (either because OS support is missing as determined by configure, or the person that compiled samba didn't explicitly request AIO support via --with-aio).
From my understanding Synchronous communications is virtually always more complex but also have much higher throughput than Asynchronous.
Depends on how things are programmed, but synchronous I/O is usually simpler with a 1:1 [PID:socket]. With threads the converse is usually true. Samba's worker jobs use processes, not threads.
I didn't look to see what Samba uses for processing sockets (e.g. kqueue*, poll, select, etc).
With previous 8.0.3 I was getting slightly faster writes than read, but now it's much slower writes w/ AIO enabled.
Please qualify "previous 8.0.3" -- do you mean BETA1, RC1, RELEASE, RELEASE-p1? Also, it might depend on what storage chipset you're using, etc... but yes.. having less RAM will most certainly make CIFS perform slower in 8.0.3 compared to versions prior to 8.0.3 if AIO operations queue up and things oversaturate.