techlist.io

Linux

22 posts

Discord2025-04-032 min readCurated summary

How to Stream Games and Applications to Discord from Desktop or Mobile

Discord lets users stream games, applications, or entire screens from desktop and mobile while in a voice call. Desktop users can choose between sharing a specific application or their whole screen, while mobile users can only share everything displayed on their device. Stream quality, audio support, and available features vary by platform, with Nitro offering higher-resolution streaming options. ## Streaming from Desktop - Works on Windows, macOS, and Linux. - Join a voice call in a server channel or DM. - Select the screen-sharing button, then choose: - A specific application or game - The entire screen - A capture device - Adjust stream quality and select **Go Live**. ## Streaming from Mobile - Available on iOS and Android smartphones and tablets. - Open a voice call and expand the bottom options menu. - Tap **Share Your Screen** and confirm using the device’s streaming controls. - Mobile streaming shares the entire screen, including notifications and device audio. - Users should mute notifications to avoid exposing private information. ## Sharing an Application vs. the Entire Screen - **Share Application** - Shows only the selected game or application. - Can include audio from that application without sharing sounds from other apps. - Helps keep unrelated content and notifications private. - **Share Entire Screen** - Shows everything visible on the display. - Can share system audio from all applications. - Viewers may see notifications, messages, or other sensitive content. - Mobile devices only support full-screen sharing. ## Audio Support by Platform - Windows, the mobile app, and Chrome support application audio sharing without additional setup. - macOS supports audio streaming on macOS Ventura or later. - Audio sharing is unavailable through non-Chrome browsers and on Linux at the time of publication. ## Choosing Stream Quality - **Smoother Video** prioritizes frame rate by reducing resolution, making it better for fast-moving games. - **Better Text Readability** preserves the application’s resolution while lowering frame rate, which is useful for documents, artwork, or homework. - Discord Nitro provides HD streaming at higher resolutions and up to 60 frames per second. Choose application sharing when privacy and focused audio matter; use full-screen sharing when viewers need to see everything. On mobile, review notifications and other visible content before starting because the entire device screen will be broadcast.

Discord2025-03-043 min readCurated summary

Discord Patch Notes: February 3, 2025

Discord’s February 3, 2025 patch focuses on faster startup, more reliable infrastructure, improved notifications, and extensive usability fixes across desktop and mobile. Major changes include a roughly 20% improvement in median Android launch times, a Rust rewrite of the Media Proxy service that reduced aggregate latency by about 22%, and substantially improved push-notification delivery. The release also adds desktop DM Apps, redesigns Privacy & Safety settings, and addresses numerous platform-specific bugs. ## Performance and Reliability - Android app initialization improvements reduced launch times by approximately 20% on the median Android device. - Discord rewrote its Media Proxy service from Go to Rust and modernized its infrastructure: - Aggregate latency improved by about 22%. - Latency at the 90th percentile improved by more than 40%. - Service reliability also improved. - Push-notification reliability increased across server sizes: - Servers with fewer than 2,500 users now achieve a 99.98% delivery rate within 30 seconds. - Discord can notify approximately 20 million users on large servers such as Midjourney within 15 minutes of an `@everyone` mention. - Android 13 and earlier received fixes for layout failures caused by device rotation and incorrect screen-size calculations. ## New Features and Interface Updates - Desktop users can now launch Apps directly in DMs. - A quick-launch bar displays recently used Apps at the top of the DM list. - Privacy & Safety settings were redesigned with: - A new tab structure. - Better grouping and clearer descriptions. - Improvements intended to support future Trust settings. - macOS desktop notifications now use native operating-system APIs: - Message sounds respect Focus and Do Not Disturb modes. - Multiple notifications from the same channel can be grouped. - Desktop search now autocompletes `from:me` and `mentions:me`. - Linux now supports Soundshare and Wayland screen sharing, including video and audio support on Ubuntu 22 and later. - Mobile users can edit server invite links while inviting someone. - Push notifications now include user nicknames. ## General Bug Fixes - Fixed UI and layout problems involving: - Forum channel tag editing. - Overlapping channel-topic modals. - Incorrect friend-request layouts at narrow desktop widths. - Misaligned images, padding, borders, and animations across Shop, Quests, profiles, and reaction pickers. - Resolved Android issues involving duplicated channel-name letters, hidden confirmation dialogs, incorrect toast positioning, keyboard overlap, and navigation-bar padding. - Fixed mobile and iOS issues affecting: - Search-result counts and back-swipe navigation. - Text-entry scrolling during channel searches. - Excessive zooming. - Animated Emojis stopping after interaction. - Nitro Home back-swipe navigation. - Corrected problems with Privacy & Safety tabs being cropped or nonfunctional. - Improved reliability for the Claimed Quests interface, especially for users with many completed Quests. - Fixed profile customization issues related to Nitro Credit. - Corrected custom status duration behavior. - Resolved issues with mutual-friend and mutual-server views getting stuck loading. - Fixed Emoji picker server filters and enabled editing of Emoji forum tags whose associated Emoji had been deleted. - Corrected several Shop, tablet banner, profile-effect, and mobile DM layout issues. Overall, the patch combines measurable backend performance gains with a broad collection of cross-platform fixes. Users should see faster Android launches, more dependable media uploads and notifications, improved desktop and mobile navigation, and fewer layout and interface failures.

