Re: [go-nuts] Re: godoc memory leak

2019-06-18 Thread Agniva De Sarker
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 
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
>> 
>> .
>> 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.


Re: [go-nuts] Re: is there a goroutine scope global veriable ?

2019-06-18 Thread Kurtis Rader
On Tue, Jun 18, 2019 at 7:56 PM hui zhang  wrote:

>
> is there a goroutine scope global veriable ?   so  I can do this ?
>

You're asking if Go supports the equivalent of thread local storage as used
in Java, C++, and Python. The answer is, no. See
https://stackoverflow.com/questions/31932945/does-go-have-something-like-threadlocal-from-java
 and https://github.com/golang/go/issues/21355

-- 
Kurtis Rader
Caretaker of the exceptional canines Junior and Hank

-- 
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/CABx2%3DD-9H5xLtJ_VXVQ5HoiHe5n86TwRor58GvzkOCU1cer_fA%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.


[go-nuts] Re: is there a goroutine scope global veriable ?

2019-06-18 Thread hui zhang
is there a goroutine scope global veriable ?
like  fork a variable from main ?

-- 
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/d656aafc-d9df-4553-92ac-230a46ba86b9%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


[go-nuts] Re: is there a goroutine scope global veriable ?

2019-06-18 Thread hui zhang

is there a goroutine scope global veriable ?   so  I can do this ?

-- 
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/b76b0ec7-dd59-4410-9177-3596d5733fb4%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


[go-nuts] is there a goroutine scope global veriable ?

2019-06-18 Thread hui zhang
I write logs into one single log file.
and need to set a different tracking id for each goroutine.
But I don't want to pass the tracking id argument for all functions.


func main() {
  go Func()
}
func Func() {
  SetLogTrackId("")
  LogDebug("123")
  call1()
}
func call1() {
   LogDebug("call1")
}
var trackId string //need this scope to be goroutine scope
func SetLogTrackId(id string) {
trackId = id
}
func LogDebug(v ...interface{}) {
log.Println("DEBUG " + trackId + " " + fmt.Sprintln(v...))
}


-- 
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/798a4565-5f1c-4495-8589-3575ba52953a%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


[go-nuts] [Job] remote Go developer at Mattel (fulltime, US-only)

2019-06-18 Thread Nate Finch
Want to work with me at Mattel on a Go platform?

Mattel’s Connected Products Platform team is *the model* of where Mattel is 
going with its products. It is a service platform expanding to be used by 
teams all across the whole 30,000 person company.

We’re looking for a senior backend developer who is very comfortable with 
writing Go.
Preferably you have experience working on backend game servers and/or 
delivering backend API services in production used by large numbers of end 
users.

The recently launched Hotwheels id 
 track 
and app leverage our Platform for login, stat storage, firmware upgrades 
and more.

Brands all across Mattel are making products shipping soon that leverage 
the services that our team is building – identity and login services, data 
and download APIs, all written in Go, running on Kubernetes in Google Cloud.

We store data in postgres and redis, leverage Google’s pubsub service, and 
are looking more into serverless to scale our loads.

We monitor with prometheus, grafana, pagerduty and sentry.  We talk on 
Teams, all changes get reviewed on github and tests must pass in CI on 
Jenkins

Want great benefits? How about great pay, half day Fridays in the summer, 
unlimited vacation, very low deductible health insurance, high match 401k, 
and more.

We are very conscious of work-life balance, and many people on the team 
have kids and work around busy life schedules.

You’ll join a fully remote dev team and mostly remote wider team that has a 
big impact on a huge company. While Mattel is big, our division is small 
and given a lot of leeway in how we run things.

Here’s the place to apply, please ignore basically everything on that page 
except the apply button. I have Opinions™ about its contents, and since I’m 
the hiring manager, what I say goes :)

Yes it really is (US) remote, even though it says otherwise.

https://jobs.mattel.com/job/el-segundo/platform-software-engineer-game-service/2015/12083533

Please feel free to message me any questions before or after.

If you don’t hear from someone within two business days of applying *PLEASE 
MESSAGE ME*.  <-- that’s in caps so you know you won’t be “bothering” me. 
Getting someone hired is super important, but sometimes balls get dropped.

If you are underrepresented in tech, please consider applying. If you 
aren’t looking, please share this. Mattel values diversity, and so do I. 
Everyone loves toys, everyone can be a parent. We need a variety of 
viewpoints to ensure our products are great for everyone.

