We may need to check some materials about how to do good research in system field if you a Ph.D. focusing on system research. Some references: 1, How to write a good systems paper 2, How to be a good graduate student 3, Doing a System Ph.D. 4, Giving an Academic Talk Welcome to add
Read more
Author: Weiwei Jia
How to set process with lowest priority?
Posted onIn system, sometimes, we need backstage threads with very very low priority since it cannot preempt any normal process asks for CPU. SCHED_IDLE class satisfies this requirement which has the priority lower than “nice=19” of CFS. Following code does this. 241 void set_idle_priority(void) { 242 struct sched_param param; 243 param.sched_priority = 0; 244 int s
Read more
How to use ioprio_set in linux c
Posted onSince there is no glibc wrapper for ioprio_set in linux c, we need to call this API with some definition. Using syscall in linux as follows. syscall(SYS_ioprio_set, IOPRIO_WHO_PROCESS, pid, IOPRIO_PRIO_CLASS(IOPRIO_CLASS_IDLE)); Some other definitions to declare above macros. 69 enum { 70 IOPRIO_CLASS_NONE, 71 IOPRIO_CLASS_RT, 72 IOPRIO_CLASS_BE, 73 IOPRIO_CLASS_IDLE, 74 }; 75 76 enum { 77
Read more
What is the vruntime of one process after it is moved into another run queue in Linux Kernel
Posted onWhen we do migration, one process will be migrated from one source CPU’s runqueue to destination CPU’s run queue. What is the virtual run time (if CFS is used) after it is moved into destination CPU’s run queue? When the process is dequeued from source CPU’s run queue, its vruntime will minus the minimum vruntime
Read more
Libvirt crash when upgrade from version 1.2.2 to version 2.5.0
Posted onIf you install libvirt from ubuntu software library like this sudo apt-get install libvirt-bin The default version is 1.2.2 for Ubuntu Trusty. However, after you upgrade it to version 2.5.0 from its source codes (restart the libvirtd service), you will see following error if you want to install vm with virt-install. # ./installkvm1.sh Starting install…
Read more
Cannot start VM with error “no network with matching name ‘default'”
Posted onI update libvirt version and want to start VM with the new libvirt tools but I failed as follows. > sudo virsh start kvm1 error: Failed to start domain kvm1 error: Network not found: no network with matching name ‘default’ It seems that the default ‘virbr0’ is missing after I update libvirt so I solve
Read more
How to output function stack in Linux Kernel
Posted onIn Linux Kernel, we usually trace/debug what kind of events will trigger the phenomena we find in the system. For example, what kind of event will trigger the fact that the timeslice of one process will be very short. In order to solve these kind of problems, we need to output the function stack. Currently,
Read more
What’s the difference between memory coherence and consistency?
Posted onIn memory hierarchical, it needs to be coherence and consistency. However, they are different things. What are the differences? Memory coherence: a memory system is coherent if any read of a data item returns the most recently written value of that data item (what values can be returned by a read). Memory consistency: A memory
Read more
Ubuntu’s GUI response is very slow
Posted onFor Dell PowerEdge T630 server, if you install latest Ubuntu desktop version (16.04) or (14.04), you will get a very slow GUI (X-window). $ inxi -G Graphics: Card: Matrox Systems G200eR2 X.org: 1.15.1 driver: vesa tty size: 205×58 Advanced Data: N/A out of X For Ubuntu 14.04.1, this problem can be solved by following steps.
Read more
How to collect VM exit numbers in KVM
Posted onSometimes, we may want to know the specific benchmark can cause what kind of VM exits. 1, Install perf. 2, # perf kvm stat record -a ^C 3, # perf kvm stat report This will report your VM exit numbers and what kind of operation lead to VM exit. You may need to compare many
Read more
How to use vnc to connect remote server with GUI desktop
Posted onFor my case, I need to bypass one intermediate server so that I can connect to the remote server with vnc. For example, there are two servers (s1, s2) except my local PC and I have to login to s1 so that I can login s2 from my local PC. However, now, I need to
Read more
How to get the IP addresses of VMs in KVM with virsh
Posted onWhen we create VMs in KVM, we may don’t know the IP addresses because they are automatically assigned by DHCP. So we want to get them in VMM so that can login by SSH. Do the commands as follows. $ virsh domiflist hvm1 Interface Type Source Model MAC ——————————————————- vnet0 network default virtio 52:54:00:1c:36:cd $
Read more
How to install PARSEC correctly.
Posted onPARSEC is the most important CPU-bound benchmark for systems. It is huge and hard to install because it needs lots of 3-part libs. PARSEC download link for 3.0 version: http://parsec.cs.princeton.edu/download.htm#parsec I remembered I added the answer yesterday night but I could not see the answer currently. Anyway, let me add the answer again after I
Read more
How to install NAS benchmark
Posted onNAS benchmark link: http://www.nas.nasa.gov/publications/npb.html For Ubuntu, remember to install gfortran (sudo apt-get install gfortran) and change config/make.def to install NAS benchmark. Other distros are similar.
How to config Git remote server on Bitbucket or Github
Posted onFor your first push with git, you may get following errors when you use github or bitbucket. $ git push No refs in common and none specified; doing nothing. Perhaps you should specify a branch such as ‘master’. fatal: The remote end hung up unexpectedly Everything up-to-date Just run following command to set your remote
Read more
‘dd’ command cannot support calculation for its parameters
Posted on$ dd if=/dev/zero of=./4Ktest100M bs=4KB count=25000*9 dd: invalid number `25000*9′ I think ‘dd’ should support calculation for its parameters like ‘bs’, ‘count’ and so on. You can get the effect by using some other tools/commands, like dd if=/dev/zero of=./4Ktest100M bs=4KB count=$((25000*9)) or dd if=/dev/zero of=./4Ktest100M bs=4KB count=$(bc <<< 25000*9) I think it makes sense. Thank
Read more
How to watch a directory size in Linux Shell
Posted onHow (only) to show the size of the directory. LS command may show more trivial infos I don’t need. DU command can do it. DU is “du – estimate file space usage”. Users could use ‘–max-depth=N’ parameter to print the level of information. One example is as follows. $ du -h –max-depth=0 hummer-svn 11G hummer-svn
How to keep master thesis safety and availability on Windows
Posted onWhen you write your master thesis (in Chinese) on windows, you may have following worries. a, Be afraid your master thesis is lost (or can not be accessed) when hard disk/udisk is broken (or something other viruses). b, Keep master thesis availability (7×24) and safety. c, Do not want anyone else to access it before
Read more
Git push error under CENTOS 6.7
Posted on$ git add file $ git commit -m “xxxx” $ git push error: The requested URL returned error: 403 Forbidden while accessing https://github.com fatal: HTTP request failed Change your ~/.gitconfig as follows: $ cat ~/.gitconfig [user] name = xxx email = xxx@gmail.com [remote “origin”] fetch = +refs/heads/*:refs/remotes/origin/* url= https://name@github.com/name/xxx.git
Skype crashes because it cannot read data from “C:Documents and SettingsAdministratorLocal SettingsTemp”
Posted onOn my laptop, I install windows xp because it is user-friendly for me. However, Skype cannot be open because “The system is not unavailable”. At last, I find the “Skype” directory under “C:Documents and SettingsAdministratorLocal SettingsTemp” cannot be accessed. “C:Documents and SettingsAdministratorLocal SettingsTemp” is like temporary directory for specific user under Linux OS. Actually, for
Read more