Discord2025-02-263 min readCurated summary

Discord Patch Notes: November 1, 2024

Discord’s November 1, 2024 patch focuses on improving performance, reliability, responsiveness, and cross-device usability. Major updates include stronger foldable-device support, better mobile multitasking and side-by-side views, macOS screen-sharing keybinds, and website performance gains of up to four seconds in average page-load time. The release also fixes a broad range of interface, messaging, theming, and platform-specific bugs. ## Foldable Devices and Multitasking - Foldable devices receive improved support designed to work more reliably without bespoke fixes. - Mobile Discord now handles resizing more intelligently for Sidecar, split-screen, and other multitasking layouts. - Users are encouraged to report remaining foldable-device issues through Discord’s bug megathread or support tickets. ## Desktop and Web Performance - Electron was upgraded from version 30 to version 32 on Windows, macOS, and Linux. - Discord.com received performance improvements that reduce average page-load times by up to four seconds. - Additional core web vitals and responsiveness were improved. - macOS 15 and later now support a keybind for toggling screen sharing, available under **User Settings > Keybinds**. - Friend links opened in a browser now properly communicate with the running desktop client. ## General Interface and Platform Fixes - Fixed missing profile-screen actions, incorrect profile banner zoom, navigation-bar rendering issues, and mobile layout shifts. - Corrected avatar decoration overlap with unread-message status indicators. - Fixed notification bubble shapes, emoji-picker category navigation, theme colors, keybinding icon colors, and long category-name handling. - Improved profile banners and Server Guide text rendering on foldable devices and iOS. - Fixed issues involving onboarding prompts, the App Launcher, Mod View, channel permissions, and role assignment through Simplified Profiles. - Corrected Shop problems involving banners, scrolling, collection tile shapes, and app-button icon colors. - Poll answers can now be selected and copied. - Fixed overlay custom-emoji visibility, profile-effect controls, Nitro gifting padding, and collectible purchase wording. - X.com embeds no longer incorrectly interpret embed content as Markdown. - Fixed several mobile and desktop rendering problems, including channel settings flashes, emoji alignment, and profile layout behavior. ## Chat and Messaging - Corrected oversized emoji rendering in chat. - Fixed mobile Voice Message tooltips, input placement, and animation behavior. - Deleted messages should no longer briefly remain in mobile DM previews. - Fixed an iOS issue where drafts persisted between channels and another where text scaling changed after the keyboard collapsed. - Users can open profiles by clicking names in reply previews. - Prevented rapidly renaming a newly created thread from creating duplicate threads. - Fixed thread-creation theming issues and swipe actions during chat animations. - Corrected mobile notification settings appearing incorrectly in DMs. - Fixed iOS emoji alignment problems in messages. Overall, the patch is primarily a quality-of-life release: users should see better performance across web and mobile, more dependable support for foldables and multitasking, and fewer visual and interaction bugs.

Datadog2024-02-133 min readCurated summary

.NET Continuous Profiler: CPU and wall time profiling

Datadog’s .NET profiler uses low-overhead thread sampling to collect CPU and wall-time profiles suitable for production. CPU profiling measures time spent running on a processor, while wall-time profiling captures delays caused by I/O, locks, or scheduling. The implementation tracks managed threads, walks their stacks, aggregates samples, and periodically uploads profiles, with platform-specific optimizations for Windows and Linux. ## CPU and Wall-Time Profiling - CPU profiling identifies code consuming processor cycles. - Wall-time profiling finds slow methods regardless of whether threads are running, blocked, or waiting for I/O. - ETW, Linux `perf`, and .NET enter/leave hooks provide profiling data but impose too much overhead or require elevated privileges. - Datadog instead samples threads at intervals, captures their call stacks, and assigns durations to the samples. ## Managed Thread Sampling - The profiler tracks managed threads created through: - The thread pool - `Task` and `async/await` - Explicit `Thread` instances - `ICorProfilerCallback` notifications such as `ThreadCreated` and `ThreadDestroyed` maintain the `ManagedThreadList`. - `StackSamplerLoop` captures stacks and sends raw samples to `CpuTimeProvider` and `WallTimeProvider`. - `SamplesCollector` aggregates provider data, while a shared Rust exporter uploads profiles to Datadog every minute. - An early C# implementation caused native worker threads entering managed code to appear as application threads. Removing that implementation eliminated accidental self-sampling. ## Native Runtime Threads - Server-mode garbage collection uses native threads that can compete with application threads for CPU. - Because the .NET profiling API does not expose these threads directly, the profiler identifies them by their .NET 5 names: - `.NET Server GC` - `.NET BGC` - Their CPU usage is displayed under a Garbage Collector frame in the flame graph. ## CPU Sampling and Performance Optimizations - Every 10 milliseconds, the profiler searches for runnable managed threads, skipping up to 64 non-runnable threads. - `IsRunning` determines whether a thread is executing on a CPU: - Windows uses `NtQueryInformationThread`. - Linux reads `/proc/self/task/<tid>/stat`. - CPU sample duration is calculated from the difference between the thread’s current and previously recorded CPU consumption. - The initial Linux implementation used `std::ifstream` and `std::getline`, allocating an 8 KB buffer for each sample. - Replacing them with lower-level C file-reading code eliminated allocations and reduced CPU usage. The original approach consumed nearly 500 MB of allocations and about 2% of total CPU in testing. ## Wall-Time Profiling and Code Hotspots - Wall-time profiles work with Datadog tracing to explain why requests are slow. - The tracer provides the profiler with a span ID when a thread handles a request. - To avoid repeated expensive P/Invoke calls, the profiler exposes a memory location that the tracer can update directly. - Because short requests may finish before their thread is sampled, the profiler samples an additional group of ten span-associated threads beyond the initial five. - The duration between consecutive samples of a thread is attributed to the later sample, so heavily threaded applications produce longer individual wall-time sample durations.

