I can see that files are getting added. Which means index size is expected
to increase. But it seems sometimes it is increasing even when there is no
change.

Could you please file an issue so that folks can investigate this ? Thanks.

On Tue, Jun 18, 2019, 10:17 PM Christopher Dang <christopher.d...@wework.com>
wrote:

> Hello Agniva,
>
> Here is the information you've asked for:
>
> go version: 1.12.0
> godoc version: latest
>
> I don't read from an index file because I need live updating from godoc
> and boot time isn't a high priority. This is because the service I'm
> creating can expect many files to be added, removed, or updated while godoc
> is running. While it would be convenient to restart godoc between file
> system changes my superiors would prefer I not use this option.
>
> I've attached a log dump from godoc -v below.
>
> I'm running the godoc process from within a docker so I use three methods
> to measure the memory usage:
> 1.) I docker exec into the container and run *top. *The *VSZ% *is the
> stat I use to measure memory from inside the docker.
> 2.) I run *docker stats* on the container from my host process
> 3.) since I run godoc with the verbose flag I get logs that tell me how
> many bytes are consumed by godoc. Example:
> 2019/06/17 23:28:26 index updated (88.264700559s, 211342912 bytes of
> source, 17421 files, 6533095 lines, 173980 unique words, 8997500 spots)
> 2019/06/17 23:28:26 before GC: bytes = 2385978984 *footprint* = 6429047608
> 2019/06/17 23:28:26 after  GC: bytes = 614368968* footprint *= 6429047608
>
> The charts and excel sheet above get their data points from godoc's
> footprint logs. I double check every now and then that footprint's output
> is accurate by comparing it against *top* and *docker stats. *
>
> The docker image is golang:1.12.0-alpine3.9
>
> On Mon, Jun 17, 2019 at 9:40 PM Agniva De Sarker <
> agniva.quicksil...@gmail.com> wrote:
>
>> Couple of questions:
>>
>> 1. What version of godoc and Go are you using ? What is your go env ?
>>
>> 2. You are using -index but not passing an index file. Any reason for
>> that ? godoc will load faster if you write an index beforehand and pass
>> that.
>>
>> 3. I am guessing since you have set index_interval, you expect files to
>> be added in your GOPATH. How many new files are getting added while godoc
>> is running ?
>>
>> 4. Please show us the output by adding -v flag.
>>
>>
>>
>> On Tuesday, 18 June 2019 05:28:39 UTC+5:30, christo...@wework.com wrote:
>>>
>>> Hi all,
>>>
>>>
>>> I've been playing around with an internal godoc server and noticed that
>>> over long periods of time the memory growth is unbounded. The command I use
>>> to invoke godoc is *godoc -index=true -index_interval=15m
>>> -index_throttle=.30 -maxresults=0*. The following images below track
>>> the memory usage and change in memory usage over a 24 hour period on a 8
>>> GiB machine. I've also attached a pdf with the data points I gathered
>>> during the experiment. Notice how the godoc process consumes 76% of memory
>>> by the end of the experiment. Is this indicative of a memory leak in the
>>> godoc source code or is this expected behavior?
>>>
>>>
>>> [image: Δ Mem Usage %.png][image: Mem Usage %.png]
>>>
>>>
>>> --
>> You received this message because you are subscribed to a topic in the
>> Google Groups "golang-nuts" group.
>> To unsubscribe from this topic, visit
>> https://groups.google.com/d/topic/golang-nuts/nU706aM7QpM/unsubscribe.
>> To unsubscribe from this group and all its topics, send an email to
>> golang-nuts+unsubscr...@googlegroups.com.
>> To view this discussion on the web visit
>> https://groups.google.com/d/msgid/golang-nuts/60b70a8c-3a3d-49c6-b9dc-b2bd1053c435%40googlegroups.com
>> <https://groups.google.com/d/msgid/golang-nuts/60b70a8c-3a3d-49c6-b9dc-b2bd1053c435%40googlegroups.com?utm_medium=email&utm_source=footer>
>> .
>> For more options, visit https://groups.google.com/d/optout.
>>
>

-- 
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.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/golang-nuts/CAOpCn4hCCSsnCq%3DG%3DAfAA4J7_TVjRo2rT3Z35YDG2VWXAsJVjg%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to