前往小程序,Get更优阅读体验!
立即前往
首页
学习
活动
专区
工具
TVP
发布
社区首页 >专栏 >《快学BigData》--Liunx上的服务操作(15)

《快学BigData》--Liunx上的服务操作(15)

作者头像
小徐
发布2023-03-06 21:12:21
2840
发布2023-03-06 21:12:21
举报
文章被收录于专栏:GreenplumGreenplum

Liunx上的服务操作

1-1)、关闭防火墙

在机器上关闭防火墙

[root@hadoop1 /]# service iptables stop

开启开机自关

[root@hadoop1 /]# chkconfig iptables off

1-2)、关闭MySql服务

[root@hadoop1 ~]# service mysqld stop

[root@hadoop1 ~]# chkconfig mysqld off

1-3)、重启网络服务

[root@localhost local]# service network restart

1-4)、开启httpd服务

[root@localhost ~]# service httpd restat

Usage: httpd {start|stop|restart|condrestart|try-restart|force-reload|reload|status|fullstatus|graceful|help|configtest}

1-5)、关闭Transparent Huge Pages(THP)

查看状态

[root@hdoop1 ~]# cat /sys/kernel/mm/transparent_hugepage/defrag

[always] madvise never

说明是开启的

[root@hdoop1 ~]# vim /etc/rc.d/rc.local

if test -f /sys/kernel/mm/transparent_hugepage/enabled; then

echo never > /sys/kernel/mm/transparent_hugepage/enabled

fi

if test -f /sys/kernel/mm/transparent_hugepage/defrag; then

echo never > /sys/kernel/mm/transparent_hugepage/defrag

fi

付给权限

[root@hdoop1 ~]# chmod +x /etc/rc.d/rc.local

重启机器再次查看THP信息

[root@hdoop1 ~]#cat /sys/kernel/mm/transparent_hugepage/enabled

always madvise [never]

说明是关闭的

LInux 检测磁盘的性能

$ sudo time dd if=/dev/sda1 of=txt bs=1M count=1024

记录了1024+0 的读入

记录了1024+0 的写出

1073741824 bytes (1.1 GB, 1.0 GiB) copied, 8.46182 s, 127 MB/s

0.00user 0.90system 0:08.57elapsed 10%CPU (0avgtext+0avgdata 3184maxresident)k

49208inputs+2097152outputs (0major+344minor)pagefaults 0swaps

记录了1024+0 的读入:表示读入了多少数据

记录了1024+0 的写出:表示写出了说少数据

127 MB/s:表示写入1024M的数据的速度

本文参与 腾讯云自媒体分享计划,分享自微信公众号。
原始发表:2018-02-02,如有侵权请联系 cloudcommunity@tencent.com 删除

本文分享自 河马coding 微信公众号,前往查看

如有侵权,请联系 cloudcommunity@tencent.com 删除。

本文参与 腾讯云自媒体分享计划  ,欢迎热爱写作的你一起参与!

评论
登录后参与评论
0 条评论
热度
最新
推荐阅读
目录
  • 1-1)、关闭防火墙
  • 1-2)、关闭MySql服务
  • 1-3)、重启网络服务
  • 1-4)、开启httpd服务
  • 1-5)、关闭Transparent Huge Pages(THP)
  • LInux 检测磁盘的性能
领券
问题归档专栏文章快讯文章归档关键词归档开发者手册归档开发者手册 Section 归档