Re: [go-nuts] SFTPGo: a Golang performance story and some questions

2020-04-14 Thread Nicola Murino
Il 11/03/20 13:43, Nicola Murino ha scritto: Hi all, I want to share the performances analysis I recently did for SFTPGo, the fully featured and highly configurable SFTP server written in Go (https://github.com/drakkan/sftpgo). When I decided to write an SFTP server I evaluated the

Re: [go-nuts] SFTPGo: a Golang performance story and some questions

2020-03-13 Thread Jesper Louis Andersen
On Thu, Mar 12, 2020 at 12:45 AM Nicola Murino wrote: > > what I understand reading that issue is that sync.Pool is not the best > choice to store variable-length buffers and my first allocator > implementation accepts buffers of any size, each received packet can > have different sizes (between

Re: [go-nuts] SFTPGo: a Golang performance story and some questions

2020-03-12 Thread Nicola Murino
Il 12/03/20 01:54, Adrian Ratnapala ha scritto: BTW: Thanks for all this investigation and writeups, they are interesting, and I look forward to your test results. Desipte my question, I think using a custom allocator is perfectly reasonable. go/issues/23199 is showing us that sync.Pool's

Re: [go-nuts] SFTPGo: a Golang performance story and some questions

2020-03-11 Thread Ian Lance Taylor
On Wed, Mar 11, 2020 at 6:44 AM 'Benjamin' via golang-nuts wrote: > > Why not merge https://go-review.googlesource.com/c/go/+/51670 since 2017? > I tell you the truth: Workers of commercial companies dislike the community > pull request, this will wast their free time or vacation time. They

Re: [go-nuts] SFTPGo: a Golang performance story and some questions

2020-03-11 Thread Adrian Ratnapala
BTW: Thanks for all this investigation and writeups, they are interesting, and I look forward to your test results. Desipte my question, I think using a custom allocator is perfectly reasonable. go/issues/23199 is showing us that sync.Pool's interface isn't great for allocating byte-bufffers

Re: [go-nuts] SFTPGo: a Golang performance story and some questions

2020-03-11 Thread Adrian Ratnapala
> > > > Any particular reason you avoided something like sync.Pool ? It could be useful in your case, allocation pattern depending. > > > Hi, > > I initially evaluated the sync.Pool then I read this article: > > https://dzone.com/articles/memory-pooling-in-go-where-why-and-how > > and this

Re: [go-nuts] SFTPGo: a Golang performance story and some questions

2020-03-11 Thread Nicola Murino
Il 11/03/20 22:55, Adrian Ratnapala ha scritto: > > > > Any particular reason you avoided something like sync.Pool ? It could be useful in your case, allocation pattern depending. > > >  Hi, > >  I initially evaluated the sync.Pool then I read this article: > >

Re: [go-nuts] SFTPGo: a Golang performance story and some questions

2020-03-11 Thread Nicola Murino
Il 11/03/20 15:23, Jesper Louis Andersen ha scritto: On Wed, Mar 11, 2020 at 1:43 PM Nicola Murino > wrote: So I wrote a proof of concept allocator that tries to avoid all these extra allocations reusing the previously allocated slices:

Re: [go-nuts] SFTPGo: a Golang performance story and some questions

2020-03-11 Thread Jesper Louis Andersen
On Wed, Mar 11, 2020 at 1:43 PM Nicola Murino wrote: > So I wrote a proof of concept allocator that tries to avoid all these > extra allocations reusing the previously allocated slices: > > https://github.com/drakkan/sftp/blob/master/allocator.go > > Any particular reason you avoided something

Re: [go-nuts] SFTPGo: a Golang performance story and some questions

2020-03-11 Thread 'Benjamin' via golang-nuts
Why not merge https://go-review.googlesource.com/c/go/+/51670 since 2017? I tell you the truth: Workers of commercial companies dislike the community pull request, this will wast their free time or vacation time. They only worked for

Re: [go-nuts] SFTPGo: a Golang performance story and some questions

2020-03-11 Thread 'Benjamin' via golang-nuts
I think that’s why go should be driven by the community but not by Bell labs nor Google labs. Works in Bell Labs or Google Labs may leave the job, and may not know everything. But the community have enough Human Resources and various of knowledges. Some scientists and reaserchers worked for

[go-nuts] SFTPGo: a Golang performance story and some questions

2020-03-11 Thread Nicola Murino
Hi all, I want to share the performances analysis I recently did for SFTPGo, the fully featured and highly configurable SFTP server written in Go (https://github.com/drakkan/sftpgo). When I decided to write an SFTP server I evaluated the available libraries and I did some quick performance