Fork me on GitHub
#off-topic
<
2022-08-08
>
Ben Lieberman15:08:13

Has anyone else experienced some video issues with certain Clojure talks on YouTube? I'm gonna submit a ticket but I get working audio and video that looks like this on @seancorfield’s REPL talk and then Rich Hickey's history of Clojure video. I have no other issues across the site though

Alex Miller (Clojure team)15:08:13

oh, so not ClojureTV. I don't see anything weird like that on the video

Ben Lieberman15:08:31

hm, must be on my end then. Thanks for checking

Bart Kleijngeld10:08:13

For what it's worth: my girlfriend showed me the same issue. She said she read it has to do with having to upgrade Windows. I haven't checked, but thought this might be useful to you. Edit: I pushed her to try and test another browser, and that seems to have helped.

skylize03:08:40

I can't recall the specifics, but I've had similar types of weirdness on YouTube before, always repeatedly on a single channel. I concluded the cause was YouTube generating multiple resolution variants from a single upload, when the source is encoded with a codec version slightly different from the closest matching codec on the server. If you choose a different resolution for paycheck, the problem will likely disappear.

Benjamin17:08:00

for monitoring a server, do you think the count of open file descriptors is a useful metric? calling lsof | wc -l takes so long. I wonder if cat /proc/sys/fs/file-nr | awk '{print $1}' is interesting. I guess what is really interesting is the proportion of open files to the limit

p-himik17:08:23

Adding -nPt to lsof should significantly speed it up.

Benjamin17:08:24

hm on my local pc it is only 10s down from 13s

p-himik17:08:37

Might try also adding b and l in there. For me, just nPt results in 3 s vs 10 s.

Benjamin17:08:42

I wonder if a lot of docker procs slow it down because I have a lot of docker running rn

ghadi17:08:36

prometheus node exporters expose this info

Benjamin17:08:40

one thing I know now is that with nothing running, it is basically instant 200ms

Benjamin17:08:55

googleing pormetheus

rolt17:08:24

the prometheus node exporter is based on /proc/sys/fs/file-nr

Benjamin17:08:26

so was knowing lsof line count or the content of file-nr ever something you wanted to know about your server? Did / does that help? Ok I guess it's a matter of having metrics of the operation of the system.

ghadi18:08:18

look into a monitoring system, rather than hand rolling individual metrics

ghadi18:08:54

datadog, prometheus, new relic, etc

rolt18:08:16

yes monitoring file descriptors is very useful for server monitoring, fd leaks happen. Most monitoring systems already have the alerts set up for this

rolt18:08:01

it did happen in my previous job (connection reset by client would leave a file open)

Benjamin18:08:50

ah that is interesting

Benjamin18:08:33

that sounds like aws servers likely already have something for this?

Aleh Atsman18:08:28

not sure about the exact metric though

Aleh Atsman18:08:47

cloudwatch is used automatically by all servers

jumar04:08:57

Monitoring number of open files is sometimes useful: • you can be running out of file descriptors simply because you open too many files or have too low nofile limit • you might even get a weird OOM error from JVM ("unable to create a new native thread) because of not having enough file descriptors. lsof can be quite slow, especially on macOS. On linux it tends to be much faster but yeah, maybe it still takes time. I wrote a little script which I used for monitoring specific metrics about our java app. That used /proc/sys/fs/file-nr.

jumar04:08:19

I believe datadog & co is interesting and useful, but can be quite expensive for small apps and companies. If you are on AWS you should definitely look at CloudWatch metrics, but I don't think you get this metric automatically: https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/viewing_metrics_with_cloudwatch.html

Benjamin08:08:31

:thumbsup: 👀