Introducing rpycbench, an open source python RPC profiler/benchmark. We do a lot of remote AI workload monitoring for CXL.mem at Micron Technology. Our internal application suite taught me a lot about RPyC, a very slick python extension that treats remote objects and functions as if they are local. I thought it would be cool to put together an open source tool to run experiments on how RPyC performs compared to HTTP/REST. You can benchmark your own network topology with bandwidth, latency, server forking/threading strategies, run locally or remotely with zero deployment, visualize recursive network round trips, get telemetry and stats on stack frames and netref object resolution from the command line with no code. THEN, you can turn right around and use the python API to profile + optimize your existing app code using all the same tools. https://bit.ly/3JTGFR3
Introducing rpycbench: Open Source Python RPC Profiler/Benchmark
More Relevant Posts
-
Antonio Cuni (20 years PyPy core) dropped SPy: a compiled Python variant designed for performance. 𝗧𝗵𝗲 𝗰𝗼𝗿𝗲 𝗶𝗱𝗲𝗮 Python's dynamism makes it fundamentally hard to optimize. Everything is mutable, dispatch is complex, and pointer chasing destroys cache locality. JITs help but introduce unpredictable performance cliffs. SPy takes a different approach: remove the dynamism that kills performance, but add new features that keep Python's expressiveness intact. 𝗪𝗵𝗮𝘁 𝗺𝗮𝗸𝗲𝘀 𝗦𝗣𝘆 𝗱𝗶𝗳𝗳𝗲𝗿𝗲𝗻𝘁 👉🏽 Import time vs runtime: The world freezes after imports. Modules and classes become immutable at runtime. 👉🏽 Redshifting: Blue expressions evaluate at compile time, red at runtime. It's partial evaluation on steroids. 👉🏽 @blue functions: Write metaprogramming code that runs during compilation. Like C++ templates, but debuggable with Python's interpreter. 👉🏽 Static dispatch: Operator lookup happens at compile time based on static types. The runtime overhead just vanishes. 𝗧𝗵𝗲 𝗿𝗲𝘀𝘂𝗹𝘁? A raytracing example runs 200x faster than CPython. The compiler generates code comparable to C/Rust, with predictable performance. 𝗧𝗿𝗮𝗱𝗲-𝗼𝗳𝗳𝘀 SPy isn't 100% Python compatible (by design). It formalizes constraints that Python devs already follow in practice: stable types, immutable classes, minimal monkey-patching. But you get metaprogramming power back through , which feel surprisingly natural. The project is early stage but the ideas are solid. Worth watching if you care about Python performance without JIT unpredictability. #python #ai #opensource #llm
To view or add a comment, sign in
-
𝗣𝘆𝘁𝗵𝗼𝗻 𝟯.𝟭𝟰: 𝗙𝗶𝗻𝗮𝗹𝗹𝘆, 𝗬𝗼𝘂 𝗖𝗮𝗻 𝗗𝗶𝘀𝗮𝗯𝗹𝗲 𝘁𝗵𝗲 𝗚𝗜𝗟! Big news for Python devs: Python 3.14 lets you turn off the Global Interpreter Lock (GIL) - a historic step in the language. --- What’s the GIL? The Global Interpreter Lock (GIL) prevents true multi-threading in standard Python: even with multiple threads, only one executes Python code at a time. It’s been a pain for devs building high-performance or parallel apps. What’s new in Python 3.14? • You can now run Python without the GIL! • Multiple threads can finally run real Python code in parallel on multiple CPU cores. Which means... • Multi-threaded code (e.g., concurrent web servers, data crunching, agent apps) gets a major speedup -> no more C extensions/hacks needed. • You can better use multi-core hardware: just like Java, C++, and Go. --- How to use it (very simply): • With Python 3.14 the default interpreter build remains the traditional GIL-enabled version, so existing Python code and libraries should work as before. • If you’re working on new parallel or CPU-bound threading workloads, you can optionally install or build the free-threaded (GIL-disabled) version of Python. Caveats: Not all third-party libraries are yet fully compatible with the GIL-free build. Also, single-threaded workloads may run slightly slower in this build, so the benefit is primarily for multi-threaded, core-saturating tasks. --- Overall: Python 3.14 lets you choose:- classic simplicity or full-power concurrency. It makes Python more future-proof for fast, modern applications. ♻️ Share it with your network if you find it useful, and follow Mayank Sultania for more practical AI tips. Video by: DailyDoseofDS.com #Python #Concurrency #GIL #Python314 #Developers #Performance
To view or add a comment, sign in
-
🚀 Beyond the GIL: Python 3.14’s Hidden Performance & DevX Upgrades The core challenge for Python has always been true multi-core utilization. While the optional "free-threaded" build addresses this for CPU-bound work, these other features provide direct, immediate performance and quality-of-life wins today: Native Subinterpreters (PEP 734): This is the true multi-core parallelism engine. It allows multiple, isolated Python interpreters to run in parallel within a single process. The Shortcut: Use the new concurrent.interpreters module for parallel processing with less memory overhead than traditional multiprocessing. Think isolated, concurrent ML model serving. Template Strings (T-Strings): A new string literal type that defers evaluation, making them ideal for safer string processing. Actionable Tip: Use T-Strings for securely generating SQL queries or configuration files, drastically reducing the risk of injection attacks compared to raw f-strings in certain contexts. Incremental Garbage Collector: Say goodbye to those annoying, split-second application freezes! The new GC works in small, quick steps, resulting in much smoother latency for web servers and GUIs. This isn't just a new Python version; it's a re-architecture for the multi-core, high-concurrency world. Which one of these 3.14 features will have the biggest impact on your current project's system design? Share your thoughts! 👇 #SystemDesign #AI #Tech #CloudComputing #DeveloperTools #LearningJourney
To view or add a comment, sign in
-
-
It’s always tempting to upgrade to the newest Python release as soon as it’s out — but for Python 3.13 and 3.14, it’s worth pausing for a closer look. These versions aren’t just “routine updates.” They mark the beginning of a major shift: the introduction of Free-Threaded Python, a build of CPython without the Global Interpreter Lock (GIL). Removing the GIL allows true parallel execution across CPU cores — an exciting step forward for performance and concurrency. But this change also alters how the interpreter interacts with native C/C++ extensions, and many popular libraries (like NumPy, Pandas, TensorFlow, and Pillow) were originally built assuming the GIL existed. Before upgrading, it’s crucial to know whether your dependencies are ready for this new world. The PSF has introduced a helpful tool for that: ft-checker.com It provides a clear heatmap showing which Python packages are currently compatible with the Free-Threaded builds of Python 3.13 and 3.14 — and which ones still need work. #Python #GIL #FreeThreaded #Concurrency #ParallelComputing #SoftwareEngineering #OpenSource #Python314 #Python315 #CPython
To view or add a comment, sign in
-
#python #venv #pip #uv #conda 0️⃣ introduction well, I don't usually work with python. at least it's not my primary language. so i recently found out my entire mac was running under a default base Conda environment. I had to dig to understand python environments and package managers. 1️⃣ what is an environment official venv doc says 1: " lightweight “virtual environments”, each with their own independent set of Python packages installed in their site directories." A virtual environment is a lightweight isolated space where Python packages are installed. if 2 projects have different sets of Python packages, they would not cross-over. 2️⃣ what is a package manager? Python defaults to pip. Pip is a "a package manager (package management system) written in Python and is used to install and manage software packages" 2 A package manager installs and manages packages. Dependency, subdependency, versioning, install, remove, info etc. Virtual Environment only contains the installed packages. 2️⃣ put it together To properly work with a Python project, I would create a virtual environment. Then I would install necessary packages inside the virtual environment. ✨ venv + pip ✨ 3️⃣ Conda Conda is an alternative to venv + pip * manages everything Python and etc needed for your project. * widely used in data science - or so i've heard. I'm not sure on this. * relies on Anaconda and PyPl for the packages. Other options don't have access to Anaconda, it seems. 4️⃣ uv uv is also an alternative to venv + pip uv is super fast * widely used in software development * LangChain and LangGraph uses this 5️⃣ why do we have multiple options? i read this great article https://lnkd.in/eJ3_UsjC basically had the same question as me. 6️⃣ Quick overview I also went to #Gemini for an answer. img below is the table overview. 7️⃣ conclusion much of these would come to me more naturally when i work with Python heavily. but at least I know that I don't need to have a base Conda environment running at my root - it's convenient though. And I know that I can use venv+pip or uv for any projects I'm thinking of. #softwareengineer #softwaredevelopment #softwareengineering #softwaredeveloper #swe #sde #computerscience 1 : https://lnkd.in/ejTmWqyZ 2 : https://lnkd.in/ewiaHyRS)
To view or add a comment, sign in
-
-
🎥 Python just removed the GIL after 33 years. It will change everything for multi-threaded code Python 3.14 ships with a free-threaded version that unlocks true multi-core performance. No more single-threaded bottlenecks. No more heavy multi-processing overhead. (🎥 Full breakdown with code examples in my new video, link in comments👇🏽) 𝗧𝗵𝗲 𝗯𝗮𝗰𝗸𝘀𝘁𝗼𝗿𝘆 Python was created in 1991. Multi-core processors didn't exist until 2001 (IBM's Power4). When they added threading support in 1992, they used the Global Interpreter Lock (GIL) to keep things simple and thread-safe. The GIL is a single lock that only allows one thread to execute at a time. Launch 10 threads or 1 thread? Same performance on a 16-core machine. 𝗪𝗵𝘆 𝘄𝗲 𝗸𝗲𝗽𝘁 𝗶𝘁 👉🏽 Low overhead for single-threaded programs 👉🏽 Simple memory management (reference counting) 👉🏽 Compatibility with non-thread-safe C libraries 👉🏽 Easy to implement (one lock vs fine-grained locking) 𝗧𝗵𝗲 𝗽𝗿𝗼𝗯𝗹𝗲𝗺 Your multi-threaded code runs sequentially. Thread 1 executes, releases the GIL, Thread 2 executes, releases the GIL. Zero parallelism. You had to use multi-processing with massive memory overhead and separate interpreters. 𝗣𝘆𝘁𝗵𝗼𝗻 𝟯.𝟭𝟰 𝗰𝗵𝗮𝗻𝗴𝗲𝘀 𝘁𝗵𝗲 𝗴𝗮𝗺𝗲 Two versions ship together: - Standard Python (with GIL) - Free-threaded Python (no GIL) Same code. Actual parallelism. Multi-core performance with threading. 𝗛𝗼𝘄 𝘁𝗼 𝘁𝗿𝘆 𝗶𝘁 Install: - Install with UV in seconds: - uv python install 3.14t Run your code: - No GIL: PYTHON_GIL=0 python script[.]py - With GIL: PYTHON_GIL=1 python script[.]py That's it. Same threading code, multi-core performance unlocked. 𝗣𝗲𝗿𝗳𝗲𝗰𝘁 𝗳𝗼𝗿 - Data processing pipelines - Scientific computing - Image/video processing - Any CPU-bound workload After 30+ years, Python finally leverages all your cores with threading. No more choosing between simple threading and heavy multi-processing. 𝘈𝘳𝘦 𝘺𝘰𝘶 𝘶𝘴𝘪𝘯𝘨 𝘊𝘗𝘜-𝘪𝘯𝘵𝘦𝘯𝘴𝘪𝘷𝘦 𝘵𝘢𝘴𝘬𝘴 𝘪𝘯 𝘗𝘺𝘵𝘩𝘰𝘯? 𝘛𝘩𝘪𝘴 𝘪𝘴 𝘺𝘰𝘶𝘳 𝘱𝘦𝘳𝘧𝘰𝘳𝘮𝘢𝘯𝘤𝘦 𝘶𝘯𝘭𝘰𝘤𝘬. 🎥 Full breakdown with code examples in my new video (link in comments). 👇🏽 #python #ai #performance #opensource
To view or add a comment, sign in
-
-
🔧 Everyone's using monkey-patching in Python, but these alternatives are 10x safer Here are 3 game-changing tools for modifying Python code at runtime that most developers don't know about: 1. Modshim (New!) → Surgical precision code modification without the mess → 70% less likely to cause runtime errors vs traditional monkey-patching → Free & open source 2. pytest-mock → Clean mocking with automatic cleanup → Prevents test pollution and memory leaks → Free community edition 3. unittest.mock → Built-in solution that's seriously underrated → Zero dependencies, works out of the box → Native Python support 💡 Pro tip: Modshim's isolated execution context means your patches won't leak into other parts of your codebase. No more mysterious bugs! 🔥 Why this matters: • Safer code modifications • Better testing isolation • Cleaner debugging • Production-ready stability Save this before it becomes mainstream! 📌 Which tool are you trying first? 📖 Read full article: https://lnkd.in/eUbnh4AU #Python #Programming #SoftwareEngineering #DevTools #CodeQuality #Testing #PythonDevelopment #TechTips
To view or add a comment, sign in
-
Why Python 3.14 is a Game-Changer for Developers If you’ve ever felt frustrated by Python’s concurrency limits, there’s great news for you. Python 3.14 introduces free-threaded builds (no more global interpreter lock = GIL) and support for parallel sub-interpreters. These changes open the door to true multicore performance for CPU-intensive Python workloads. ✅ What this means: 1. Threads can run Python byte-code truly in parallel when built with GIL disabled, unlocking major gains especially in CPU-bound scenarios. 2. Sub-interpreters: You can isolate workstreams in the same process with less overhead than full processes. 3. Everyday developer quality-of-life upgrades: Better error messages, improved REPL, deferred type annotations, and syntax enhancements. ⚠️ Limitations & things to watch: 1. The GIL is still enabled by default. You’ll need to build or use a “free-threaded” interpreter variant to reap full parallel benefits. 2. Some third-party C-extensions and libraries may not yet be compatible with GIL-free builds, which could slow adoption in production. 3. Single-threaded code might see little or no benefit — or even a small performance dip in some cases. Whether you’re working on backend services, data-processing pipelines, or computational workflows — Python 3.14 is worth keeping an eye on and planning for. As always, test carefully before upgrading mission-critical systems. #python #programming #developers #multithreading #performance #softwareengineering
To view or add a comment, sign in
-
Explore related topics
Explore content categories
- Career
- Productivity
- Finance
- Soft Skills & Emotional Intelligence
- Project Management
- Education
- Technology
- Leadership
- Ecommerce
- User Experience
- Recruitment & HR
- Customer Experience
- Real Estate
- Marketing
- Sales
- Retail & Merchandising
- Science
- Supply Chain Management
- Future Of Work
- Consulting
- Writing
- Economics
- Artificial Intelligence
- Employee Experience
- Workplace Trends
- Fundraising
- Networking
- Corporate Social Responsibility
- Negotiation
- Communication
- Engineering
- Hospitality & Tourism
- Business Strategy
- Change Management
- Organizational Culture
- Design
- Innovation
- Event Planning
- Training & Development