ファームウェアエンジニアの中林 (id:tomo-wait-for-it-yuki) です。大好評の組込みRustで使えるライブラリをゆるく紹介していく「ぶらり組込みRustライブラリ探索の旅」シリーズ、第2弾はATコマンドクライアントライブラリのatatです。 私ごとですが、拙著「基礎から学ぶ組込みRust」ではネットワーク接続して遊ぶ、という内容が書けておらず、ずっとリベンジの機会を伺っています。atatは組込みRustでネットワーク接続して遊ぶ上で有力な選択肢になりそうなcrateです。 atat 本エントリ内で紹介する使い方や内部実装は、v0.16.1をもとにしています*1。 github.com https://docs.rs/atat/0.16.1/atat/index.html 特徴 atatはno_std環境で使用できるATコマンドクライアントライブラリです。embedde
Javaのメモリ確保指定のオプションで、最大メモリは-Xmx、初期メモリは-Xmsで指定します。 -XmxのほうはMemory maXimumかなーと感じるのだけど、-Xmsのほうはminimumでもないしなんだろーと思いながら「まぁ気にしてもしかたない」と25年くらい放置してたわけです。 それがちょっとTwitterで話題になってて、調べてみたらStack Overflowにそれっぽいものがありました。 Yes, ms = minimum heap size / heap memory start size and mx = maximum heap size. https://stackoverflow.com/questions/58164083/why-did-java-chose-xmx-and-xms-naming-convention-for-heap-sizes -Xmsは
We’re testing the ability for ChatGPT to remember things you discuss to make future chats more helpful. You’re in control of ChatGPT’s memory. We’re testing memory with ChatGPT. Remembering things you discuss across all chats saves you from having to repeat information and makes future conversations more helpful. You’re in control of ChatGPT’s memory. You can explicitly tell it to remember somethi
TL; DR YJITをDocker/Kubernetesでで有効にするには RUBY_YJIT_ENABLE=1 or RUBYOPT=--yjit YJITはデフォルトで256MBのメモリ領域を確保するため、全体のメモリ消費量が上がる Docker/Kubernetesでメモリ量を制御したい場合、RUBYOPT=--yjit-exec-mem-size=128のようにメモリ確保量を変更すればよい Ruby 3.1から使えるYJIT Ruby on Railsで動くアプリケーションでRubyのMJITが効果的でないことは色んなところで書かれていて、Ruby 3.1から実験的に導入されたShopify製のYJITでは対照的にRailsでのパフォーマンス改善が見込めるという期待があります。 ただしこのYJIT、動かすときには(JITなのでそりゃそうですが)デフォルトで256MiBのメモリを確
TechFeed Conference 2022 Pick up Java 19の注目新機能Virtual Threadについて ~TechFeed Conference 2022講演より 本記事は、2022年5月に開催されたTechFeed Conference 2022のセッション書き起こし記事「Java 19 の注目新機能 Virtual Thread について(てらだ よしお) — TechFeed Conference 2022講演より」を転載したものです。オリジナルはTechFeedをご覧ください。 皆さん、こんにちは。Microsoftの寺田です。今日はJavaの最新動向についてご紹介していきたいと思います。どうぞよろしくお願いいたします。 まず最初にこちらをご覧ください。 2017年にJava 9をリリースして以降、Javaは半年に1度、アップデートするようになりました
前回記事で紹介したような、中国戦線で様々な残虐行為に手を染めてきた兵士たちは、その後どんな人生を送ったのだろうか。 敗戦後には連合軍によるBC級戦犯裁判が行われたが、中国での戦争犯罪に関する裁判は極めて限定的なものでしかなかった。いかに被害が甚大であっても、個々の事件について犯人を個人として特定できる証拠がほとんど残されていなかったためだ。中国国民政府による裁判で訴追された日本人戦犯はわずか883人、うち有罪判決を受けた者は504人しかいない。しかも服役者のすべてが、国共内戦による混乱の中、1949年2月には日本に送還されている。[1] 南京大虐殺に関してさえ、有罪(死刑)判決を受けた者は、東京裁判で裁かれた松井石根(中支那方面軍司令官)、南京軍事法廷で裁かれた谷寿夫(第六師団長)、向井敏明、野田毅、田中軍吉の5名しかいない。向井と野田は「百人斬り競争」、田中は「三百人斬り」で新聞報道され
イントロ ペパボ社内 Slack で Linux の CoW = Copy On Write について、 id:ryuichi1208 id:udzura とディスカッションして盛り上がっていた。カーネル内で CoW を処理する関数を追えないか? という話があがったので、調べてみた次第。 ( なぜ CoW の話が出てきたのか / どんなことをディスカッションしてたのかは id:ryuichi1208 がまとめくれるかも? ) 結論 CoW を観察するには do_wp_pageを観察するといいみたい wiki.bit-hive.com ( いつもお世話になっております ) do_wp_page のソース https://elixir.bootlin.com/linux/v5.11.22/source/mm/memory.c#L3085 検証環境 Vagrant で用意した bento/ubu
Kerla is a monolithic operating system kernel written from scratch in Rust which aims to be compatible with the Linux ABI, that is, it runs Linux binaries without any modifications. Implements *NIX process concepts: context switching, signals, fork(2), execve(2), wait4(2), etc. Supports commonly used system calls like write(2), stat(2), mmap(2), pipe(2), poll(2), ... No disk support for now: initr
IntroRunning out of memory is never fun, but it's incredibly frustrating when you've already taken some precautions and calculated your exact memory needs. "My application requires 4GB of memory. How is it possible I ran out of memory on my 6GB machine!?". As it turns out, this was a real possibility in a garbage collected ("GC") language like Golang. The emphasis is on the word "was" because Go
In this blog post, I delve into the comparison of memory consumption between asynchronous and multi-threaded programming across popular languages like Rust, Go, Java, C#, Python, Node.js and Elixir. Some time ago I had to compare performance of a few computer programs designed to handle a large number of network connections. I saw huge differences in memory consumption of those programs, even exce
Zig And Rust Mar 26, 2023 This post will be a bit all over the place. Several months ago, I wrote Hard Mode Rust, exploring an allocation-conscious style of programming. In the ensuing discussion, @jamii name-dropped TigerBeetle, a reliable, distributed, fast, and small database written in Zig in a similar style, and, well, I now find myself writing Zig full-time, after more than seven years of Ru
memlabAnalyzes JavaScript heap and finds memory leaks in browser and node.js
How we tracked down (what seemed like) a memory leak in one of our Go microservices Detectify is driving the future of internet security with appsec solutions powered by automation and crowdsourcing of web vulnerabilities. Detectify is a cloud-native security solution built upon microservices and here comes a blog post from the tech team’s adventures. The developer team at Detectify has been worki
Hi, my name is Tautvydas and I’m a software developer at Unity working in the Windows team. I’d like to share a story of debugging an elusive memory corruption bug. Several weeks ago we received a bug report from a customer that said their game was crashing when using IL2CPP scripting backend. QA verified the bug and assigned it to me for fixing. The project was quite big (although far from the la
The Chromium project finds that around 70% of our serious security bugs are memory safety problems. Our next major project is to prevent such bugs at source. The problem Around 70% of our high severity security bugs are memory unsafety problems (that is, mistakes with C/C++ pointers). Half of those are use-after-free bugs. (Analysis based on 912 high or critical severity security bugs since 2015,
Dragan Milic Monday 23 Nov 2020 Intro RAM is most likely the scarcest resource that is first exhausted on your servers. If you’re serious about running software under Linux/Unix, you’re certainly aware of what an OOMKill is. Short refresher: when a program requests a new memory page from the kernel two things can happen. There is a free memory page: The kernel page assigns the page to the process
In this case, reallocating the object as one of those three types didn't seem to me like a nice way forward (although it should be possible to exploit this somehow with some effort, e.g. by using count.counter to corrupt the buf field of seq_file). Also, some systems might be using the slab_nomerge kernel command line flag, which disables this merging behavior. Another approach that I didn't look
Go のGCのオーバーヘッドについて GoのGarbage Collector (GC)の性能は非常に優秀で、オーバーヘッドが問題となることはあまりありません。ただヒープを非常に多く使っている場合、GCが多くのCPU時間を消費するケースがあります。 本記事では、まずGoのGCの概要に触れ、その後GCオーバーヘッドが高くなるケース、そして回避策を検討します。 本記事は下記記事を大きく参考にしています。素晴らしい記事に感謝いたします。 Avoiding high GC overhead with large heaps 注意点 単に pprof を取得し、GCが多くCPU時間を消費していた場合、必ずしも本記事が扱う、ヒープの多さ依存の問題が原因とは限りません。 GoのGCは、直近のGCを行った結果生き残ったデータ量に対して、新たにアロケートしたデータの量が一定値を超えると実行されます。 1 こ
この記事は、みらい翻訳のカレンダー | Advent Calendar 2022 - Qiita の13日目です。 こんにちは。プラットフォーム開発部でリードエンジニアをしているchanceです。 今回は コンテナ(AWS ECS on Fargate)上での Java(JVM) のメモリのお話をします。 概要 先日、商用環境の ECS で試運転させていた Java アプリのコンテナが度々再起動してしまう事象がありました。 幸い、まだリリース前だったためサービス影響はありませんでしたが、原因特定のためさっそく調査を開始しました。 コンテナの停止理由は OutOfMemory だったのですが、Java のログにはそのような出力はされていませんでした。Java ヒープの枯渇ではなく OS のメモリを使い切っていたようです。AWS のコンテナの場合、メモリを使い切るとコンテナが強制終了されるとの
About half a year ago Bronley Plumb kindly made me aware of a memory leak in one of my open-source packages. To see this memory leak in action it was necessary to open a browser and its dev tools to execute some manual steps. On top of that, the memory had to be inspected manually. It was a complicated procedure. Normally I just add a failing test before I fix a bug. This time it was a bit more tr
Linux Daily Topics 2020年1月8日Fedora 32がEarlyOOMをデフォルト実装へ、メモリ不足によるフリーズを回避 Fedoraプロジェクトは1月5日(米国時間)、2020年春にリリース予定の「Fedora 32」において「EarlyOOM」パッケージをデフォルトでインストール/有効化することを明らかにした。 Changes/EnableEarlyoom rfjakob /earlyoom -GitHub EarlyOOMは物理メモリおよびスワップ領域が不足した場合、特定のしきい値に応じてもっともメモリを占有するプロセスを終了させる、ユーザスペースで動くデーモン。利用可能なメモリおよびスワップ領域をつねに監視し、それぞれ10%を下回るとSIGTERMを、5%を下回るとSIGKILLを、もっとも占有するプロセスに対して送信し、プロセスを強制終了させる。 Fed
人間は年を重ねるにつれ記憶力が低下し、場合によっては認知症やアルツハイマー病を発症して日常生活すら困難になることがあります。高齢者の脳に電流による刺激を与えた新たな実験で、4日間毎日20分の電流を与えることで、高齢者の記憶力が1カ月間向上したことが明らかになりました。 Long-lasting, dissociable improvements in working memory and long-term memory in older adults with repetitive neuromodulation | Nature Neuroscience https://doi.org/10.1038/s41593-022-01132-3 Electrical currents to the brain improve memory for older adults, study fi
Googleは2021年9月4日(米国時間)、メモリエラーが「Google Cloud」の顧客とそのクラウドワークロードに与える影響を最小限に抑えるために開発した「Memory Poisoning Recovery」(MPR:メモリポイズニングからの回復)機能について公式ブログで解説した。特に「SAP HANA」をクラウドで運用している企業にとって、これは重要なイノベーションだとしている。 Googleは2021年第4四半期から、Google CloudのIaaS「Google Compute Engine」について、メモリ最適化マシンファミリーの第2世代インスタンスで、MPR機能を利用できるようにする計画だ。 実は頻発しているメモリエラー Googleは、「(サーバの)メモリエラーは最も一般的なタイプのハードウェア障害であり、本番ワークロードとシステムの信頼性への影響という点で、最も厄介
j次のブックマーク
k前のブックマーク
lあとで読む
eコメント一覧を開く
oページを開く