Tag Info

New answers tagged

0

A more hammer and nail approach: cat /dev/zero > /tmp/cache.cleaner ; rm -f /tmp/cache.cleaner This even doesn't need root access! (Assuming your /tmp is mounted as tmpfs with max size)


1

Code executes at the same speed whether it's in the kernel or in user land, but there are things that the kernel code can do directly while user land code has to jump through hoops. In particular, kernel code can map application memory directly, so it can directly copy the file contents between the application memory and the internal buffers from or to which ...


1

Very simplified: Your application wants to read a file Application asks kernel, kernel access filesystem (in kernel space ) checks permissions, handles file descriptor to application. With user space filesystems you have a lot more relatively slow kernel-to-userspace switches: Application asks kernel to open file, kernel calls userspace filesystem, ...


-2

If you are writing code or using data in large data you can do it: df > `date +"%Y_%m_%d_%T".log` NOTE: use df without any option. and You can grep df in your mount point: fotr example: df |grep /dev/sda3 |awk {'print $3'} > `date +"%Y_%m_%d_%T".log` ## $3 mentioned to used columns Then you can investigate your data.


0

Found that AIX handles it via smitty topas. Interesting.


1

I did multiple checks and it seems that the kernel allocates a quite large RCVBUF (receive buffer) of around 1-4MB. Not by default it doesn't. The size is per socket; HTTP relationships may involve multiple sockets. There is no system maximum as far as I am aware, except in so far as there's a (pretty high) maximum number of sockets. From man 7 ...


2

Let us look into the performance diagram to understand the various layers in which netstat command is useful for debugging. Ethernet netstat -in command is used in this layer where -i flag is used to display a table of all network interfaces, or the specified iface. IP netstat -an command is used in this layer where -a flag is used to show both ...


2

The RAM in a computer is useful for two things: to store the memory of programs, and as a cache of recently-used disk content. On a typical healthy desktop system, about half the memory goes into each. You can check your memory usage with the free command; the “used” column of the “-/+ buffers/cache” is the figure for memory used for program data, and the ...


1

http://en.wikipedia.org/wiki/Asynchronous_I/O, a program is firing up requests for I/O, but does not wait on them. However it can still accept and process the I/O responses once they come.


2

There looks to be a single thread writing a little bit more than 4KB about 111 times per second. This is sufficient to keep your disk 100% busy (111 iops * 9 ms service time = 1 second of service per second = 100%). As there are no other processes writing on that disk (that partition actually), the wait queue is empty, all requests are processed immediately. ...


15

Izkata's comment revealed the answer: locale-specific comparisons. The sort command uses the locale indicated by the environment, whereas Python defaults to a byte order comparison. Comparing UTF-8 strings is harder than comparing byte strings. $ time (LC_ALL=C sort <numbers.txt >s2.txt) real 0m5.485s user 0m14.028s sys 0m0.404s How about ...


7

This is more of an extra analysis than an actual answer but it does seem to vary depending on the data being sorted. First, a base reading: $ printf "%s\n" {1..1000000} > numbers.txt $ time python sort.py <numbers.txt >s1.txt real 0m0.521s user 0m0.216s sys 0m0.100s $ time sort <numbers.txt >s2.txt real 0m3.708s user ...


5

Both of the implementations are in C, so a level playing field there. Coreutils sort apparently uses the mergesort algorithm. Mergesort does a fixed number of comparisons which increases logarithmically to the input size, i.e. big O(n log n). Python's sort uses a unique hybrid merge/insertion sort, timsort, which will do a variable number of comparisons ...



Top 50 recent answers are included