Прошли месяцы, когда я заметил, что мой ноутбук Dell [Ubuntu 16.04] внезапно стал медленнее, теперь я обнаружил, что это происходит, когда я отключаю его от собственной док-станции. Кажется, это не связано с носками питания или отсутствием интернета, так как у меня та же проблема, например когда я работаю из поезда с ноутбуком, подключенным к носку ... это просто, когда он находится вне его док-станции .. См. следующий сеанс консоли, где я тестирую фиктивную функцию, используя Джулию (проблема не в Джулии .. Я есть проблемы также при компиляции большого pdf из LaTeX по любой другой вычислительной проблеме). Кажется, что нет никаких проблем в других процессах, потребляющих процессор или память.
$ julia
_
_ _ _(_)_ | A fresh approach to technical computing
(_) | (_) (_) | Documentation: http://docs.julialang.org
_ _ _| |_ __ _ | Type "?help" for help.
| | | | | | |/ _` | |
| | |_| | | | (_| | | Version 0.5.1 (2017-03-05 13:25 UTC)
_/ |\__'_|_|_|\__'_| | Official http://julialang.org/ release
|__/ | x86_64-pc-linux-gnu
julia> function f(n)
s = 0
for i = 1:n
s += i/2
end
s
end
f (generic function with 1 method)
julia> @time f(100000000)
1.948031 seconds (300.00 M allocations: 4.470 GB, 14.57% gc time)
2.500000025e15
julia> @time f(100000000)
1.771005 seconds (300.00 M allocations: 4.470 GB, 7.27% gc time)
2.500000025e15
julia> @time f(100000000)
1.764294 seconds (300.00 M allocations: 4.470 GB, 7.00% gc time)
2.500000025e15
julia> @time f(100000000)
1.776455 seconds (300.00 M allocations: 4.470 GB, 7.06% gc time)
2.500000025e15
julia> @time f(100000000)
1.791494 seconds (300.00 M allocations: 4.470 GB, 7.12% gc time)
2.500000025e15
julia> @time f(100000000) # here I unplug the laptop from the docking station
11.927460 seconds (300.00 M allocations: 4.470 GB, 5.56% gc time)
2.500000025e15
julia> @time f(100000000)
12.201062 seconds (300.00 M allocations: 4.470 GB, 5.50% gc time)
2.500000025e15
julia> @time f(100000000) # here I plugged the power cord directly to the laptop
11.839180 seconds (300.00 M allocations: 4.470 GB, 5.62% gc time)
2.500000025e15
julia> @time f(100000000) # here I removed internet conection, including wifi
11.860953 seconds (300.00 M allocations: 4.470 GB, 5.65% gc time)
2.500000025e15
julia> @time f(100000000) # here I plugged back the laptop on the deck
11.789184 seconds (300.00 M allocations: 4.470 GB, 5.63% gc time)
2.500000025e15
julia> @time f(100000000) # here I switched the keyboqrd to English lqnguqge
11.857721 seconds (300.00 M allocations: 4.470 GB, 5.68% gc time)
2.500000025e15
julia> @time f(100000000) # here I closed the screen of the laptop and worked back on the main screen
12.001792 seconds (300.00 M allocations: 4.470 GB, 5.63% gc time)
2.500000025e15
julia> @time f(100000000) # here I am back to ethernet
11.865361 seconds (300.00 M allocations: 4.470 GB, 5.71% gc time)
2.500000025e15
julia> exit()
$ julia
_
_ _ _(_)_ | A fresh approach to technical computing
(_) | (_) (_) | Documentation: http://docs.julialang.org
_ _ _| |_ __ _ | Type "?help" for help.
| | | | | | |/ _` | |
| | |_| | | | (_| | | Version 0.5.1 (2017-03-05 13:25 UTC)
_/ |\__'_|_|_|\__'_| | Official http://julialang.org/ release
|__/ | x86_64-pc-linux-gnu
julia> @time f(100000000) # here I went off and on Julia
ERROR: UndefVarError: f not defined
julia> function f(n)
s = 0
for i = 1:n
s += i/2
end
s
end
f (generic function with 1 method)
julia> @time f(100000000) # here I went off and on Julia
12.809319 seconds (300.00 M allocations: 4.470 GB, 11.16% gc time)
2.500000025e15
julia> @time f(100000000) # here after lot of time (lunch break)
11.916337 seconds (300.00 M allocations: 4.470 GB, 5.49% gc time)
2.500000025e15
julia> quit()
$ julia
_
_ _ _(_)_ | A fresh approach to technical computing
(_) | (_) (_) | Documentation: http://docs.julialang.org
_ _ _| |_ __ _ | Type "?help" for help.
| | | | | | |/ _` | |
| | |_| | | | (_| | | Version 0.5.1 (2017-03-05 13:25 UTC)
_/ |\__'_|_|_|\__'_| | Official http://julialang.org/ release
|__/ | x86_64-pc-linux-gnu
julia> @time f(100000000) # here after suspended the pc and julia stop/restart
ERROR: UndefVarError: f not defined
julia> function f(n)
s = 0
for i = 1:n
s += i/2
end
s
end
f (generic function with 1 method)
julia> @time f(100000000) # here after suspended the pc and julia stop/restart
1.952593 seconds (300.00 M allocations: 4.470 GB, 14.26% gc time)
2.500000025e15
julia> @time f(100000000) # here after suspended the pc and julia stop/restart
1.824997 seconds (300.00 M allocations: 4.470 GB, 6.34% gc time)
2.500000025e15
julia>
РЕДАКТИРОВАНИЕ: В следующей транскрипции показано что-то интересное .. в предыдущем отключении от док-станции я сделал это с закрытым экраном, теперь я отключаю его с включенным экраном, и таким образом он работает .. пока я выньте вилку из розетки и сделайте приостановку / возобновление .. тогда она не работает, затем я включаю питание, делаю приостановку / возобновление и она снова работает хорошо ... Кажется, что это происходит в режиме низкого потребления, и это не Неважно, если вы отключите питание, вы должны также приостановить / возобновить работу ноутбука, чтобы ноутбук понял, что он снова подключен ...
quit()
lobianco@lobianco-officeLinux:~/Dropbox/Documenti/Varie/lef/papers/ffsm++/versions/07_carbon_balance_with_multipliers$ julia
_
_ _ _(_)_ | A fresh approach to technical computing
(_) | (_) (_) | Documentation: http://docs.julialang.org
_ _ _| |_ __ _ | Type "?help" for help.
| | | | | | |/ _` | |
| | |_| | | | (_| | | Version 0.5.1 (2017-03-05 13:25 UTC)
_/ |\__'_|_|_|\__'_| | Official http://julialang.org/ release
|__/ | x86_64-pc-linux-gnu
julia> function f(n)
s = 0
for i = 1:n
s += i/2
end
s
end
f (generic function with 1 method)
julia> @time f(100000000) # after switched off internet and moved back to french
1.939228 seconds (300.00 M allocations: 4.470 GB, 13.96% gc time)
2.500000025e15
julia> @time f(100000000) # after switched off internet and moved back to french
1.761612 seconds (300.00 M allocations: 4.470 GB, 6.42% gc time)
2.500000025e15
julia> @time f(100000000) # after unplugged power but still laptop on his own deck
1.775432 seconds (300.00 M allocations: 4.470 GB, 6.30% gc time)
2.500000025e15
julia> @time f(100000000) # after removing laptop from the deck (still unplugged)
1.770068 seconds (300.00 M allocations: 4.470 GB, 6.28% gc time)
2.500000025e15
julia> @time f(100000000) # after removing laptop from the deck (still unplugged)
1.744716 seconds (300.00 M allocations: 4.470 GB, 6.32% gc time)
2.500000025e15
julia> @time f(100000000) # after suspend/resume
11.743261 seconds (300.00 M allocations: 4.470 GB, 5.28% gc time)
2.500000025e15
julia> @time f(100000000) # after plugging the power (still disconnected from deck)
11.722175 seconds (300.00 M allocations: 4.470 GB, 5.30% gc time)
2.500000025e15
julia> @time f(100000000) # after suspend/resume
1.770605 seconds (300.00 M allocations: 4.470 GB, 6.29% gc time)
2.500000025e15
julia>
Наконец, я могу заявить, что это связано с тем, что меня отключили от розетки. Ноутбук переключается в режим энергосбережения, но он выполняет любые изменения только тогда, когда он приостановлен / возобновлен.
Итак, если, например, ноутбук подключен к собственной док-станции, штекер подключается к док-станции, а крышка экрана закрывается (как я работаю с внешним экраном / клавиатурой), а затем я снимаю ноутбук, ставлю и подключите кабель от док-станции к ноутбуку (это мое поведение по умолчанию), ноутбук продолжит работать в режиме пониженного энергопотребления, так как в нем нет штепсельной вилки. Затем мне нужно приостановить / возобновить работу ноутбука, чтобы он понял, что он подключен обратно (или, в качестве альтернативы, перед извлечением ноутбука из док-станции переместите штекер с док-станции на ноутбук).
Во всех случаях я считаю, что это ошибка Ubuntu, поскольку ноутбук должен в реальном времени понимать, подключен ли он к сокету или нет, а не только когда он приостановлен / возобновлен.