关于Scalability和Performance的一些观点

android cpu调度策略_基于调度器的 CPU 调频机制 最近由于 Linaro 和 ARM 主导的 EAS(Energy Aware Scheduler) 日渐完善,属于 EAS 一部分的基于调度器的调频技术也获得了很多关注。本文主要介绍基于调度器的 CPU 调频策略的原理,以及当前上游社区在这一方面最新的进展。传统 CPU 调频策略传统 CPU 调频模块主要分为 3 块:CPUFreq 核心模块、CPUFreq 驱动和 CPUFreq Governo... 阅读详情

最近一直在研究Scalability和Performance,没事就泡在InfoQ上,看了些文章,从中摘入了些比较赞同的观点:

performance and Scalability

Performance is about the resources used to service a single request. Scalability is about how resource consumption grows when you have to service more (or larger) requests.

We define performance as how rapidly an operation (or operations) complete, e.g. response time, number of events processed per second, etc; whilst scalability - this is how well the application can be scaled up to handle greater usage demands (e.g. number of users, request rates, volume of data).

 

Decrease processing time
  • Collocation : reduce any overheads associated with fetching data required for a piece of work, by collocating the data and the code.

  • Caching : if the data and the code can't be collocated, cache the data to reduce the overhead of fetching it over and over again.

  • Pooling : reduce the overhead associated with using expensive resources by pooling them.

  • Parallelization : decrease the time taken to complete a unit of work by decomposing the problem and parallelizing the individual steps.

  • Partitioning : concentrate related processing as close together as possible, by partitioning the code and collocating related partitions.

  • Remoting : reduce the amount of time spent accessing remote services by, for example, making the interfaces more coarse-grained. It's also worth remembering that remote vs local is an explicit design decision not a switch and to consider the first law of distributed computing - do not distribute your objects.

 

Requirements must be known

  • Target average and peak performance (i.e. response time, latency, etc).

  • Target average and peak load (i.e. concurrent users, message volumes, etc).

  • Acceptable limits for performance and scalability.

     

Partition by Function

  •  the more decoupled that unrelated functionality can be, the more flexibility you will have to scale them independently of one another

  • At the database tier, we follow much the same approach. this approach allows us to scale the database infrastructure for each type of data independently of the others.

 

Split Horizontally

Different use cases use different schemes for partitioning the data: some are based on a simple modulo of a key (item ids ending in 1 go to one host, those ending in 2 go to the next, etc.), some on a range of ids (0-1M, 1-2M, etc.), some on a lookup table, some on a combination of these strategies. Regardless of the details of the partitioning scheme, though, the general idea is that an infrastructure which supports partitioning and repartitioning of data will be far more scalable than one which does not.

 

Avoid Distributed Transactions

The pragmatic answer is to relax your transactional guarantees across unrelated systems.It turns out that you can't have everything. In particular, guaranteeing immediate consistency across multiple systems or partitions is typically neither required nor possible. The CAP theorem, postulated almost 10 years ago by Inktomi's Eric Brewer, states that of three highly desirable properties of distributed systems - consistency (C), availability (A), and partition-tolerance (P) - you can only choose two at any one time. For a high-traffic web site, we have to choose partition-tolerance, since it is fundamental to scaling. For a 24x7 web site, we typically choose availability. So immediate consistency has to give way.We do employ various techniques to help the system reach eventual consistency: careful ordering of database operations, asynchronous recovery events, and reconciliation or settlement batches. We choose the technique according to the consistency demands of the particular use case.

 

Decouple Functions Asynchronously

The next key element to scaling is the aggressive use of asynchrony. If component A calls component B synchronously, A and B are tightly coupled, and that coupled system has a single scalability characteristic -- to scale A, you must also scale B. Equally problematic is its effect on availability. Going back to Logic 101, if A implies B, then not-B implies not-A. In other words, if B is down then A is down. By contrast, if A and B integrate asynchronously, whether through a queue, multicast messaging, a batch process, or some other means, each can be scaled independently of the other. Moreover, A and B now have independent availability characteristics - A can continue to move forward even if B is down or distressed.At every level, decomposing the processing into stages or phases, and connecting them up asynchronously, is critical to scaling.

 

Virtualize At All Levels

