Image conversion and Inode usage [closed] - linux

Closed. This question is off-topic. It is not currently accepting answers.
Want to improve this question? Update the question so it's on-topic for Stack Overflow.
Closed 9 years ago.
Improve this question
This question has been flagged as irrelevant so I guess this has no real worth to anyone so I tried removing the question but the system won't let me so I am now truncating the content of this post ;)

I think you need to run the actual numbers for both scenarios:
On the fly
how long does one image take to generate and do you want the client to wait that long
do you need to pay by cpu utilization, number of CPUs etc. and what will this cost for X images thumbnailed Y times over 1 year
Stored
how much space will this use and what will it cost
how many files are there? Is the number bigger than the number of inodes in the destination file system, or is the total estimated size bigger than the file system
It^s mostly an economics question, there is no general yes/no answer. When in doubt, I'd probably go with storing them since it's a computation intensive tasks and it's not very efficient to do it over and over again. You could also do a hybrid solution like generate a thumbnail on the fly when it is first requested, then cache it until it wasn't used for certain a number of days.
TL;DR: number of inodes is probably your least concern.

Related

Linux free command meaning [closed]

Closed. This question is off-topic. It is not currently accepting answers.
Want to improve this question? Update the question so it's on-topic for Stack Overflow.
Closed 10 years ago.
Improve this question
I got some researh to do about linux. One of the questions is the folowing:
'Is it possible that on a running system the output of the command free in the free column is the same for the first 2 rows? How can you force this?'
I googeled around, and I believe I've found the meaning of these values.
If I add buffers and cache together, and add that to free, it gives me the value of free for buffers and cache. Which means, the memory that could be used by applications if required so.
So, I suppose it could be that the values could be the same for those 2 rows, it depends on the usage. But, I've no idea how I could
The difference between the first and the second rows is that the first is row is does not count caches and buffers under the free column, while the second one does. Here is an example:
total used free shared buffers cached
[1] Mem: 4028712 2972388 1056324 0 315056 835360
[2] -/+ buffers/cache: 1821972 2206740
used[2] = used[1] - buffers - cached
free[2] = free[1] + buffers + cached
So the answer to your question is: it is possible that these two rows are identical (or at least very close to each other), but not likely on a real system, as it requires you to free/exhaust all the cache. If you are willing to experiment, try some suggestions from how to drop cache or write a program that eats away all available RAM.

Size of access.log and server load? [closed]

Closed. This question is off-topic. It is not currently accepting answers.
Want to improve this question? Update the question so it's on-topic for Stack Overflow.
Closed 10 years ago.
Improve this question
Is there any difference at all in server load when adding new lines to a big vs. small access.log file?
What I mean is, should I delete my access.log files if they become too big or leave it. It is 6GB right now. I do not rotate.
I'm not sure about the performance difference of big or small files, but maybe you want to split them every month and compress old access-log files. For that you can use logrotate. More information in the man page
Log rotation is an important part of maintaining a server. Without it, you'r likely to fill up your disk, and then your server will behave extremely strangely, depending on the app.
Regardless of performance, you should be using logrotate or something similar.

Why is swap memory faster than auxiliary memory though swap is taken from auxiliary memory [closed]

Closed. This question is off-topic. It is not currently accepting answers.
Want to improve this question? Update the question so it's on-topic for Stack Overflow.
Closed 11 years ago.
Improve this question
I was asked in the interview regarding O.S
we make virtual memory out of hard disk than why is accesing swap faster than accessing hard disk.
Please help me understanding the concept.Or else redirect me to the proper forum.
First, as #Celada said, there's chances your data will in memory (has not been swaped out) when you map your file to memory or put your data in memory. This may be faster than you directly access your file or your data.
Second, OSes have very efficient swap algorithm that probably better than yours. So for example, if you need to read a very large file(maybe 2GB large or more), you need to do kind of swapping yourself and probably much slower than using OS swap.
Third, in practice, system administrators usually put /swap in a separate partitions or even separate disk or even faster device, so you can take advantage of it.
The hypothesis is nonsense. Accessing swap is not faster than accessing the hard disk if the swap is on the hard disk.

When is it a good idea to turn off atime and diratime? [closed]

Closed. This question is off-topic. It is not currently accepting answers.
Want to improve this question? Update the question so it's on-topic for Stack Overflow.
Closed 11 years ago.
Improve this question
I've read that turning off atime and diratime can be beneficial to I/O performance, but I've never seen a good example of what would and would not benefit. When should I do this?
If you want a solid example of when you would specify noatime in the options for a partition, imagine a data partition containing the files for a database. This database is mainly read from (not written to) and the queries are frequent and small in size. If you have atime enabled, every read operation (fast) that hit the disk would actually turn into a write operation (slow) because atime would have to be updated every time something is accessed.
This is particularly noticeable when you are using a potentially slow disk (think EBS on Amazon with some performance issues).
So, in any case where you expect to be doing a lot of reading from a filesystem and you wan to prevent latency due to disk IO, turn off atime :)
atime is the time of last access. That means that it has to be updated on disk each time a file is read, even if there is no other modification in the data/metadata of the file.
And since most programs read files, even whether they do not write at them, it is always beneficial for the performance to turn off this options.
Unless, of course, you need it. Because, as you probably know, atime is mandated by Posix, and there are some old software out there that relies on it.

hardlinks in Linux [closed]

Closed. This question is off-topic. It is not currently accepting answers.
Want to improve this question? Update the question so it's on-topic for Stack Overflow.
Closed 11 years ago.
Improve this question
What is the size of the hardlink in Linux? Will it be the size of the inode? If I have two of them?
Thanks in advnace for any explanation, I tried to google it, but didn't find anything
A hard link reuses the inode, but requires a separate directory entry, which takes up 8 bytes plus the length of the file name in ext2. There may be other costs associated, such as when directory indexing is used, also, directories grow by entire blocks.
Think of a hard link as just another name for a file. If a file has 1000 hard links, that just means that it has 1000 different directory entries associated with it, all with potentially different names. For example, if you had 1000 different names, you would still only be one person. You'd take up the same amount of space no matter how many names you had. You'd just have a bit more paperwork for each additional name.

Resources