If you want to talk before applying, feel free to DM me. If you’d rather 
talk to someone other than some cis white dude, ping @Claudia4Justice on 
Twitter.

If you identity as a woman, non-binary, gay, bi, ace, queer, black, brown, 
differently abled, or otherwise, please apply. We need your particular 
insight. Diversity makes better products and teams. If you need special 
considerations, we will fight to get them for them for you.

-- 
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/84974a28-66bf-4e6a-b341-c646cc7dee3c%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


Re: [go-nuts] Go GTK vs QT for Linux

2019-06-18 Thread Tyler Compton
Just noticed that I mentioned the wrong package. The runtime package for
GTK is libgtk-3-0.

On Mon, Jun 17, 2019 at 9:48 AM Tyler Compton  wrote:

> I haven't personally used this library, but I'd think you'd only
> need libgtk-3-dev and libappindicator3-dev at compile-time. You should be
> able to get away with the smaller runtime packages libgtk-3-dev
> and libappindicator3-1 once your application is built.
>
> On Mon, Jun 17, 2019 at 6:56 AM Subramanian Sridharan <
> clawsonfir...@gmail.com> wrote:
>
>> Hi guys
>>
>> I've been fiddling around this  
>> package
>> which uses GTK bindings in Go to achieve systray functionality.
>> But it depends on *libgtk-3-dev *and* libappindicator3-dev *which amount
>> to around 300 MB.
>>
>> Have you guys come across any other package that implements GTK or QT
>> binding in Go?
>>
>> How do GTK and QT weight against each other with respect to Go?
>>
>> --
>> 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/c9d629e6-4e09-4c1a-ac69-906cd259f2af%40googlegroups.com
>> 
>> .
>> 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/CAA%3DXfu0__xK-J5ztz5GcLCq7sCtZAqf29mWtuzP38648RiC3iA%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.


[go-nuts] Re: Go GTK vs QT for Linux

2019-06-18 Thread yvan . godin
Hello

only played with Go and gotk3 to check a simple demo in Linux Mint 64b  
(Ubuntu based) 
on Linux very easy because most of GTK3 lib are already present
some difficult to make it work on Windows and create a binary with all DLL 
but after some struggle success

you can see the result including binaries for my naive  clock here 


not tested with QT because I find this lib to much heavy 

cheers

Le lundi 17 juin 2019 15:56:04 UTC+2, Subramanian Sridharan a écrit :
>
> Hi guys
>
> I've been fiddling around this  
> package 
> which uses GTK bindings in Go to achieve systray functionality.
> But it depends on *libgtk-3-dev *and* libappindicator3-dev *which amount 
> to around 300 MB.
>
> Have you guys come across any other package that implements GTK or QT 
> binding in Go?
>
> How do GTK and QT weight against each other with respect to Go?
>
>

-- 
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/a66d5f15-b920-4f36-bbe2-c98071f9ae2d%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


[go-nuts] [ANN] VictoriaMetrics - fast open source time series database written in Go

2019-06-18 Thread Aliaksandr Valialkin
Hello all,

I'm happy to announce VictoriaMetrics - fast open source time series 
database written in Go - https://github.com/VictoriaMetrics/VictoriaMetrics
 .
It is written entirely in Go except of gozstd 
 part, which is a cgo wrapper for zstd 
. It has the following features:

- It contains simple Go code without complex abstractions and fancy 
algorithms, so everyone can inspect it and contribute to it 

.
- It contains the minimum number of external dependencies - see go.mod 
. 
This means faster compile times and slimmer binaries. Read more about 
stripping dependency bloat here 

.
- It doesn't use mmap and WAL. Read more about this in the following 
articles:
   * https://medium.com/@valyala/mmap-in-go-considered-harmful-d92a25cb161d
   * 
https://medium.com/@valyala/wal-usage-looks-broken-in-modern-time-series-databases-b62a627ab704
- It is easy to configure and operate.
- It is designed to be used as long-term storage for Prometheus.
- It may collect data from multiple Prometheus instances via standard 
remote write API 
,
 
so the data may be queried later in a single query (aka global querying 
view).
- It provides PromQL 
-compatible
 
query language, so it may be used as drop-in replacement for Prometheus 
dashboards in Grafana.
- It is optimized for speed and low resource usage.
- It provides good on-disk compression 

 
that is better than Gorilla compression 
.
 
This means more data may be stored without downsampling.
- It provides free open source cluster version 
.

-- 
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/6fcc8f99-0b52-4fe3-9d04-d7282b193ed0%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.