That creates a buffer that is larger than needs to be. Is the additional buffer data not send?
glBufferData creates a buffer of the specified size, no matter what. If you want a smaller buffer, specify a smaller size.
It doesn't copy any data unless you pass a non-null value to the
data parameter, in which case it will copy all of it (where "all" is "the size of the buffer") internally to use for initialization.
It is too early at this point for OpenGL to perform the kind of "optimization" you are wondering about, even if it were possible (in your case it would be impractical since you have intermixed your "used" and "unused" vertex fields into the same buffer anyway). And as a sort of general rule, that kind of higher-level management decision is something OpenGL leaves to you.
If I send empty data to the buffers, is it causing any performance issues?
If you routinely find yourself with a buffer where you are only using a subset of the vertex data, it's probably worth investigating whether or you not you can
- create a new buffer with a new vertex format containing only the data you need or
- spread the vertex data across multiple buffers instead of interleaving it in one
There is likely, technically, to be a small performance hit in terms of how efficiently the GPU can cache vertex data, as you'd be wasting a lot of its cache on data not actually used by the shaders. The bigger issue is simply the fact that you're routinely ignoring the data you've put into the GPU's memory, so you're just kind of wasting the memory.
If you can compact your vertex format or otherwise spread it across multiple buffers you don't always need mapped, that may be a net win. But it's difficult to say for sure, as those changes have their own performance wins and loses as well, depending on the context of your use of the features and the way your application processes data, et cetera.