> Would it be possible to dynamically choose the padding at server start time?
I doubt it. Allowing the compiler to generate accesses with lea et al. is quite beneficial; and that'd likely be gone by making this not be a compile time constant.
It'd also end up being a tuning knob very very few knew how to tune...
> Given that cache line sizes vary that seems like it might be a prudent choice.
They usually only vary between architectures. Netburst IIRC was the last time x86 cache line sizes varied. If there's any doubt it's usually ok to just use the higher (128 byte) line size, the "unused" padding cache-line will never be accessed and thus not occupy cache space.