Virtualization and abstraction are everywhere, following the old computer science aphorism that the solution to every problem is another level of indirection. The operating system abstracts the hardware. The virtual machine in many modern languages abstracts the operating system. Object-relational mapping layers abstract the database. Load-balancers and virtual IPs abstract network endpoints. As we scale our infrastructure through partitioning by function and data, an additional level of virtualization of those partitions becomes critical.The motivation here is not only programmer convenience, but also operational flexibility. Hardware and software systems fail, and requests need to be re-routed. Components, machines, and partitions are added, moved, and removed. With judicious use of virtualization, higher levels of your infrastructure are blissfully unaware of these changes, and you are therefore free to make them. Virtualization makes scaling the infrastructure possible because it makes scaling manageable.


Cache Appropriately
The most obvious opportunities for caching come with slow-changing, read-mostly data - metadata, configuration, and static data.More challenging is rapidly-changing, read-write data. For the most part, we intentionally sidestep these challenges at eBay.

 

Scalability Worst Practices

  • The Golden Hammer
    Forcing a particular technology to work in ways it was not intended is sometimes counter-productive.

  • Resource Abuse

  • Dependencies

    Dependencies are a necessary evil in most systems and failure to manage dependencies and their versions diligently can inhibit agility and scalability.

    Dependency management for code has different flavors:1) Compile the entire codebase together 2) Pick and choose components and services based on known versions 3)Publish models and services comprised of only backwards-compatible changes

  • Forgetting to check the time
    To properly scale a system it is imperative to manage the time alloted for requests to be handled.

  • Runtime
    the ability to easily deploy and operate the system in a production environment must be held in equal regard. There are a number of worst practices which jeopardize the scalability of a system.
    1)Hero Pattern
    2)Not automating
    3)Not Monitoring

 

NOSQL(Not Only SQL) Alternatives

NOSQL alternatives were built with the assumption that disks, machines, and networks fail. We need to assume that we can’t prevent these failures, and instead, design our system to cope with these failures even under extreme scenarios
  • Partition the Data
    By partitioning the data, we minimize the impact of a failure, and we distribute the load for both write and read operations. If only one node fails, the data belonging to that node is impacted, but not the entire data store.

  • Keep Multiple Replicas of the Same Data
    Most of the NOSQL implementations rely on hot-backup copies of the data, to ensure continuous high availability.The most common configuration with GigaSpaces, is synchronous replication to the backup, and asynchronous to the backend storage.

  • Dynamic Scaling
    In order to handle the continuous growth of data, most NOSQL alternatives provide a way of growing your data cluster, without bringing the cluster down or forcing a complete re-partitioning.One algorithm notifies the neighbors of a certain partition, that a node joined or failed. Only those neighbor nodes are impacted by that change, not the entire cluster.Another (and significantly simpler) algorithm uses logical partitions. With logical partitions, the number of partitions is fixed, but the distribution of partitions between machines is dynamic.

  • Use Map/Reduce to Handle Aggregation

    Map/Reduce is a model that is often used to perform complex analytics, that are often associated with Hadoop. Having said that, it is important to note that map/reduce is often referred to as a pattern for parallel aggregated queries

 

Using Processing Units for Scaling

Washing Your Car The Tier-Based Way:

 




Washing the Car Using Space-Based Architecture:

 


Scaling Easily with Self Contained Processing Units:

 



 

技术选型方法论:理性评估框架与跨栈协作实践 技术选型是软件开发中的核心决策环节,其本质是基于多维度的客观评估来选择最适合的技术方案。从原理层面看,技术选型需要综合考虑性能特性、生态系统成熟度、团队技术储备等关键因素,通过建立科学的权重模型来量化评估。在工程实践中,这种系统化方法能够有效避免个人偏好和技术偏见的影响,提升技术决策的质量和可追溯性。特别是在微服务架构和跨技术栈协作场景中,合理的技术选型能够显著降低系统复杂度,提高开发效率和可维护性。本文聚焦于技术评估框架和决策流程的建立,通过具体的代码示例和案例分析,展示如何在面对Java、Python等 阅读详情

相关推荐

学术论文审稿回复指南:从标准套话到高阶沟通策略

在学术出版流程中,论文投稿与同行评审是核心环节。其原理在于通过领域专家的匿名评审,确保研究成果的科学性与严谨性。这一过程的技术价值在于构建了学术质量控制的标准化体系,是知识传播与创新的基石。其应用场景广泛覆盖SCI/SSCI期刊投稿、会议论文修改以及学位论文评审。针对审稿人意见的回复,尤其需要掌握专业的沟通范式与标准化表达,这直接关系到稿件的录用概率。本文聚焦于回复信的撰写,系统拆解了其核心结构、黄金法则与标准化表达工具箱,并深入探讨了处理矛盾意见、委婉反驳等高阶沟通艺术,旨在帮助研究者,特别是面临【论文投

