-
sjorge
jbk / papertigers would the tcp CC have any effect on when a zone/socket would release it's held buffers?
-
sjorge
I switched to cubic on the host side and switched the linux VMs back cubic (had the VMs on newreno to match the native stuff)
-
sjorge
I seem to hit the viona starvation less
-
sjorge
Still hit it, though
-
sjorge
Not sure if placebo or not
-
jclulow
I would have to guess that it's a placebo
-
jclulow
But anything is possible
-
sjorge
yeah I'm leaning towards placebo too
-
sjorge
as it has been a mixed bag in the past too where things go fine for a bit, then i keep hitting the issue multiple times a day,...
-
nbjoerg
would be nice to have a vm flag that packets to/from the vm should just be copied...
-
sjorge
in theory, swapping from viona to plain virtio-net, but the performance is like 10-20MB/s max which makes all the nfs mounts basically unusable and eventually whatever is using thme starves for IO in the D state.
-
sjorge
IIRC most of viona's perf comes from only doing all the extra work once it needs to leave the host
-
nbjoerg
in this case, we kind of want the opposite
-
nbjoerg
maybe with some extra accounting: keep track of how many queue entries are left and if it is below some threshold, switch to copying
-
sjorge
From what I understand, it's something in sockfs (?) not releasing the buffers when it's done with it and hits some sort of low/high watermark that is in place to prevent it from holding onto those buffers.
-
sjorge
So there is already some sort of accounting tracking it (not just coming from viona, the receiving netstack doesn't care where it comes from)
-
rmustacc
It only matters because they're loaned buffers.
-
sjorge
Correct, as reducing vqsize makes it trigger more often and increasing it makes it trigger less often (I have it at max vqsize at the moment0
-
sjorge
is the 16k a virtio max or is that something on our side?
-
sjorge
(for vqsize)
-
richlowe
that might be a legacy thing
-
richlowe
in that I remember thinking that, pmooney is the expert.
-
richlowe
oh, that's memory from me merging the virtio drivers together, so especially don't trust that.
-
pmooney
max virtqueue length is 32k
-
pmooney
that is, the number of entries in the virtqueue
-
richlowe
the mmio stuff caps at some low number, the pci stuff just lets stuff default I think?
-
pmooney
well and for legacy virtio, the virtqueue size is not negotiated, but rather specified by the device
-
pmooney
so cranking it way up can be a bit onerous for the guest, having to allocate adequate memory for that dictated size
-
richlowe
ok, that'd be what I was seeing and confused by
-
richlowe
at some point I hope someone smart updates us to the current spec, and takes a look at non-pci stuff.
-
richlowe
because I'm trying to get weasel out of it
-
richlowe
s/get//
-
sjorge
i'll see if i can bump it to 32k tomorrow, i'd rather wast memory if it means less issues
-
richlowe
what issues?
-
richlowe
sorry, I'm bad at keeping up
-
jclulow
Is there a bug open for this problem?
-
richlowe
oh yeah, definitely file a bug if you haven't.
-
andyf
I think it's illumos 13463 (fenix)
-
fenix
BUG 13463: bhyve locks up when viona ring buffers on loan to a local zone are not returned by sockfs (New)
-
fenix
-
sjorge
bingo
-
sjorge
looks like 32k does work
-
sjorge
s/work/gets accepted by zadm/
-
andyf
oh, well that could just be zadm. I just looked at bhyve and it should accept 32K for viona (that's the max)
-
andyf
did you put in 32768?
-
sjorge
yep
-
sjorge
it works
-
andyf
I ask because zadm checks for the specific powers of two
-
andyf
Time for bed for me, I read that as does not work, sorry.
-
sjorge
my notes say to set it to 16k (max)
-
sjorge
and i winder if it could go higher, so yes it can
-
jclulow
so the VM transmits packets to the local zone, by loaning buffers, basically?
-
sjorge
As far as i understand it, yes
-
jclulow
It really feels like we could at least add an /etc/system tuneable or something to just force it to copy always
-
sjorge
in my case its our nfs/server in a zone not returning them in some cases
-
jclulow
so that it would at least work
-
richlowe
wait, is it in nfs _in specific_ doing something weird?
-
richlowe
or does that just happen to be what screws you, but anything could?
-
jclulow
I believe if you have a process in a zone that accepts a connection but never reads from it
-
jclulow
you would end up in the same boat
-
jclulow
nothing releases that memory back, it'll just sit in your recvq
-
sjorge
not nfs specific
-
jclulow
The complex but complete solution would be to claw them back from queues
-
jclulow
But the absolute minimum bandaid here is to force a copy instead of a loan in this case
-
jclulow
so that it just never happens
-
sjorge
i think one customer at joyent also hit the same
-
sjorge
issue
-
jbk
jclulow: at least from what I recall, and I think is in the ticket, even a process using port_get() or poll() to wait to read can trigger it (as it seems that somehow we're not signaling when data is there, so the mblk_ts keep getting linked)