Fork me on GitHub

thanks for the OOM-related pointers yday @conor.p.farrell @reborg


Weird JVM based fun with dbs in docker was why only the rails stuff ended up staying in containers long term at the old place iirc


Forever debugging memory issues on larger data tasks


@mccraigmccraig Is there any value opening up the JMX port and exposing it through Docker so you can run JConsole on it?


Also the run script within Onyx container was pretty good, so I use that quite a lot.


CGROUPS_MEM=$(cat /sys/fs/cgroup/memory/memory.limit_in_bytes)
MEMINFO_MEM=$(($(awk '/MemTotal/ {print $2}' /proc/meminfo)*1024))
XMX=$(awk '{printf("%d",$1*$2/1024^2)}' <<< " ${MEM} ${JVM_PEER_HEAP_RATIO} ")
# Use the container memory limit to set max heap size so that the GC
# knows to collect before it's hard-stopped by the container environment,
# causing OOM exception.

## Default BIND_ADDR to the machines hostname
: ${BIND_ADDR:=$(hostname)}
## For use when running a peer with access to the hosts eth0 interface
#: ${BIND_ADDR:=$(ifconfig eth0 | grep "inet addr:" | cut -d : -f 2 | cut -d " " -f 1)}
## For use when running a peer on AWS, where the routeable address is different
### from the address bound to eth0
#: ${BIND_ADDR:=$(curl )}

: ${PEER_JAVA_OPTS:="-Xmx${XMX}m -XX:+HeapDumpOnOutOfMemoryError -XX:HeapDumpPath=$SANDBOX -XX:ErrorFile=$SANDBOX/hs_err_pid_%p.log -XX:+UseG1GC -Xloggc:$SANDBOX/gc_%p.log -XX:+PrintGCCause -XX:+UseGCLogFileRotation -XX:NumberOfGCLogFiles=3 -XX:GCLogFileSize=2M -XX:+PrintGCDateStamps -server"}

echo "Peer Java Options: $PEER_JAVA_OPTS"

/usr/bin/java $PEER_JAVA_OPTS -jar /opt/myjar.jar


@jasonbell i'm already using yourkit against those instances - dyu know if i would get anything extra from jconsole ?


@mccraigmccraig I use VisualVM for monitoring my Clojure apps - mostly resources usage but there is also some nice diagnosis tools if things go badly wrong If you need really deep analysis then AppDynamics is really powerful (commercial software with a free trial)


Probably not, it's just my go to.


Morning All 🙂


Won an axe throwing tournament last night through pure luck skill

🎲 12
👍 12

Nice. Where was that?


Got to play a level of Phoenix Point, which was awesome


Also CD Projekt RED weren't there officially, but one of their team was just attending the conference as a regular person, so I got to chat to him, which was also ace




any insider insights? 😄


Haha, sadly nothing concrete that wasn't already known. I did say to him that my wife was also well hyped for the game, but slightly worried that she wouldn't be able to complete it because her twitch/FPS skills are poor, so some kind of 'story difficulty' (or, the holy grail, cross platform co-op) would be ace, and he said "I think you're going to be very happy with some of the things we're working on". Could mean they intend co-op if they have time, could just mean there's going to be a mega easy mode of the game


He did also semi jokingly ask if I'd consider coming to work in Poland 😉


that sounds extremely hopeful. Also, interesting, it sounds like Polish studios/branches have been recruiting recently, I’ve gotten some pings recently. I wonder if it’s an opportunistic Brexit related grab, or if there’s a sudden growth there


What's your experience of Brexit been? Any feeling like you're less welcome, or thoughts of moving somewhere else in Europe before it all comes crashing down?


TLDR I knew it was going to happen, I just didn’t expect it to be such a mahoosive clusterfuck


Being a Polish (or other new-to-EU-central-european) always made you a bit of a “special” cousin, because we had to fill out extra paperwork that other nationalities didn’t


Registering for some special card, proving that you were gainfully employed for a year after moving in, etc. It felt like being suspect by virtue of where you were born in


I know a number of European folks who've said they've got more abuse and felt unwelcome post Brexit, and have headed off to other EU countries


