What is the Net Buffer Length?

Hello,  I cannot find any real documentation on the net_buffer_length that explains it to me in a clear concise way.

What is it exactly?  How do I go about setting a decent value for it?

Also what about max_allowed_packet? I did find some docs on that, and it seems to me that it should be set to the max size that could be returned from a query ??

Thank You!

Who is Participating?
I wear a lot of hats...

"The solutions and answers provided on Experts Exchange have been extremely helpful to me over the last few years. I wear a lot of hats - Developer, Database Administrator, Help Desk, etc., so I know a lot of things but not a lot about one thing. Experts Exchange gives me answers from people who do know a lot about one thing, in a easy to use platform." -Todd S.

Guy Hengel [angelIII / a3]Billing EngineerCommented:
as for the mysqldump reference:

that setting defines how much data is prepared into a buffer, to be going over the net, before actually going over the network in a whole.

say your query will return 10K of data, with net_buffer_length set to 2K.
that means mysql will have to fill 5x that buffer, and between each filling, it has to wait for the buffer data being actually send over the net.

so, the larger that value, the less often mysql has to wait for sending.
however, the larger that value, the longer the client has to wait for intermediate data results, eventually.

that setting is a compromise between database and network speed, and is part of the fine-tuning tools.

the default value is 16K:

in regards to the max_allowed_packet:

Experts Exchange Solution brought to you by

Your issues matter to us.

Facing a tech roadblock? Get the help and guidance you need from experienced professionals who care. Ask your question anytime, anywhere, with no hassle.

Start your 7-day free trial
UmeshSenior Principal Technical Support EngineerCommented:
If 'angellll' has added a comment, then assume that it's more than enough than the actual document.

This is what Manual says about - net_buffer_length

Each client thread is associated with a connection buffer and result buffer. Both begin with a size given by net_buffer_length but are dynamically enlarged up to max_allowed_packet bytes as needed. The result buffer shrinks to net_buffer_length after each SQL statement.

This variable should not normally be changed, but if you have very little memory, you can set it to the expected length of statements sent by clients. If statements exceed this length, the connection buffer is automatically enlarged. The maximum value to which net_buffer_length can be set is 1MB.
rjohnsonjrAuthor Commented:
Thanks Guys!  I really appreciate it.
It's more than this solution.Get answers and train to solve all your tech problems - anytime, anywhere.Try it for free Edge Out The Competitionfor your dream job with proven skills and certifications.Get started today Stand Outas the employee with proven skills.Start learning today for free Move Your Career Forwardwith certification training in the latest technologies.Start your trial today
MySQL Server

From novice to tech pro — start learning today.