LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Newbie (http://www.linuxquestions.org/questions/linux-newbie-8/)
-   -   Interview question: slow system performance (http://www.linuxquestions.org/questions/linux-newbie-8/interview-question-slow-system-performance-4175443649/)

shivaa 12-31-2012 11:05 PM

Interview question: slow system performance
 
Hello,

I have come accross a question which has been asked to me two times in interviews. Have a look:-


Interviewer, "Let's say, there are 2 systems - A and B. Both having exactly same configuration (OS, H/W, RAM, swap, memory, configuration, applications etc.. everything is identical), but system A is responding slow, whereas system B is running fine. Why this is so? and what will do to resolve it?"

I answered that, "I will check memory consumption, active processes on system A."

Interviewer, "Suppose there's enough free memory and no such memory consuming processes running.. but still system A is slow.. then what will you do?"

And I couldn't answers then...

So what may be the other factors affecting performance of the system A? Why it is still slow?

everest40 01-01-2013 01:05 AM

Is it possible these might be thin clients? If so, then poor network performance might make system A respond more slowly.

everest40 01-01-2013 01:10 AM

Also, I'd ask what exactly the questioner means by "responding slow". Is he/she talking about a single application, such as a Web browser loading pages slowly, or the system as a whole? My experience is that users sometimes mistakenly think the whole system is having a problem when it's really only one program - they just didn't think to check other programs.

markush 01-01-2013 03:25 AM

You should at first check the nameservers on both systems
Code:

cat /etc/resolv.conf
and if they are different, put the same nameservers into /etc/resolv.conf of the slow system as on the other system.

Markus

jefro 01-01-2013 09:20 AM

Responding slow as in data transfer speed or speed of nic or do they mean that simply trying to access it is slow then transfer speeds are correct?

I'd make an assumption that it would be external to the box. That was only because they make the claim that they boxes are clones and one for one swap. I know they didn't suggest configured correctly so any network setting could be at fault.

TB0ne 01-01-2013 11:07 AM

Quote:

Originally Posted by shivaa (Post 4860425)
Hello,
I have come accross a question which has been asked to me two times in interviews. Have a look:-

Interviewer, "Let's say, there are 2 systems - A and B. Both having exactly same configuration (OS, H/W, RAM, swap, memory, configuration, applications etc.. everything is identical), but system A is responding slow, whereas system B is running fine. Why this is so? and what will do to resolve it?"

I answered that, "I will check memory consumption, active processes on system A."

Interviewer, "Suppose there's enough free memory and no such memory consuming processes running.. but still system A is slow.. then what will you do?"

And I couldn't answers then...
So what may be the other factors affecting performance of the system A? Why it is still slow?

Well, you've gotten some good tips here, but there is no 'right' answer...the interviewer is testing your troubleshooting skills. The questions others have mentioned here (what kind of app, DNS, network, etc.), are good starting points.

The only real answer is for YOU to think about how an application runs, and then think about what could cause it to be slow. This is what systems administrators do all day, every day. Without good troubleshooting skills, you won't be able to identify the problem, and won't be able to start figuring out solutions. How long have you been an administrator so far?

shivaa 01-01-2013 11:18 AM

@TB0ne: I was also thinking of the same that he was trying to judge my troubleshooting skills that how I deal with such complicated tasks. He was not just wanted a straight forward answer.

TB0ne 01-01-2013 12:41 PM

Quote:

Originally Posted by shivaa (Post 4860708)
@TB0ne: I was also thinking of the same that he was trying to judge my troubleshooting skills that how I deal with such complicated tasks. He was not just wanted a straight forward answer.

No, he DID want a straight-forward answer. The one you provided lacked quite a bit....there is a big list of things you could check, and questions you could have asked. How long have you been an administrator??

shivaa 01-01-2013 12:43 PM

May be... It's around 3 years.

TB0ne 01-01-2013 01:43 PM

Quote:

Originally Posted by shivaa (Post 4860749)
May be... It's around 3 years.

Well, not to sound nasty, but I'd expect an admin with 3 years of on-the-job experience to come up with more than a basic CPU and memory check.

Wouldn't there be disk IO to check as well? What kind of disk? If it's an array, is it corrupted/restriping after recovery? How about a network bottleneck? A DNS issue? Number of users hitting it? Different client configuration between users on the two servers? Database issue? These are just a small sample...there are LOTS of others. And again, there is no 'right' answer to this question...because the things mentioned above may not even apply to the server in question, and without you asking questions of the interviewer to get more information, you'll not know WHAT to check or ask about. That's why they pose the question...to see how you think about the issue, and how you'd go about resolving it.

markush 01-01-2013 01:55 PM

Well, as far as I understand, the correct answer would be to ask the correct questions. Besides checking DNS one would ask if DHCP is used (if this computers are servers probably not DHCP).
I would always at first look at the network configuration because even if the computers are absolutely identical, they will at least have different IP-adresses and therefore are not identically configured.

Markus

salasi 01-02-2013 11:50 AM

One possibility would be to answer along the lines of 'I'd use tool A to check B, then tool C to check D, etc.'

The person asking the question would be checking whether your line of attack made any logical sense, and whether you are choosing appropriate tools for each part of the problem. Note that there is clearly more than one acceptable answer, but if you make strange tool choices, you would expect to get further questions to see whether you really know the advantages and disadvantages of different tools, and whether you know of alternatives.

malekmustaq 01-03-2013 12:17 AM

Quote:

Originally Posted by shivaa (Post 4860425)
Hello,

I have come accross a question which has been asked to me two times in interviews. Have a look:-


Interviewer, "Let's say, there are 2 systems - A and B. Both having exactly same configuration (OS, H/W, RAM, swap, memory, configuration, applications etc.. everything is identical), but system A is responding slow, whereas system B is running fine. Why this is so? and what will do to resolve it?"

I answered that, "I will check memory consumption, active processes on system A."

Interviewer, "Suppose there's enough free memory and no such memory consuming processes running.. but still system A is slow.. then what will you do?"

And I couldn't answers then...

So what may be the other factors affecting performance of the system A? Why it is still slow?

Endless list of "what if other factors" aside from the machine, OS and "type of task" issues... but LET ALL THINGS BE EQUAL between A and B. :D

...yet B runs a bit faster than A, ...why?

Chance is that:

Box A booted ahead for days and have run varied tasks repeatedly and has gathered deposits in its written cache and temp dirs, while box B is a fresh install (of same OS) fresh configured (of same configuration) fresh booted (with same setup and same daemons running).

Overcrowded cache and temp files and a weary hard drive can still make a difference.

szboardstretcher 01-03-2013 10:28 AM

As Tb0ne pointed out, there is no correct answer. You are really just being asked how deep your knowledge of linux is if needed.

If something is 'slow',.. i generally check my connection first. Can i get to other things with good speed? If all is well, then I move into the box. Check processor utilization, memory/swap utilization. Bandwidth usage. Disk free, disk performance. Do other programs/commands run slow? Only local? or going over the net? Check relevant logs.

From these starting points, you can be pulled/led into hundreds of different directions of further troubleshooting.

shivaa 02-18-2013 02:36 AM

Thanks everyone for your responses! Ciao!!


All times are GMT -5. The time now is 09:00 PM.