They later removed it apparently; but anyway once I ticked off the obligatory year, I never experienced anyone being nasty to my face about it; on the contrary, I met people who had Polish relatives in their families, Polish friends, or their friends had spouses from Poland


The number of UKIP flags on the houses in the neighbourhood grew steadily over the years though, and the relevant politicians started appearing in the news, and on people’s Facebook walls, etc, so you could see which way the wind was blowing, you just had to mentally accept that this was possible. I got somewhat involved during the elections (I’m naturalised, been here for > 10 years) then frustrated, then stopped reading news to cope (it’s amazing how good no news is good for your mental health.)


What happened to your friends? Were they also CS people? I wonder how much class, or location, makes a difference to how you’re treated. I have a feeling that as an engineer I’m shielded from a lot of ugliness.


Sorry, meetings. Some were CS people, most were not (or were actually foreign spouses of CS people). Admittedly 'friends' is pushing it in a lot of cases. 'Online acquaintances'. I suspect it has a lot to do with where you are living, which is probably quite heavily tied to your job etc


Weirdly when it comes to voting for Brexit it was mainly the rural areas who didn't have much in the way of 'them foreigners' who seemed to vote for it, but when it came to people saying they got more abuse/problems it was people in the cities etc. That may simply be self-selection that there aren't many other Europeans in the more rural areas though


One of my friends (who is English) lives in Eccles, which simultaneously has a sizeable Polish population (and a number of Polish corner shops with amazing not-Jaffa-cakes in different flavours and such) and also the only UKIP 'shop' I am aware of in Manchester (which presumably some of the 'native' population of the area went to. I don't know)


My area is mostly white UK. Non-UK folk in the area are fewer and tend to be from former commonwealth countries rather than elsewhere in Europe


Apart from round the corner where there is a house turned into 2 flats which has a number of Eastern Europeans (I don't actually know which country) who smoke copious amounts of weed and are bloody awesome (I am biased though because they think our dog is amazing and always say hi and give him a load of fuss when we go past)


Whistlepunks in the Great Northern @carr0t


Aah yes, that's it. Laura and I were talking about going there, but haven't got around to it yet


Was that a work thing, or out with mates?


Work celebration thing followed by curry


axe throwing paid for by coop dollars 😉


(or more likely, taxpayer dollars I guess)


I effectively paid for it myself by not efficiently extracting the maximum rate for my skills

trollface 4

@mccraigmccraig I use VisualVM for monitoring my Clojure apps - mostly resources usage but there is also some nice diagnosis tools if things go badly wrong If you need really deep analysis then AppDynamics is really powerful (commercial software with a free trial)


there is also which is an open source app for monitoring and paging which Signal Media uses (and was presented in their talk this week).


There is a risk with Prometheus along with a lot of other monitoring software, that if memory usage spikes too quickly prometheus won’t scrape soon enough and the metrics look fine right up until your container gets killed


But I think that’s entirely dependant on the workload you’re running


Yes, I would be interested to know more about the different tooling. I guess I'll be asking my friends that work at Signal Media about that 🙂


I also notice which talks about instrumenting containers and using Prometheus, seems to be part open source and part commercial.

👍 4

I think it’s one of the downsides of the pull model for metrics collection in general, that if things change quickly you might lose metrics right before the container dies


I think the risk still exists to some extent for the push model depending on the implementation. Some of the StatsD collectors for metrics I’ve seen run in another thread, so even there is still a risk that all of your metrics haven’t been pushed before the container dies


i've used ELK stack where we pushed logs and metrics from the app to the ELK stack via its api. We had a lot of metrics (30 million transactions a day), so it was tricky to see if anything was missing and we never had problems with our applications crashing.


I’d highly recommend datadog. We’ve enabled dozens of timeboards etc in it, and have detailed metrics on our apps. They support the JMX stuff too, so you can push all those events through the datadog (statsd++) daemon. We don’t run our clj/jvm apps in containers, so no problems for us there.


agree also on jvisualvm but I only really use it for local dev/tuning… on that front yourkit is even better though (but paid for). Also eclipse mat is good for memory leaks, and finding where a lazy seq is holding head etc…


I've had some success with monit and docker


b/c monit is quite lightweight and you can set the interval you can probably catch things... though the difficulty is capturing the error as & when