Datadog2022-02-283 min readCurated summary

Profiling improvements in Go 1.18

Go 1.18 introduced major profiling improvements alongside features such as generics and fuzzing. Its Linux CPU profiler became substantially more accurate on multicore systems by addressing dropped `SIGPROF` signals, and profiler labels received an important correctness fix. These changes strengthened Go’s ability to connect continuous profiling data with tracing systems such as Datadog. ## More Accurate Linux CPU Profiling - Earlier Go versions used `setitimer(2)` to request a `SIGPROF` signal every 10 ms of CPU time. - On busy multicore systems, Linux could generate multiple signals within a single kernel “jiffy” window, but standard POSIX signals do not queue. - As a result, many signals were dropped: - A service using 20 CPU cores might generate roughly 2,000 profiling signals per second. - Its Go profile could contain only about 240 samples per second. - Linux’s software clock, commonly operating at 250 Hz, could only measure CPU time in roughly 4 ms intervals. This caused signal bursts and undercounted CPU usage. - `setitimer(2)` also distributed process-directed signals unevenly across threads, creating additional profiling bias. ## Combining `timer_create` and `setitimer` - `timer_create(2)` provided more reliable per-thread signal accounting and avoided most of the signal-dropping and thread-bias problems. - Its drawback was that the profiler needed awareness of every thread, including threads created independently by cgo code. - The Go 1.18 fix combined both timer mechanisms: - The signal handler identifies the signal source. - Signals from inferior sources are discarded. - The implementation accounts for short-lived threads and cgo edge cases. - The work originated from investigations into Go issues GH 35057 and GH 14434 and was developed through collaboration between contributors and Go maintainers. ## Profiler Label Correctness - Profiler labels, also called pprof labels or tags, associate key/value metadata with goroutines. - Labels are inherited by child goroutines and appear in CPU and goroutine profiles, enabling profiles to be filtered by request, service, or trace metadata. - Testing at Datadog revealed that some stack samples were missing labels they should have carried. - The cause was a CPU profiler lookup using the wrong goroutine reference. - The fix changed the profiler to use `gp.m.curg`, the thread’s actual current goroutine, rather than relying on `gp`, which can differ in certain runtime situations. Go 1.18’s profiling changes made CPU measurements more trustworthy on Linux and improved the accuracy of metadata attached to profile samples. Together, they provided a stronger foundation for correlating Go profiling with distributed tracing.

Datadog2017-05-172 min readCurated summary

Being a solutions engineer at Datadog

Solutions Engineers at Datadog combine customer support, technical investigation, and product improvement. They troubleshoot issues across configuration, dashboards, metrics, and alerting while collaborating with customers and engineers. The role also offers structured opportunities to build engineering skills and shape a career toward engineering, product management, or sales engineering. ## Role and Responsibilities - Serve as the technical point of contact for Datadog customers. - Handle tickets involving: - Agent and integration configuration - Dashboard and metric visualization - Alerting issues and bugs - Investigate customer needs, inspect source code, fix bugs when necessary, and coordinate with engineering teams. - Provide short-term workarounds and identify potential product enhancements. - Communicate with customers through chat and technical calls. ## Learning and Collaboration - New Solutions Engineers rapidly develop skills in technologies such as Linux, Ruby, and SQL. - The role requires multitasking while continuously learning new technical concepts. - Team members share knowledge through Datadog documentation and collaborative projects. - Customer feedback provides direct insight into how the product could evolve. ## Engineering Experience and Career Growth - During two-week “embedding” sprints, Solutions Engineers join engineering teams and work on projects alongside developers. - Embedding provides hands-on experience with: - Datadog’s internal technologies - Engineering and design challenges - Architectural decisions - Cross-team collaboration - Once fully trained, employees can pursue side projects such as improving demo environments or automating internal processes. - Career paths can be tailored toward engineering, product management, or sales engineering. Datadog presents the Solutions Engineer role as a strong fit for people who enjoy customer interaction, technical problem-solving, collaboration, and continuous learning. The company was hiring for these positions in New York, Paris, and remote locations.