linux xorg占用显存过大解决

版权声明:本文为博主原创文章,遵循 CC 4.0 by-sa 版权协议,转载请附上原文出处链接和本声明。
本文链接:https://blog.csdn.net/qingfenglu/article/details/80093402

一、通过Ctrl + Alt +F1~F6任意一个进入文字界面;登录,nvidia-smi查看显存占用

二、回到图形界面:

Ctrl + Alt + F7

再次nvidia-smi查看显存占用,可发现显存已经明显降了下来

展开阅读全文

线程占用CPU过大

05-31

1、线程池ThreadPool创建的线程,回调函数里是个无限循环,用于取出 数据池中的数据并处理,CPU占用25%-30%,请问如何改进?设置优先级能解决问题吗? 会不会降低性能。rn2、一个数据池有没有必要设两个相同的处理线程?rnrn代码如下:rn[code=VB.NET] rnPrivate Sub StartServer_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles StartServer.Click '单击启动BUTTONrn System.Threading.ThreadPool.QueueUserWorkItem _ '创建线程rn (New System.Threading.WaitCallback(AddressOf LoadConn_1), "")rn Me.StartServer.Enabled = Falsern Me.StopSever.Enabled = Truern End Subrn'------------------下面是回调函数----------------rn Public Sub LoadConn_1(ByVal None As Object) '处理登陆 委托函数rn '消息池中消息结构:conn_1/~ID/~PASS/~IPEndPassrn '发出消息结构 发好友:conn_1/~connok & id & name & ph & stat & agrern Dim ConSendUdp As New Net.Sockets.UdpClient()rn Dim NowUser As CS_datarn While Not donern Dim ConMsg() As String = Split(LoadConn.GetData(), "/~") '把此消息分解rn If ConMsg(0) <> Nothing Then '如果取出来的数不为空rn Dim Ep As Net.IPEndPoint = StrToIPEndPoint(ConMsg(3))rn NowUser = ListFr.SelectIDPass(ConMsg(1), ConMsg(2))rn 'set my informationrn If NowUser IsNot Nothing Thenrn With NowUserrn .ep = Eprn .time = Nowrn .stat = Truern End Withrnrn For i As Integer = 0 To ListFr.index - 1rn 'send me is frendrn ConSendUdp.Send(Encoding.Unicode.GetBytes(CONN_1 & "/~" & CONNOK & "/~" & ListFr.GetMsg(i)) _rn , Encoding.Unicode.GetBytes(CONN_1 & "/~" & CONNOK & "/~" & ListFr.GetMsg(i)).Length _rn , Ep)rn 'send frend is mern If ListFr.GetUserStat(i) Thenrn ConSendUdp.Send(Encoding.Unicode.GetBytes(SHUA_1 & "/~" & NowUser.id) _rn , Encoding.Unicode.GetBytes(SHUA_1 & "/~" & NowUser.id).Length _rn , ListFr.GetIPEndPoint(i))rn End Ifrn Nextrn 'send endrn ConSendUdp.Send(Encoding.Unicode.GetBytes(CONN_1 & "/~" & SENDOK) _rn , Encoding.Unicode.GetBytes(CONN_1 & "/~" & SENDOK).Length _rn , Ep)rn Elsern ConSendUdp.Send(Encoding.Unicode.GetBytes(CONN_1 & "/~" & NOUSER) _rn , Encoding.Unicode.GetBytes(CONN_1 & "/~" & NOUSER).Length, Ep)rn End Ifrn End Ifrn End Whilern End Subrn[/code] 论坛

没有更多推荐了,返回首页