Re: [go-nuts] cache for *os.File

2017-12-14 Thread Dave Cheney
It depends a lot on what your application does, but I’d try the trace tool, 
which should give you execution times of your request and you see its 
interactions with the garbage collector.  For reasonable allocation rates you 
may find that the gc can collect in the background and not introduce additional 
latency.

-- 
You received this message because you are subscribed to the Google Groups 
"golang-nuts" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to golang-nuts+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


Re: [go-nuts] cache for *os.File

2017-12-14 Thread Vasiliy Tolstov
2017-12-14 9:28 GMT+03:00 Dave Cheney :
> Does your profiling suggest these allocations are causing latency?
>

Hmm this is missing part =). How can i understand what causing latency
if i use http prof?
-- 
Vasiliy Tolstov,
e-mail: v.tols...@selfip.ru

-- 
You received this message because you are subscribed to the Google Groups 
"golang-nuts" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to golang-nuts+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


Re: [go-nuts] cache for *os.File

2017-12-13 Thread Dave Cheney
Does your profiling suggest these allocations are causing latency?

On Thu, Dec 14, 2017 at 5:11 PM, Vasiliy Tolstov  wrote:
> 2017-12-13 22:31 GMT+03:00 Dave Cheney :
>> What does profiling say? Does your program spend the majority of its time 
>> stating files? Do stats add a significant amount of latency to your 
>> request/response cycle?
>>
>
> In my case profiling says only about memory allocations when i'm do
> os.OpenFile because passed path copied to file struct. Does it
> possible to eliminate such allocations?
> In my program i don't often do stat syscalls.
>
> --
> Vasiliy Tolstov,
> e-mail: v.tols...@selfip.ru

-- 
You received this message because you are subscribed to the Google Groups 
"golang-nuts" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to golang-nuts+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


Re: [go-nuts] cache for *os.File

2017-12-13 Thread Vasiliy Tolstov
2017-12-13 22:31 GMT+03:00 Dave Cheney :
> What does profiling say? Does your program spend the majority of its time 
> stating files? Do stats add a significant amount of latency to your 
> request/response cycle?
>

In my case profiling says only about memory allocations when i'm do
os.OpenFile because passed path copied to file struct. Does it
possible to eliminate such allocations?
In my program i don't often do stat syscalls.

-- 
Vasiliy Tolstov,
e-mail: v.tols...@selfip.ru

-- 
You received this message because you are subscribed to the Google Groups 
"golang-nuts" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to golang-nuts+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.