weixin_34284188的博客 314

Ubuntu mate系统CPU调频选项简析

CPU 调频的策略:CPU 在什么样负载,什么样的场景下应该跑多少频率。 Ubuntu mate系统CPU调频选项(自己理解,有错误请指出): 1、Conservative 模式:开启一个 timer,每隔一定时间去计算一次各个 CPU 的负载。当CPU 负载超过 80% 时,把 CPU 频率以 5% 的步伐递增;当 CPU 负载少于 20% 的时候,把 CPU 频率以 5% 的步伐递减; 2、O...

Yxintian的博客 7796

【数据分析与挖掘实战】金融风控之贷款违约预测详解1(有代码和数据集)

金融风控一.题目理解1.1.题目概况1.2数据概况1.3预测指标二.数据来源三.查看数据四.分类指标计算示例4.1混淆矩阵4.2准确度4.3precision(精确度),recall(召回率),f1-score4.4P-R曲线4.5ROC曲线4.6AUC曲线4.7KS值五.数据分析5.1基本信息5.2查看数据集中特征缺失值,唯一值等5.3查看特征的数值类型有哪些,对象类型有哪些5.3.1数值连续型变量分析5.3.2非数值类别型变量分析5.3.3总结:5.4变量分布可视化5.4.1单一变量分布可视化 更新中~

m0_49263811的博客 1万+

linux服务器调整CPU频率调节器

在Linux服务器上调整CPU频率调节器可以优化系统性能和功耗。不同的CPU频率调节器适用于不同的使用场景,例如高性能需求或省电需求。常见的CPU频率调节器包括powersaveondemand和schedutil。

完颜振江 1978

COMSOL仿真教程—激光烧蚀

本例使用二维模型,将来自激光的入射热通量模拟为金属表面上空间分布的热源,从而得到金属的烧蚀过程和瞬态温度分布。

qq_40977332的博客 2万+

【python爬虫实战】Python 抓取京东商品信息与评论,做竞品分析

本项目通过爬取京东平台商品数据,实现了完整的电商竞品分析流程。文章首先介绍了项目目标和技术栈,包括Python、Requests、BeautifulSoup等工具。然后详细解析了京东页面结构,包括商品列表页、详情页和评论页的特点。核心部分展示了商品列表爬取、评论数据获取以及竞品分析三个关键步骤的代码实现,每部分都包含运行结果和原理讲解。通过情感分析和关键词提取,项目能够对比不同产品的用户评价差异。最后,文章还讨论了合规性考量、优化建议和常见问题解答。该方案不仅适用于市场调研,也为企业制定营销策略提供了数据支

2503_91057718的博客 1万+

软件架构设计--期末复习

本文是记录软件架构设计课程期末复习的笔记~

2201_75479723的博客 1395

上机笔试题目:取出指定条件二维数组的子数组

取出指定条件二维数组的子数组: 1)传入参数为: 参数一:String[][]sArray2字符串二维数组 参数二:Stringkey字符串 参数三:StringkeyFormat含匹配符的字符串,如下:%0-%1,其中%x含义如为:一维数据列序号为x的值。 keyFormat 可以为 %0-%1-%2,%0-%3-%8-%x...... 例子如下...

91奔跑的蜗牛 642

一家国外高伸缩技术网站

网址:http://highscalability.com/

xiyf2046的专栏 1584

雷达方程从零开始的详细推导及实现

通过以上六步,我们从最基本的物理图像出发,完整地推导出了雷达方程。初学者可以按照这个逻辑,自己在纸上一步步重现整个过程。Python实现。

VectorShift的博客 341

《云原生安全攻防》-- 容器攻击案例:Docker容器逃逸

当攻击者获得一个容器环境的shell权限时,攻击者往往会尝试进行容器逃逸,利用容器环境中的错误配置或是漏洞问题,从容器成功逃逸到宿主机,从而获取到更高的访问权限。在本节课程中,我们将详细介绍一些常见的容器逃逸方式,包括相应的检测方法和利用方式,帮助大家了解容器逃逸这种攻击手法的更多攻击细节。在这个课程中,我们将学习以下内容:常见容器逃逸方式:容器逃逸方式分类和简介。容器逃逸案例:详细介绍多个场景下...

1480

Performance is not everything

