Oracle 查询表空间使用情况及收缩数据文件
本文介绍Oracle收缩数据文件的相关操作,运维工作中有时会需要通过收缩数据文件来释放磁盘空间。
数据文件初始化方式:
1.我们创建表空间一般有两种方式初始化其数据文件,即指定初始大小为32G(很大的值)或指定初始大小为100M(很小的值)然后通过自动扩展方式慢慢按需增长。
2.第一种初始数据文件方法坏处就是开始不管你用不用到那么大,都会占用这么大的磁盘空间(这种数据迁移的时候可以使用)。第二种初始化方法按需增长,比较好的监控实际使用磁盘空间,所以推荐初始值很小,使用自动扩展慢慢增长的方式。
一、查看表空间使用情况
1.查询除temp外表空间使用情况
SELECT a.tablespace_name "tb_name",total / (1024 * 1024 * 1024) "tb_sizeG)",free / (1024 * 1024 * 1024) "tb_free_size(G)",(total - free) / (1024 * 1024 * 1024) "tb_used_size(G)",round((total - free) / total, 4) * 100 "tb_usage %"FROM (SELECT tablespace_name, SUM(bytes) freeFROM dba_free_spaceGROUP BY tablespace_name) a,(SELECT tablespace_name, SUM(bytes) totalFROM dba_data_filesGROUP BY tablespace_name) bWHERE a.tablespace_name = b.tablespace_name;
或
select a.tablespace_name tnm,b.FILE_PATH,--b.autoextensible,b.cnt,trunc(a.bytes/1024/1024/1024) total_G,trunc(a.bytes/1024/1024/1024/b.cnt) avg_G,trunc(c.bytes/1024/1024/1024) free_G,trunc((a.bytes-c.bytes)*100/a.bytes,2) used--,(c.bytes*100)/a.bytes "% FREE"from SYS.SM$TS_AVAIL A,SYS.SM$TS_FREE C,(select tablespace_name,substr(file_name,1,instr(file_name,'/',2)) FILE_PATH, --f.autoextensible,count(*) cnt from dba_data_files f group by
tablespace_name,substr(file_name,1,instr(file_name,'/',2))--,autoextensible) bWHERE A.TABLESPACE_NAME=C.TABLESPACE_NAME(+)AND A.TABLESPACE_NAME=B.TABLESPACE_NAME-- AND A.TABLESPACE_NAME IN (select distinct tablespace_name from dba_tablespaces)order by avg_g desc;
2.查询包含temp在内的所有表空间使用情况
SELECT *FROM (SELECT a.tablespace_name,to_char(a.bytes / 1024 / 1024, '999,999,999') || 'M' total_bytes,to_char(b.bytes / 1024 / 1024, '999,999,999') || 'M' free_bytes,to_char(a.bytes / 1024 / 1024 - b.bytes / 1024 / 1024,'999,999,999') || 'M' use_bytes,to_char((1 - b.bytes / a.bytes) * 100, '990.99') || '%' USEFROM (SELECT tablespace_name, sum(bytes) bytesFROM dba_data_filesGROUP BY tablespace_name) a,(SELECT tablespace_name, sum(bytes) bytesFROM dba_free_spaceGROUP BY tablespace_name) bWHERE a.tablespace_name = b.tablespace_nameUNION ALLSELECT c.tablespace_name,to_char(c.bytes / 1024 / 1024, '999,999,999') || 'M' total_bytes,to_char((c.bytes - d.bytes_used) / 1024 / 1024, '999,999,999') || 'M' free_bytes,to_char(d.bytes_used / 1024 / 1024, '999,999,999') || 'M' use_bytes,to_char(d.bytes_used * 100 / c.bytes, '990.99') || '%' USEFROM (SELECT tablespace_name, sum(bytes) bytesFROM dba_temp_filesGROUP BY tablespace_name) c,(SELECT tablespace_name, sum(bytes_cached) bytes_usedFROM v$temp_extent_poolGROUP BY tablespace_name) dWHERE c.tablespace_name = d.tablespace_name);
或
select d.tablespace_name,decode(d.status, 'ONLINE', 'OLN', 'READ ONLY', 'R/O', d.status) status,d.extent_management,decode(d.allocation_type, 'USER', '', d.allocation_type) allocation_type,(casewhen initial_extent < 1048576 thenlpad(round(initial_extent / 1024, 0), 3) || 'K'elselpad(round(initial_extent / 1024 / 1024, 0), 3) || 'M'end) Ext_Size,NVL(a.bytes / 1024 / 1024, 0) MB,NVL(f.bytes / 1024 / 1024, 0) free,(NVL(a.bytes / 1024 / 1024, 0) - NVL(f.bytes / 1024 / 1024, 0)) used,NVL(l.large / 1024 / 1024, 0) largest,d.MAX_EXTENTS,lpad(round((f.bytes / a.bytes) * 100, 0), 3) pfree,(casewhen round(f.bytes / a.bytes * 100, 0) >= 20 then' 'else'*'end) alrtFROM sys.dba_tablespaces d,(SELECT tablespace_name, SUM(bytes) bytesFROM dba_data_filesGROUP BY tablespace_name) a,(SELECT tablespace_name, SUM(bytes) bytesFROM dba_free_spaceGROUP BY tablespace_name) f,(SELECT tablespace_name, MAX(bytes) largeFROM dba_free_spaceGROUP BY tablespace_name) lWHERE d.tablespace_name = a.tablespace_name(+)AND d.tablespace_name = f.tablespace_name(+)AND d.tablespace_name = l.tablespace_name(+)AND NOT(d.extent_management LIKE 'LOCAL' AND d.contents LIKE 'TEMPORARY')
UNION ALL
select d.tablespace_name,decode(d.status, 'ONLINE', 'OLN', 'READ ONLY', 'R/O', d.status) status,d.extent_management,decode(d.allocation_type,'UNIFORM','U','SYSTEM','A','USER','',d.allocation_type) allocation_type,(casewhen initial_extent < 1048576 thenlpad(round(initial_extent / 1024, 0), 3) || 'K'elselpad(round(initial_extent / 1024 / 1024, 0), 3) || 'M'end) Ext_Size,NVL(a.bytes / 1024 / 1024, 0) MB,(NVL(a.bytes / 1024 / 1024, 0) - NVL(t.bytes / 1024 / 1024, 0)) free,NVL(t.bytes / 1024 / 1024, 0) used,NVL(l.large / 1024 / 1024, 0) largest,d.MAX_EXTENTS,lpad(round(nvl(((a.bytes - t.bytes) / NVL(a.bytes, 0)) * 100, 100),0),3) pfree,(casewhen nvl(round(((a.bytes - t.bytes) / NVL(a.bytes, 0)) * 100, 0),100) >= 20 then' 'else'*'end) alrtFROM sys.dba_tablespaces d,(SELECT tablespace_name, SUM(bytes) bytesFROM dba_temp_filesGROUP BY tablespace_nameorder by tablespace_name) a,(SELECT tablespace_name, SUM(bytes_used) bytesFROM v$temp_extent_poolGROUP BY tablespace_name) t,(SELECT tablespace_name, MAX(bytes_cached) largeFROM v$temp_extent_poolGROUP BY tablespace_nameorder by tablespace_name) lWHERE d.tablespace_name = a.tablespace_name(+)AND d.tablespace_name = t.tablespace_name(+)AND d.tablespace_name = l.tablespace_name(+)AND d.extent_management LIKE 'LOCAL'AND d.contents LIKE 'TEMPORARY'ORDER by 1
二、收缩数据文件
如果通过上述SQL查询出表空间的使用率较低,剩余空间较大,此时我们可以考虑通过收缩数据文件来释放空闲空间。
1.使用 resize check脚本生成执行SQL
可先通过如下脚本查询有哪些数据文件可以释放,该脚本成功执行后会提供可执行的语句,直接复制便可执行已收缩数据文件。
REM Script is meant for Oracle version 9 and higher
REM -----------------------------------------------set serveroutput on
exec dbms_output.enable(1000000);declarecursor c_dbfile is
select f.tablespace_name,f.file_name,f.file_id,f.blocks,t.block_size
,decode(t.allocation_type,'UNIFORM',t.initial_extent/t.block_size,0) uni_extent
,decode(t.allocation_type,'UNIFORM',(128+(t.initial_extent/t.block_size)),128) file_min_size
from dba_data_files f,
dba_tablespaces t
where f.tablespace_name = t.tablespace_name
and t.status = 'ONLINE'
order by f.tablespace_name,f.file_id;cursor c_freespace(v_file_id in number) is
select block_id, block_id+blocks max_block
from dba_free_space
where file_id = v_file_id
order by block_id desc;/* variables to check settings/values */
dummy number;
checkval varchar2(10);
block_correction1 number;
block_correction2 number;/* running variable to show (possible) end-of-file */
file_min_block number;/* variables to check if recycle_bin is on and if extent as checked is in ... */
recycle_bin boolean:=false;
extent_in_recycle_bin boolean;/* exception handler needed for non-existing tables note:344940.1 */
sqlstr varchar2(100);
table_does_not_exist exception;
pragma exception_init(table_does_not_exist,-942);/* variable to spot space wastage in datafile of uniform tablespace */
space_wastage number;begin/* recyclebin is present in Oracle 10.2 and higher and might contain extent as checked */
begin
select value into checkval from v$parameter where name = 'recyclebin';
if checkval = 'on'
then
recycle_bin := true;
end if;
exception
when no_data_found
then
recycle_bin := false;
end;/* main loop */
for c_file in c_dbfile
loop
/* initialization of loop variables */
dummy :=0;
extent_in_recycle_bin := false;
file_min_block := c_file.blocks;beginspace_wastage:=0; /* reset for every file check */<<check_free>>for c_free in c_freespace(c_file.file_id)
loop
/* if blocks is an uneven value there is a need to correct
with -1 to compare with end-of-file which is even */
block_correction1 := (0-mod(c_free.max_block,2));
block_correction2 := (0-mod(c_file.blocks,2));
if file_min_block+block_correction2 = c_free.max_block+block_correction1
then/* free extent is at end so file can be resized */
file_min_block := c_free.block_id;/* Uniform sized tablespace check if space at end of file
is less then uniform extent size */
elsif (c_file.uni_extent !=0) and ((c_file.blocks - c_free.max_block) < c_file.uni_extent)
then/* uniform tablespace which has a wastage of space in datafile
due to fact that space at end of file is smaller than uniform extent size */space_wastage:=c_file.blocks - c_free.max_block;
file_min_block := c_free.block_id;else
/* no more free extent at end of file, file cannot be further resized */
exit check_free;
end if;
end loop;
end;/* check if file can be resized, minimal size of file 128 {+ initial_extent} blocks */
if (file_min_block = c_file.blocks) or (c_file.blocks <= c_file.file_min_size)
thendbms_output.put_line('Tablespace: '||c_file.tablespace_name||' Datafile: '||c_file.file_name);
dbms_output.put_line('cannot be resized no free extents found');
dbms_output.put_line('Note: for some cases, dba_free_spaces data is not accurate, and this script does not work for such cases. You may want to manually check if the datafile is feasible to be resized');
dbms_output.put_line('.');else/* file needs minimal no of blocks which does vary over versions,
using safe value of 128 {+ initial_extent} */
if file_min_block < c_file.file_min_size
then
file_min_block := c_file.file_min_size;
end if;dbms_output.put_line('Tablespace: '||c_file.tablespace_name||' Datafile: '||c_file.file_name);
dbms_output.put_line('current size: '||(c_file.blocks*c_file.block_size)/1024||'K'||' can be resized to: '||round((file_min_block*c_file.block_size)/1024)||'K (reduction of: '||round(((c_file.blocks-file_min_block)/c_file.blocks)*100,2)||' %)');/* below is only true if recyclebin is on */
if recycle_bin
then
begin
sqlstr:='select distinct 1 from recyclebin$ where file#='||c_file.file_id;
execute immediate sqlstr into dummy;if dummy > 0
thendbms_output.put_line('Extents found in recyclebin for above file/tablespace');
dbms_output.put_line('Implying that purge of recyclebin might be needed in order to resize');
dbms_output.put_line('SQL> purge tablespace '||c_file.tablespace_name||';');
end if;
exception
when no_data_found
then null;
when table_does_not_exist
then null;
end;
end if;
dbms_output.put_line('SQL> alter database datafile '''||c_file.file_name||''' resize '||round((file_min_block*c_file.block_size)/1024)||'K;');if space_wastage!=0
then
dbms_output.put_line('Datafile belongs to uniform sized tablespace and is not optimally sized.');
dbms_output.put_line('Size of datafile is not a multiple of NN*uniform_extent_size + overhead');
dbms_output.put_line('Space that cannot be used (space wastage): '||round((space_wastage*c_file.block_size)/1024)||'K');
dbms_output.put_line('For optimal usage of space in file either resize OR increase to: '||round(((c_file.blocks+(c_file.uni_extent-space_wastage))*c_file.block_size)/1024)||'K');
end if;dbms_output.put_line('.');end if;end loop;end;
/
比如执行结果如下:
Tablespace: BLOBS Datafile: /Data/STUDY/datafile/studyblobs01.dbf
current size: 33553408K can be resized to: 33548288K (reduction of: .02 %)
SQL> alter database datafile '/Data/STUDY/datafile/studyblobs01.dbf' resize 33548288K;
.
Tablespace: BLOBS Datafile: /Data/STUDY/datafile/studyblobs02.dbf
cannot be resized no free extents found
Note: for some cases, dba_free_spaces data is not accurate, and this script does not work for such cases. You may want to manually check if the datafile is feasible to be resized
.
Tablespace: BLOBS Datafile: /Data/STUDY/datafile/studyblobs03.dbf
cannot be resized no free extents found
Note: for some cases, dba_free_spaces data is not accurate, and this script does not work for such cases. You may want to manually check if the datafile is feasible to be resized
.
Tablespace: INDX Datafile: /Data/STUDY/datafile/studyindex01.dbf
current size: 33553408K can be resized to: 32640000K (reduction of: 2.72 %)
SQL> alter database datafile '/Data/STUDY/datafile/studyindex01.dbf' resize 32640000K;
.
Tablespace: INDX Datafile: /Data/STUDY/datafile/studyindex02.dbf
cannot be resized no free extents found
Note: for some cases, dba_free_spaces data is not accurate, and this script does not work for such cases. You may want to manually check if the datafile is feasible to be resized
.
Tablespace: SYSAUX Datafile: /Data/STUDY/datafile/studysysaux01.dbf
current size: 4741120K can be resized to: 4734976K (reduction of: .13 %)
SQL> alter database datafile '/Data/STUDY/datafile/studysysaux01.dbf' resize 4734976K;
.
Tablespace: SYSAUX Datafile: /Data/STUDY/datafile/studysysaux02.dbf
current size: 4608000K can be resized to: 4250624K (reduction of: 7.76 %)
SQL> alter database datafile '/Data/STUDY/datafile/studysysaux02.dbf' resize 4250624K;
.
Tablespace: SYSTEM Datafile: /Data/STUDY/datafile/studysystem01.dbf
current size: 1843200K can be resized to: 790528K (reduction of: 57.11 %)
SQL> alter database datafile '/Data/STUDY/datafile/studysystem01.dbf' resize 790528K;
.
Tablespace: UNDOTBS1 Datafile: /Data/STUDY/datafile/studyundotbs01.dbf
current size: 33553408K can be resized to: 2811904K (reduction of: 91.62 %)
SQL> alter database datafile '/Data/STUDY/datafile/studyundotbs01.dbf' resize 2811904K;
.
Tablespace: UNDOTBS1 Datafile: /Data/STUDY/datafile/studyundotbs02.dbf
cannot be resized no free extents found
Note: for some cases, dba_free_spaces data is not accurate, and this script does not work for such cases. You may want to manually check if the datafile is feasible to be resized
.
Tablespace: USERS Datafile: /Data/STUDY/datafile/studyusers01.dbf
cannot be resized no free extents found
Note: for some cases, dba_free_spaces data is not accurate, and this script does not work for such cases. You may want to manually check if the datafile is feasible to be resized
.
Tablespace: USERS Datafile: /Data/STUDY/datafile/studyusers02.dbf
cannot be resized no free extents found
Note: for some cases, dba_free_spaces data is not accurate, and this script does not work for such cases. You may want to manually check if the datafile is feasible to be resized
.
Tablespace: USERS Datafile: /Data/STUDY/datafile/studyusers03.dbf
cannot be resized no free extents found
Note: for some cases, dba_free_spaces data is not accurate, and this script does not work for such cases. You may want to manually check if the datafile is feasible to be resized
.
Tablespace: WCAUDIT Datafile: /Data/STUDY/datafile/studywcaudit01.dbf
current size: 9832064K can be resized to: 9818112K (reduction of: .14 %)
SQL> alter database datafile '/Data/STUDY/datafile/studywcaudit01.dbf' resize 9818112K;
.PL/SQL procedure successfully completedSQL>
可提炼出如下 SQL 用以收缩数据文件(根据实际需求选择执行):
SQL> alter database datafile '/Data/STUDY/datafile/studyblobs01.dbf' resize 33548288K;
SQL> alter database datafile '/Data/STUDY/datafile/studyindex01.dbf' resize 32640000K;
SQL> alter database datafile '/Data/STUDY/datafile/studysysaux01.dbf' resize 4734976K;
SQL> alter database datafile '/Data/STUDY/datafile/studysysaux02.dbf' resize 4250624K;
SQL> alter database datafile '/Data/STUDY/datafile/studysystem01.dbf' resize 790528K;
SQL> alter database datafile '/Data/STUDY/datafile/studyundotbs01.dbf' resize 2811904K;
SQL> alter database datafile '/Data/STUDY/datafile/studywcaudit01.dbf' resize 9818112K;
2.通过查询dba_data_files表自己写执行SQL
select file_name,user_bytes from dba_data_files;
比如查询结果中的这一行:

我们可以执行如下语句来收缩表空间:
SQL> alter database datafile ‘/Data/STUDY/datafile/studyblobs01.dbf’ resize 26213351424;
如遇到“ORA-03297: file contains used data beyond requested RESIZE value”错误,可以resize后的值稍微调大一些再次执行。
参考文章:
https://www.cnblogs.com/rangle/p/9263505.html
相关文章:
Oracle 查询表空间使用情况及收缩数据文件
本文介绍Oracle收缩数据文件的相关操作,运维工作中有时会需要通过收缩数据文件来释放磁盘空间。 数据文件初始化方式: 1.我们创建表空间一般有两种方式初始化其数据文件,即指定初始大小为32G(很大的值)或指定初始大小为…...
怎么进行mysql的优化?
MySQL 的优化是一个系统性的工作,涉及多个层面,包括查询优化、索引优化、配置优化、架构优化等。以下是一些常见的 MySQL 优化方法: 查询优化 避免全表扫描:确保查询能够使用索引,避免 SELECT *,只选择需要…...
docker-compose方式启动Kafka Sasl加密认证(无zk)
首先参考文档,思考过程可以进行参考https://juejin.cn/post/7294556533932884020#heading-3 用的镜像是Bitnami,对SASL配置进行了简化,需要按照特定格式去配置jass验证 完整配置如下 镜像版本参考:https://hub.docker.com/r/bitn…...
Grafana接入Zabbix数据源
1. 对接 Zabbix 1.1 安装 Zabbix 插件 在线安装: 1.2 配置 Zabbix 数据源 点击 Configuration > Data Sources > Add data source。选择 Zabbix,填写: URL:http://<zabbix-server>/api_jsonrpc.phpUsername&#x…...
华为在不同发展时期的战略选择(节选)
华为在不同发展时期的战略选择(节选) 添加图片注释,不超过 140 字(可选) 来源:谢宁专著《华为战略管理法:DSTE实战体系》。本文有节选修改。 导言 从目前所取得的成就往回看,华为…...
【计算机网络】TCP协议相关总结,TCP可靠性的生动讲解
TCP 可靠性 确保快递不丢、不乱、不过载 机制作用(快递类比)防止的问题检验和检查包裹是否损坏,损坏就重新发数据出错序列号给每个包裹编号,按顺序整理乱序、重复确认应答每送到一件,就让收件人签收丢失滑动窗口控制…...
lua基础语法学习
lua基础语法学习 文章目录 lua基础语法学习1. 基础2. 输入输出3. 分支结构与循环结构4. 函数5. 元表与元方法6. 面向对象 1. 基础 注释 --单行注释--[[ 多行注释 --]]标识符 标识符以一个字母 A 到 Z 或 a 到 z 或下划线 _ 开头后加上 0 个或多个字母,下划线&…...
【个人开发】deepspeed+Llama-factory 本地数据多卡Lora微调【完整教程】
文章目录 1.背景2.微调方式2.1 关键环境版本信息2.2 步骤2.2.1 下载llama-factory2.2.2 准备数据集2.2.3 微调模式2.2.3.1 zero-1微调2.2.3.2 zero-2微调2.2.3.3 zero-3微调2.2.3.4 单卡Lora微调 2.2.4 实验2.2.4.1 实验1:多GPU微调-zero12.2.4.2 实验2:…...
【SpringBoot】数据访问技术spring Data、 JDBC、MyBatis、JSR-303校验
Spring Boot 数据访问技术及特性 目录标题 Spring Boot 数据访问技术及特性摘要1. 引言2. Spring Data架构与原理2.1 Spring Data概述2.2 Spring Data核心组件2.3 Spring Boot与Spring Data的集成机制 3. Spring Boot与JDBC的整合3.1 JDBC整合流程3.2 数据源自动配置3.3 JdbcTe…...
手机放兜里,支付宝“碰一下”被盗刷?
大家好,我是小悟。 近期,网络上关于“支付宝‘碰一下’支付易被盗刷”的传言甚嚣尘上,不少用户对此心生疑虑。 首先,要明确一点:“碰一下”支付并不会像某些传言中所描述的那样容易被隔空盗刷。这一观点已经得到了支付…...
Java Web应用中获取客户端的真实IP地址
Java Web应用中获取客户端的真实IP地址,尤其在存在代理服务器的情况下。 代码示例: public static String getClientIP(HttpServletRequest request) {String ip = parseCommaSeparatedIPs(request.getHeader("X-Forwarded-For"));if (isInvalid(ip)) {ip = pars…...
vue框架后遗症∶被遗忘的dom操作
用多了vue、react等前端框架,不得不说用数据驱动视图来开发真的很香,但是也免不了会有不用这些框架的项目,dom操作还是很有必要的,一开始学习网页设计的时候就教过,后面一直开发项目基本上用框架。虽然有些想不起来了&…...
基于深度学习+NLP豆瓣电影数据爬虫可视化推荐系统
博主介绍:资深开发工程师,从事互联网行业多年,熟悉各种主流语言,精通java、python、php、爬虫、web开发,已经做了多年的设计程序开发,开发过上千套设计程序,没有什么华丽的语言,只有…...
8. 示例:对32位数据总线实现位宽和值域覆盖
文章目录 前言示例一:示例二:示例三:仿真与覆盖率分析覆盖点详细说明覆盖率提升技巧常见错误排查 示例四:仿真步骤 前言 针对32位数据总线实现位宽和值域的覆盖,并且能够用xrun运行,查看日志和波形。cover…...
深度剖析Seata源码:解锁分布式事务处理的核心逻辑
文章目录 写在文章开头如何使用源码(配置转掉)基于AT模式详解Seata全链路流程Seata服务端启动本地服务如何基于GlobalTransaction注解开启事务客户端如何开启分布式事务RM和TC如何协调处理分支事务RM生成回滚日志事务全局提交与回滚小结参考写在文章开头 在当今分布式系统日益…...
快速列出MS Word中所有可用字体
Word中有很多字体,虽然在字体下拉列表中提供了字体的样例,但是并不全面,例如使用Batang字体的话,数字会显示成什么效果,就无法直观的看到。 打开Word应用程序,新建一个空白文档,按AltF11打开VBE…...
SpringDataJPA使用deleteAllInBatch方法逻辑删除失效
概述 在使用Spring Boot JPA时,执行批量删除操作时,遇到逻辑删除失效的问题。具体而言,当使用deleteAllInBatch方法时,数据会被物理删除,而不是进行逻辑删除;但是当使用deleteAll时,逻辑删除操…...
【密码学实战】Java 实现 SM2 国密算法(签名带id、验签及 C1C3C2 加密解密)
前言 SM2是中国国家密码管理局发布的椭圆曲线公钥密码算法标准(GB/T 32918),属于国密算法体系。与RSA和ECDSA相比,SM2在相同安全强度下密钥更短、计算效率更高。本文将介绍如何在Java中实现SM2的密钥生成、数字签名、验签、加密及…...
flex布局自定义一行几栏,靠左对齐===grid布局
模板 <div class"content"><div class"item">1222</div><div class"item">1222</div><div class"item">1222</div><div class"item">1222</div><div class"…...
Harmony os next~鸿蒙应用开发入门教程
鸿蒙应用开发入门教程 基础准备与环境搭建 1. 了解鸿蒙系统 1.1 核心理念学习 HarmonyOS(鸿蒙系统)是华为推出的全场景分布式操作系统,其核心特点如下: 分布式能力 设备协同:手机、平板、智能手表、IoT设备等可无…...
使用 Ansys Discovery 高效创建角焊缝
概括 Ansys Discovery 2024R1 中的焊缝功能是一项重大改进,旨在简化和精简工程模拟中焊缝的分配过程。此功能集成了间歇焊缝等高级工具和功能,以更直观、更高效的方式促进焊缝的准备和分配。 该功能为工程师提供了无缝的工作流程,以准备和分…...
Rk3568驱动开发_新字符设备驱动原理_7
1.申请设备号: 之前用的是register_chrdev(LED_MAJOR, LED_NAME, &led_fops);手动申请很不方便 使用alloc_chrdev_region函数申请设备号,手动申请的话要先查询是否有空余的设备号,很不方便,用此函数内核会自动将将空余设备号…...
ESP32-S3 42引脚 语音控制模块、设备运转展示 GOOUUU TECH 果云科技S3-N16R8 控制舵机 LED开关 直流电机
最近还是想玩了下esp32,基于原来的开发板,看见佬做了一个语音识别的项目,通过这个语音识别可以控制LED开关和直流电机这些,详情可见视频(推荐)具体硬件就在下方。 信泰微】ESP32-S3 42引脚 语音控制模块、…...
2025年光电科学与智能传感国际学术会议(ICOIS 2025)
重要信息 官网:www.ic-icois.org 时间:2025年3月14-16日 地点:中国-长春 简介 2025年光电科学与智能传感国际学术会议(ICOIS 2025)将于2025年3月14-16日在中国-长春隆重召开。会议将围绕“光学光电”、“智能传感”…...
高性能PHP框架webman爬虫引擎插件,如何爬取数据
文章精选推荐 1 JetBrains Ai assistant 编程工具让你的工作效率翻倍 2 Extra Icons:JetBrains IDE的图标增强神器 3 IDEA插件推荐-SequenceDiagram,自动生成时序图 4 BashSupport Pro 这个ides插件主要是用来干嘛的 ? 5 IDEA必装的插件&…...
三大主流负载均衡器之对比(Comparison of the Three Mainstream Load balancers)
【 Linux 】三大主流软件负载均衡器对比(LVS、Nginx、HAproxy) 三大主流软件负载均衡器对比(LVS、Nginx、HAproxy) (资料来自网络,做了部分的补充说明) LVS: 1. 抗负载能力强,性能高,能达到F5的60%,对…...
深入探索Python机器学习算法:监督学习(线性回归,逻辑回归,决策树与随机森林,支持向量机,K近邻算法)
文章目录 深入探索Python机器学习算法:监督学习一、线性回归二、逻辑回归三、决策树与随机森林四、支持向量机五、K近邻算法 深入探索Python机器学习算法:监督学习 在机器学习领域,Python凭借其丰富的库和简洁的语法成为了众多数据科学家和机…...
Qt跨线程信号槽调用:为什么信号不能像普通函数那样调用
1. 信号与槽机制的基本原理 在 Qt 中,信号与槽机制是一种事件驱动的通信方式,用于对象之间的解耦交互。其关键特点如下: 信号不能直接调用 信号只是一个声明,并没有实际的函数实现。它们通过 emit 关键字在对象内部被触发&…...
Ubuntu+deepseek+Dify本地部署
1.deepseek本地部署 在Ollama官网下载 需要魔法下载 curl -fsSL https://ollama.com/install.sh | sh 在官网找到需要下载的deepseek模型版本 复制命令到终端 ollama run deepseek-r1:7b 停止ollama服务 sudo systemctl stop ollama # sudo systemctl stop ollama.servi…...
【LLM】DeepSeek开源技术汇总
note 一、FlashMLA:MLA解码内核 二、DeepEP:针对MoE和EP的通信库 三、DeepGEMM:FP8 通用矩阵乘法(GEMM)库 四、DualPipe、EPLB:双向管道并行算法 五、3FS:一种高性能分布式文件系统 文章目录 n…...