昨天的讲座中,Stephen Walther也对存储过程和直接的SQL语句的运行作了比较,发现存储过程只比直接的SQL语句快5%左右,其解释是SQL SERVER 2000对重复请求的SQL语句的执行计划作了缓存。其实使用存储过程并不是要单纯追求performance,而是它带来的包装和清晰的界面,以及保持系统部件间的loose coupling。也就是说各个部件间, 除了保持基本的界面外, 可以

CodeAngel 专栏 962

【运动规划算法项目实战】Artificial Potential Field算法(附ROS C++代码)

在机器人行业中,路径规划是一个关键的任务,它涉及到如何让机器人在复杂的环境中安全而高效地移动。人工势场算法(Artificial Potential Field Algorithm)是一种常用的路径规划方法,它借鉴了物理学中的势能概念,通过模拟力的作用来引导机器人的移动。本文将详细介绍人工势场算法的原理、在路径规划中的应用、算法优缺点以及代码实现。人工势场算法基于两种势场:斥力场和引力场。斥力场使机器人远离障碍物,而引力场将机器人吸引到目标位置。

xiewf的博客 1万+

走向架构师之路博文分享

摘要:这是一位软件工程师逐渐走向架构师的心路历程     * 在客户端做路由和负载(走向架构师之路) http://blog.csdn.net/cutesource/archive/2010/03/30/5432923.aspx2010-03-31 09:48:47

通往AGI之路 663

42、InfiniBand技术详解:QP状态机、操作及错误处理

本文深入解析InfiniBand技术中的核心组件QP(Queue Pair)状态机、工作请求处理机制、支持的操作类型及错误处理策略。详细介绍了QP的创建与状态转换流程,包括INIT、RTR、RTS等关键状态,并提供了状态修改的代码示例。文章还探讨了工作请求的发布、资源使用限制、围栏机制以及重试和RNR流程,帮助开发者理解通信可靠性保障机制。此外,涵盖了多播组的应用场景与API使用方法,并对比了用户空间与内核级RDMA API的调用差异,最后给出了实践建议和常见问题解答,为构建高性能分布式系统提供技术指导。

oauth7security的博客 136

复分析 阿尔福斯(Ahlfors) 第三版答案 英文

答案分为十章,有部分习题没有答案,全英文复分析阿尔福斯(Ahlfors) 第三版答案

AIGC时代高校学术评估改革:口试与线下考试的回归与创新

人工智能生成内容(AIGC)技术基于大型语言模型,能够自动生成结构完整、语言流畅的学术文本和代码,其核心原理是通过深度学习海量数据来模拟人类写作模式。这种技术的出现对教育领域的学术诚信保障提出了全新挑战,传统基于文本相似度检测的评估方式难以有效识别AI生成内容。从技术价值角度看,AIGC既带来了效率提升,也促使教育机构重新审视评估体系的可靠性。在高等教育应用场景中,口试评估通过实时互动能够直接考察学生的知识内化程度和逻辑表达能力,而升级版的线下考试结合智能监考技术则能确保评估环境的独立性。针对AIGC技术特

weixin_30896825的博客 377

汉书HE8,好用的汇编代码编写工具

汉书HE8,好用的汇编代码编写工具早期编写汇编代码所用功能强大

[重要]protobuf协议语言指南

原文:https://developers.google.com/protocol-buffers/docs/protoProtobuf语言指南l 定义一个消息(message)类型l 标量值类型l Optional 的字段及默认值l 枚举l 使用其他消息类型l 嵌套类型l 更新一个消息类型l 扩展l 包(package)l 定义服务(service)l 选项(option)l 生成访问类本指南描

玄冬Wong 448

IEM模型,地表粗糙度模拟

利用微波反演土壤水分时候,利用IEM模型可以实现对随机地表的模拟

华为的C语言编程规范.pdf

华为技术有限公司内部技术规范。本规范制定了编写C语言程序的基本原则、规则和建议。从代码的清晰、简洁、可测试、安全、程序效率、可移植各个方面对C语言编程作出了具体指导。

Spring Boot应用性能优化实战:从功能迭代到系统调优

在软件开发中,系统性能优化是一个从基础概念到工程实践的系统性课题。其核心原理在于理解性能的多维度指标,如响应时间、吞吐量和资源利用率,并识别功能迭代中引入的典型瓶颈,如数据库N+1查询、内存泄漏和同步阻塞。这些问题的技术价值在于,它们直接影响用户体验和系统可伸缩性。在应用场景上,无论是微服务架构下的长调用链路,还是单体应用中的复杂业务逻辑,都需要针对性的优化策略。本文聚焦于Spring Boot框架下的性能调优,通过实战演示如何解决依赖膨胀、缓存滥用等常见问题,并结合Arthas等工具进行有效监控,帮助开发

weixin_33896726的博客 364

CCG Workflow 技术分析师角色提示词解析:/ccg:think 与 /ccg:analyze 的架构评估大脑

> 本文围绕 ccg-workflow 开源仓库中 [templates/prompts/opencode/analyzer.md](https://link.gitcode.com/i/0899c9b5f14b7b95a467582d369516d2) 这一角色提示词展开,剖析 CCG 多模型协作工作流中"技术分析师"角色的职责边界、分析框架、输出规范与 .context 感知机制,并结合仓库内

gitblog_00088的博客 197

从中文 Prompt 到 RAG 系统:4 个台阶跑通这套大模型教程

你手里有一堆产品文档、客服 FAQ、内部知识库,想让人直接"问"它们。从想法到跑通,中间隔着几件事:先学会把话说清楚,再学会用代码调用,然后学会用框架拼装,最后把自己的数据接进去。LLM Cookbook 就是把吴恩达大模型系列课程中文复现的大模型教程,它把这 4 件事拆成了 11 门课——4 门必修、8 门选修,每步都配了可直接运行的 Notebook,Prompt 全部做了中文版本。 [![

gitblog_01405的博客 1064

英语写作进阶:in terms of、with respect to等介词短语的精准使用指南

在英语写作中,准确表达逻辑关系是提升表达地道性的关键。介词和介词短语作为构建句子逻辑框架的基础语法元素,其核心功能在于建立词与词之间的空间、时间、方式等关系。理解不同介词短语的细微差别,能够帮助写作者实现从简单表达到精准论证的跨越,这在学术写作、商务沟通等场景中尤为重要。本文聚焦于in terms of、with respect to、regarding、concerning、for、as for这六个高频且易混淆的介词短语,通过对比其核心意象、适用场景和情感色彩,系统解析如何根据具体语境选择最恰当的表达。

weixin_33755557的博客 556

ccg-workflow 的 Grok 技术分析专家角色提示词:架构评估与多模型分析编排指南

本文深度解析 ccg-workflow 开源仓库中面向 Grok 模型的 Technical Analyst(技术分析专家)角色提示词模板 [templates/prompts/grok/analyzer.md](https://link.gitcode.com/i/e960b9f78c50818f0657af7c0f4d09f5),说明它在 `/ccg:think`、`/ccg:analyze`

gitblog_00864的博客 175

全球化技术协作新时代:从文化碰撞到开源共建

开源协作是现代软件开发的核心模式,其原理基于分布式版本控制和社区驱动的开发流程。这种模式通过Git等工具实现代码的并行开发与合并,显著提升开发效率和技术创新速度。在工程实践中,开源协作的价值体现在降低开发成本、加速技术迭代和促进知识共享。随着中国开发者在GitHub等平台的贡献度从不足10%提升至超过30%,技术协作场景正在经历深刻变革。全球化团队需要适应跨文化代码审查、多时区异步协作等新范式,特别是在AI框架、云原生等新兴领域,东西方技术实践的融合催生了更高效的技术决策流程和工程架构。这种变化推动着技术标

weixin_33787529的博客 381

QwenASRKit Pro 音频预处理揭秘:Melspectrogram 模型如何把波形变成 128 维梅尔频谱

QwenASRKit Pro 是一款运行在 Apple Silicon 上的**端侧语音识别(ASR)工具包**,它将 Qwen3-ASR 模型打包为 Core ML 格式,实现完全本地、离线、实时的语音转写。这篇文章带你拆解它音频预处理的第一站——Melspectrogram 梅尔频谱模型:看它如何把 16240 个原始波形采样点,一步步变成 128 维的梅尔频谱图(Mel Spectrogra

gitblog_00600的博客 363
上一篇: 听完蔡学镛的分享《不瞌睡的PPT制作秘诀》后的总结
下一篇: HDFS+MapReduce+Hive+HBase十分钟快速入门(转)
cutesource
博客等级 码龄17年 5041粉丝 151原创
评论
成就一亿技术人!
拼手气红包6.0元
还能输入1000个字符
 
 条评论被折叠 查看
添加红包

请填写红包祝福语或标题

个

红包个数最小为10个

元

红包金额最低5元

当前余额3.43元 前往充值 >
需支付:10.00元
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付元
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值